diff --git a/source/app/ModulesHandle.cpp b/source/app/ModulesHandle.cpp index 6747086..22116e3 100644 --- a/source/app/ModulesHandle.cpp +++ b/source/app/ModulesHandle.cpp @@ -172,10 +172,10 @@ Void ModulesHandle::destroyAllModulesIf() } } -PlaYUVerFrame* ModulesHandle::applyModuleIf( PlaYUVerModuleIf *pcCurrModuleIf ) +Bool ModulesHandle::applyModuleIf( PlaYUVerModuleIf *pcCurrModuleIf ) { PlaYUVerFrame* processedFrame = NULL; - + Bool bRet = false; switch( pcCurrModuleIf->m_cModuleDef.m_uiNumberOfFrames ) { case MODULE_REQUIRES_ONE_FRAME: @@ -190,10 +190,15 @@ PlaYUVerFrame* ModulesHandle::applyModuleIf( PlaYUVerModuleIf *pcCurrModuleIf ) break; } if( pcCurrModuleIf->m_pcDisplaySubWindow ) + { pcCurrModuleIf->m_pcDisplaySubWindow->setCurrFrame( processedFrame ); + bRet = true; + } else + { pcCurrModuleIf->m_pcSubWindow[0]->setCurrFrame( processedFrame ); - return processedFrame; + } + return bRet; } QMenu* ModulesHandle::createMenus( QMenuBar *MainAppMenuBar ) diff --git a/source/app/ModulesHandle.h b/source/app/ModulesHandle.h index d5c4edd..5ed1746 100644 --- a/source/app/ModulesHandle.h +++ b/source/app/ModulesHandle.h @@ -55,7 +55,7 @@ public: Void updateMenus( Bool hasSubWindow ); SubWindowHandle* toggleSelectedModuleIf(); - static PlaYUVerFrame* applyModuleIf( PlaYUVerModuleIf* pcCurrModuleIf ); + static Bool applyModuleIf( PlaYUVerModuleIf* pcCurrModuleIf ); static Void destroyModuleIf( PlaYUVerModuleIf* pcCurrModuleIf ); private: diff --git a/source/app/SubWindowHandle.cpp b/source/app/SubWindowHandle.cpp index 0799795..bded3e4 100644 --- a/source/app/SubWindowHandle.cpp +++ b/source/app/SubWindowHandle.cpp @@ -143,14 +143,15 @@ Void SubWindowHandle::setCurrFrame( PlaYUVerFrame* pcCurrFrame ) Void SubWindowHandle::refreshFrame() { + Bool bSetFrame = true; if( m_pCurrStream ) { m_pcCurrFrame = m_pCurrStream->getCurrFrame(); if( m_pcCurrentModule ) { - ModulesHandle::applyModuleIf( m_pcCurrentModule ); + bSetFrame = ModulesHandle::applyModuleIf( m_pcCurrentModule ); } - else + if( bSetFrame ) { m_cViewArea->setImage( m_pcCurrFrame ); }