Add function to return the max number of frames of the sequences in the display list

This commit is contained in:
jfmcarreira committed 2014-05-09 05:21:04 +01:00
1 parent bb83147bb3
commit 681e8c0d6b
2 files changed
+14 -2

No files matched your search

+13 -2
View File
@@ -296,6 +296,18 @@ void plaYUVerApp::updatePropertiesSelectedArea( QRect area )
// ----------------------- Playing Functions --------------------
UInt plaYUVerApp::getMaxFrameNumber()
{
UInt currFrames;
UInt maxFrames = INT_MAX;
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
{
currFrames = m_acPlayingSubWindows.at( i )->getInputStream()->getFrameNum();
if( currFrames < maxFrames )
maxFrames = currFrames;
}
return maxFrames;
}
Void plaYUVerApp::setTimerStatus()
{
Bool status = false;
@@ -337,7 +349,7 @@ void plaYUVerApp::play()
m_acPlayingSubWindows.append( m_pcCurrentSubWindow );
m_pcCurrentSubWindow->seekAbsoluteEvent( m_acPlayingSubWindows.at( 0 )->getInputStream()->getCurrFrameNum() );
m_pcCurrentSubWindow->play();
m_pcFrameSlider->setMaximum( qMin( m_pcFrameSlider->maximum(), ( Int )m_pcCurrentSubWindow->getInputStream()->getFrameNum() - 1 ) );
m_pcFrameSlider->setMaximum( getMaxFrameNumber() - 1 );
}
}
else
@@ -543,7 +555,6 @@ Void plaYUVerApp::zoomToFitAll()
}
}
void plaYUVerApp::scaleFrame( int ratio )
{
if( activeSubWindow() )