Add a index to the file frame

This commit is contained in:
jfmcarreira committed 2015-03-02 20:34:11 +00:00
1 parent aeff53ed1d
commit aa31e75332
3 files changed
+6 -2

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ OPTION( PLAYUVER_LONGVERSIONNAME "Use long version name in deb" OFF )
OPTION( PLAYUVER_WERROR "Warnings as errors" OFF )
OPTION( PLAYUVER_THREADED_MODULES "Use threads for modules" OFF )
OPTION( USE_QT4 "Build with QT4" OFF )
OPTION( USE_SSE "Build with SSE support" OFF )
OPTION( USE_SSE "Build with SSE support" OFF )
#####################################################################################
# Qt library
+4 -1
View File
@@ -145,6 +145,7 @@ PlaYUVerStream::PlaYUVerStream()
m_ppcFrameBuffer = NULL;
m_uiFrameBufferSize = 2;
m_uiFrameBufferIndex = 0;
m_uiCurrFrameFileIdx = 0;
#ifdef USE_FFMPEG
m_cLibAvContext = new LibAvContextHandle;
#endif
@@ -480,7 +481,7 @@ Void PlaYUVerStream::readFrame()
if( !m_bInit || !m_bIsInput || m_bLoadAll )
return;
if( ( m_iCurrFrameNum + ( m_uiFrameBufferSize - 1 ) >= ( Int64 )m_uiTotalFrameNum ) )
if( m_uiCurrFrameFileIdx >= Int64( m_uiTotalFrameNum ) )
{
m_pcNextFrame = NULL;
return;
@@ -508,6 +509,7 @@ Void PlaYUVerStream::readFrame()
}
m_pcNextFrame->frameFromBuffer( m_pStreamBuffer, bytes_read );
}
m_uiCurrFrameFileIdx++;
m_pcNextFrame->fillRGBBuffer();
return;
}
@@ -662,6 +664,7 @@ Bool PlaYUVerStream::seekInput( UInt64 new_frame_num )
}
m_uiFrameBufferIndex = 0;
m_pcCurrFrame = m_pcNextFrame = m_ppcFrameBuffer[m_uiFrameBufferIndex];
m_uiCurrFrameFileIdx = 0;
readFrame();
setNextFrame();
+1
View File
@@ -84,6 +84,7 @@ private:
PlaYUVerFrame *m_pcCurrFrame;
PlaYUVerFrame *m_pcNextFrame;
UInt m_uiFrameBufferIndex;
UInt64 m_uiCurrFrameFileIdx;
UInt m_uiWidth;
UInt m_uiHeight;