Add seekRelative function into PlaYUVerStream and minor fix in ModulesHandle
This commit is contained in:
1 parent
204a07cb93
commit
cd48ea2c3c
4 files changed
+22
-3
No files matched your search
@@ -282,7 +282,7 @@ Void ModulesHandle::enableModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
windowName.append( pcVideoSubWindow->windowTitle() );
|
windowName.append( pcVideoSubWindow->getWindowName() );
|
||||||
videoSubWindowList.append( pcVideoSubWindow );
|
videoSubWindowList.append( pcVideoSubWindow );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -518,7 +518,7 @@ Void VideoSubWindow::seekRelativeEvent( Bool bIsFoward )
|
|||||||
{
|
{
|
||||||
if( m_pCurrStream )
|
if( m_pCurrStream )
|
||||||
{
|
{
|
||||||
if( m_pCurrStream->seekInput( m_pCurrStream->getCurrFrameNum() + ( bIsFoward ? 1 : -1 ) ) )
|
if( m_pCurrStream->seekInputRelative( bIsFoward ) )
|
||||||
{
|
{
|
||||||
refreshFrame();
|
refreshFrame();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -692,6 +692,25 @@ PlaYUVerFrame* PlaYUVerStream::getNextFrame()
|
|||||||
return m_pcNextFrame;
|
return m_pcNextFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Bool PlaYUVerStream::seekInputRelative( Bool bIsFoward )
|
||||||
|
{
|
||||||
|
if( !m_bInit || !m_bIsInput )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
Bool bRet = false;
|
||||||
|
if( bIsFoward )
|
||||||
|
{
|
||||||
|
readFrame();
|
||||||
|
bRet = !setNextFrame();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UInt64 newFrameNum = m_iCurrFrameNum - 1;
|
||||||
|
bRet = seekInput( newFrameNum );
|
||||||
|
}
|
||||||
|
return bRet;
|
||||||
|
}
|
||||||
|
|
||||||
Bool PlaYUVerStream::seekInput( UInt64 new_frame_num )
|
Bool PlaYUVerStream::seekInput( UInt64 new_frame_num )
|
||||||
{
|
{
|
||||||
if( !m_bInit || new_frame_num < 0 || new_frame_num >= m_uiTotalFrameNum || ( Int64 )new_frame_num == m_iCurrFrameNum )
|
if( !m_bInit || new_frame_num < 0 || new_frame_num >= m_uiTotalFrameNum || ( Int64 )new_frame_num == m_iCurrFrameNum )
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ private:
|
|||||||
std::string m_cCodedName;
|
std::string m_cCodedName;
|
||||||
std::string m_cPelFmtName;
|
std::string m_cPelFmtName;
|
||||||
|
|
||||||
|
|
||||||
FILE* m_pFile; /**< The input file pointer >*/
|
FILE* m_pFile; /**< The input file pointer >*/
|
||||||
std::fstream m_fsIOStream; /**< The input file pointer >*/
|
std::fstream m_fsIOStream; /**< The input file pointer >*/
|
||||||
|
|
||||||
@@ -146,6 +145,7 @@ public:
|
|||||||
PlaYUVerFrame* getCurrFrame( PlaYUVerFrame * );
|
PlaYUVerFrame* getCurrFrame( PlaYUVerFrame * );
|
||||||
PlaYUVerFrame* getNextFrame();
|
PlaYUVerFrame* getNextFrame();
|
||||||
|
|
||||||
|
Bool seekInputRelative( Bool bIsFoward );
|
||||||
Bool seekInput( UInt64 new_frame_num );
|
Bool seekInput( UInt64 new_frame_num );
|
||||||
|
|
||||||
Bool isInit()
|
Bool isInit()
|
||||||
|
|||||||
Reference in new issue
Block a user