Fix the module skip while playing

This commit is contained in:
jfmcarreira committed 2021-06-10 23:45:09 +01:00
1 parent 83a9decc26
commit 304c0f6683
4 files changed
+24 -7

No files matched your search

+8
View File
@@ -60,6 +60,14 @@ void CalypAppModuleIf::update( bool isPlaying )
}
}
void CalypAppModuleIf::setPlaying( bool isPlaying )
{
if( m_pcDisplaySubWindow )
{
m_pcDisplaySubWindow->setPlaying( isPlaying );
}
}
bool CalypAppModuleIf::isRunning()
{
#ifdef CALYP_THREADED_MODULES
+1
View File
@@ -108,6 +108,7 @@ public:
ClpString moduleInfo() { return m_pcModule->moduleInfo(); }
void update( bool isPlaying );
bool apply( bool isPlaying = false, bool disableThreads = false );
void setPlaying( bool isPlaying );
bool isRunning();
void show();
void destroy();
+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;
}
+1
View File
@@ -127,6 +127,7 @@ public:
bool playEvent();
void stop();
void setPlaying( bool isPlaying );
bool isPlaying();
void seekAbsoluteEvent( unsigned int new_frame_num );
void seekRelativeEvent( bool bIsFoward );