Add option to show module info in the video window

This commit is contained in:
jfmcarreira committed 2018-07-24 20:39:18 +01:00
1 parent 58e975a681
commit def17102e5
3 files changed
+13 -5

No files matched your search

+1
View File
@@ -100,6 +100,7 @@ public:
CalypModuleIf* getModule() { return m_pcModule; }
unsigned int getModuleRequirements() { return m_pcModule->m_uiModuleRequirements; }
ClpString moduleInfo() { return m_pcModule->moduleInfo(); }
void update();
bool apply( bool isPlaying = false, bool disableThreads = false );
bool isRunning();
+10 -5
View File
@@ -227,6 +227,7 @@ void VideoSubWindow::keyPressEvent( QKeyEvent* event )
if( bRet )
{
refreshFrame();
updateVideoWindowInfo();
return;
}
}
@@ -388,21 +389,25 @@ void VideoSubWindow::updateVideoWindowInfo()
{
m_cStreamInformation = "Module";
QList<VideoSubWindow*> arraySubWindows = m_pcCurrentDisplayModule->getSubWindowList();
QStringList sourceWindowList;
QStringList windowInfoList;
if( arraySubWindows.size() > 0 )
{
for( int i = 0; i < arraySubWindows.size(); i++ )
{
if( arraySubWindows.at( i )->getWindowName() != getWindowName() )
{
sourceWindowList.append( QString( "Input %1 - " + arraySubWindows.at( i )->getWindowName() ).arg( i + 1 ) );
windowInfoList.append( QString( "Input %1 - " + arraySubWindows.at( i )->getWindowName() ).arg( i + 1 ) );
}
}
}
// qDebug( ) << sourceWindowList;
if( sourceWindowList.size() > 0 )
if( m_pcCurrentDisplayModule->getModuleRequirements() & CLP_MODULES_HAS_INFO )
{
m_pcVideoInfo->setInformationTopLeft( sourceWindowList );
windowInfoList.append( QString::fromStdString( m_pcCurrentDisplayModule->moduleInfo() ) );
}
// qDebug( ) << sourceWindowList;
if( windowInfoList.size() > 0 )
{
m_pcVideoInfo->setInformationTopLeft( windowInfoList );
}
}
else if( m_pCurrStream )
+2
View File
@@ -86,6 +86,7 @@ enum Module_Features
CLP_MODULE_REQUIRES_NEW_WINDOW = 4,
CLP_MODULE_USES_KEYS = 8,
CLP_MODULES_VARIABLE_NUM_FRAMES = 16,
CLP_MODULES_HAS_INFO = 32,
CLP_MODULE_REQURES_MAX = 1024,
};
@@ -147,6 +148,7 @@ public:
virtual CalypFrame* process( std::vector<CalypFrame*> ) { return NULL; }
virtual double measure( std::vector<CalypFrame*> ) { return 0; }
virtual bool keyPressed( enum Module_Key_Supported ) { return false; }
virtual ClpString moduleInfo() { return ClpString(); }
};
#endif // __CALYPMODULESIF_H__