Fix the module skip while playing

This commit is contained in:
2021-06-10 23:45:09 +01:00
parent 83a9decc26
commit 304c0f6683
4 changed files with 24 additions and 7 deletions
+14 -7
View File
@@ -815,6 +815,15 @@ bool VideoSubWindow::saveStream( QString filename )
return iRet;
}
void VideoSubWindow::setPlaying( bool isPlaying )
{
m_bIsPlaying = isPlaying;
for( auto module : m_apcCurrentModule )
{
module->setPlaying( isPlaying );
}
}
bool VideoSubWindow::isPlaying()
{
if( getCategory() & SubWindowCategory::MODULE_SUBWINDOW )
@@ -831,14 +840,12 @@ bool VideoSubWindow::isPlaying()
bool VideoSubWindow::play()
{
bool isPlaying = false;
if( m_pCurrStream && m_pCurrStream->getFrameNum() > 1 )
{
m_bIsPlaying = true;
}
else
{
m_bIsPlaying = false;
isPlaying = true;
}
setPlaying( isPlaying );
return m_bIsPlaying;
}
@@ -854,7 +861,7 @@ bool VideoSubWindow::playEvent()
void VideoSubWindow::pause()
{
m_bIsPlaying = false;
setPlaying( false );
refreshFrame();
}
@@ -891,7 +898,7 @@ void VideoSubWindow::stop()
m_cRefreshResult.waitForFinished();
m_cReadResult.waitForFinished();
#endif
m_bIsPlaying = false;
setPlaying( false );
seekAbsoluteEvent( 0 );
return;
}