Avoid playing sequences with one frame only

This commit is contained in:
jfmcarreira committed 2014-06-26 01:59:58 +01:00
1 parent 947f7ed80a
commit 13e34a2269
3 files changed
+18 -13

No files matched your search

+10 -2
View File
@@ -208,9 +208,17 @@ Bool SubWindowHandle::save( QString filename )
return iRet;
}
Void SubWindowHandle::play()
Bool SubWindowHandle::play()
{
m_bIsPlaying = true;
if( m_pCurrStream && m_pCurrStream->getFrameNum() > 1 )
{
m_bIsPlaying = true;
}
else
{
m_bIsPlaying = false;
}
return m_bIsPlaying;
}
Int SubWindowHandle::playEvent()
+1 -1
View File
@@ -70,7 +70,7 @@ public:
Void reloadFile();
Bool save( QString filename );
Void play();
Bool play();
Void pause();
Int playEvent();
Void stop();
+7 -10
View File
@@ -456,29 +456,26 @@ Void plaYUVerApp::play()
if( m_arrayActions[VIDEO_LOCK_ACT]->isChecked() && m_acPlayingSubWindows.size() )
{
Bool bFind = false;
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
if( !m_acPlayingSubWindows.contains( m_pcCurrentSubWindow ) )
{
if( m_acPlayingSubWindows.at( i ) == m_pcCurrentSubWindow )
if( !m_pcCurrentSubWindow->play() )
{
bFind = true;
break;
return;
}
}
if( !bFind )
{
m_acPlayingSubWindows.append( m_pcCurrentSubWindow );
m_pcCurrentSubWindow->seekAbsoluteEvent( m_acPlayingSubWindows.at( 0 )->getInputStream()->getCurrFrameNum() );
updateTotalFrameNum();
}
m_pcCurrentSubWindow->play();
}
else
{
m_pcPlayingTimer->stop();
m_acPlayingSubWindows.clear();
if( !m_pcCurrentSubWindow->play() )
{
return;
}
m_acPlayingSubWindows.append( m_pcCurrentSubWindow );
m_pcCurrentSubWindow->play();
m_uiAveragePlayInterval = 0;
m_bIsPlaying = false;
}