diff --git a/app/PlaYUVerAppModuleIf.cpp b/app/PlaYUVerAppModuleIf.cpp index f87eec3..2de6c7b 100644 --- a/app/PlaYUVerAppModuleIf.cpp +++ b/app/PlaYUVerAppModuleIf.cpp @@ -58,6 +58,15 @@ Void PlaYUVerAppModuleIf::update() } } +Bool PlaYUVerAppModuleIf::isRunning() +{ +#ifdef PLAYUVER_THREADED_MODULES + return QThread::isRunning(); +#else + return false; +#endif +} + Bool PlaYUVerAppModuleIf::apply( Bool isPlaying, Bool disableThreads ) { Bool bRet = false; diff --git a/app/PlaYUVerAppModuleIf.h b/app/PlaYUVerAppModuleIf.h index 87c52af..da8bdc7 100644 --- a/app/PlaYUVerAppModuleIf.h +++ b/app/PlaYUVerAppModuleIf.h @@ -98,6 +98,7 @@ public: UInt getModuleRequirements() { return m_pcModule->m_uiModuleRequirements; } Void update(); Bool apply( Bool isPlaying = false, Bool disableThreads = false ); + Bool isRunning(); Void show(); Void destroy(); diff --git a/app/VideoSubWindow.cpp b/app/VideoSubWindow.cpp index e76b94b..6f84f19 100644 --- a/app/VideoSubWindow.cpp +++ b/app/VideoSubWindow.cpp @@ -639,6 +639,20 @@ Void VideoSubWindow::associateModule( PlaYUVerAppModuleIf* pcModule ) m_apcCurrentModule.append( pcModule ); } +Bool VideoSubWindow::hasRunningModule() +{ + Bool bRet = false; + if( m_pcCurrentDisplayModule ) + { + bRet |= m_pcCurrentDisplayModule->isRunning(); + } + for( Int i = 0; i < m_apcCurrentModule.size() && !bRet; i++ ) + { + bRet |= m_apcCurrentModule.at( i )->isRunning(); + } + return bRet; +} + Void VideoSubWindow::setFillWindow( Bool bFlag ) { m_pcVideoInfo->setBusyWindow( bFlag ); diff --git a/app/VideoSubWindow.h b/app/VideoSubWindow.h index 913ae2c..1b08e8a 100644 --- a/app/VideoSubWindow.h +++ b/app/VideoSubWindow.h @@ -100,25 +100,6 @@ private: QFuture m_cRefreshResult; QFuture m_cReadResult; - Void refreshFrameOperation(); - Bool goToNextFrame( Bool bThreaded = false ); - - static Bool guessFormat( QString filename, - UInt& rWidth, - UInt& rHeight, - Int& rInputFormat, - UInt& rBitsPerPixel, - Int& rEndianness ); - - /** - * Private zoom function to handle - * zoom to fit - */ - Void scaleView( const QSize& size, QPoint center = QPoint() ); - Void updateVideoWindowInfo(); - - QSize getScrollSize(); - public: enum VideoSubWindowCategories { @@ -201,6 +182,28 @@ public: Void clearWindowBusy() { m_bWindowBusy = false; } Void setFillWindow( Bool bFlag ); +private: + Void refreshFrameOperation(); + Bool goToNextFrame( Bool bThreaded = false ); + + static Bool guessFormat( QString filename, + UInt& rWidth, + UInt& rHeight, + Int& rInputFormat, + UInt& rBitsPerPixel, + Int& rEndianness ); + + Bool hasRunningModule(); + + /** + * Private zoom function to handle + * zoom to fit + */ + Void scaleView( const QSize& size, QPoint center = QPoint() ); + Void updateVideoWindowInfo(); + + QSize getScrollSize(); + protected: Void keyPressEvent( QKeyEvent* event ); Void resizeEvent( QResizeEvent* event );