Changes to start implement stream modules
This commit is contained in:
+31
-25
@@ -325,9 +325,9 @@ void ModulesHandle::activateModule()
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check for same fmt in more than one frame modules
|
||||
if( pcCurrAppModuleIf->m_pcModule->m_iModuleAPI == CLP_MODULE_API_1 )
|
||||
{
|
||||
// Check for same fmt in more than one frame modules
|
||||
for( int i = 1; i < videoSubWindowList.size(); i++ )
|
||||
{
|
||||
if( !videoSubWindowList.at( i )->getCurrFrame()->haveSameFmt( videoSubWindowList.at( 0 )->getCurrFrame() ) )
|
||||
@@ -369,28 +369,30 @@ void ModulesHandle::activateModule()
|
||||
}
|
||||
}
|
||||
|
||||
bool bShowModulesNewWindow = m_arrayActions[FORCE_NEW_WINDOW_ACT]->isChecked() | bTmpForceNewWindow;
|
||||
bool bRequiresWindow = ( pcCurrAppModuleIf->m_pcModule->m_uiModuleRequirements & CLP_MODULE_REQUIRES_NEW_WINDOW ) ||
|
||||
m_arrayActions[FORCE_NEW_WINDOW_ACT]->isChecked() ||
|
||||
bTmpForceNewWindow;
|
||||
|
||||
bool bRequiresDock = ( pcCurrAppModuleIf->m_pcModule->m_iModuleType == CLP_FRAME_MEASUREMENT_MODULE );
|
||||
|
||||
QString windowName;
|
||||
|
||||
VideoSubWindow* pcModuleSubWindow = NULL;
|
||||
if( pcCurrAppModuleIf->m_pcModule->m_iModuleType == CLP_FRAME_PROCESSING_MODULE )
|
||||
|
||||
if( bRequiresWindow )
|
||||
{
|
||||
if( ( pcCurrAppModuleIf->m_pcModule->m_uiModuleRequirements & CLP_MODULE_REQUIRES_NEW_WINDOW ) || bShowModulesNewWindow )
|
||||
{
|
||||
pcModuleSubWindow = new VideoSubWindow( VideoSubWindow::MODULE_SUBWINDOW );
|
||||
windowName.append( QStringLiteral( "Module " ) );
|
||||
windowName.append( pcCurrAppModuleIf->m_pcModule->m_pchModuleName );
|
||||
pcCurrAppModuleIf->m_pcDisplaySubWindow = pcModuleSubWindow;
|
||||
// connect( pcModuleSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), m_appModuleVideo,
|
||||
// SLOT( updateSelectionArea( QRect ) ) );
|
||||
// connect( pcModuleSubWindow, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), m_appModuleVideo,
|
||||
// SLOT( zoomToFactorAll( double, QPoint ) ) );
|
||||
// connect( pcModuleSubWindow, SIGNAL( scrollBarMoved_SWindow( const QPoint ) ), m_appModuleVideo,
|
||||
// SLOT( moveAllScrollBars( const QPoint ) ) );
|
||||
}
|
||||
pcModuleSubWindow = new VideoSubWindow( VideoSubWindow::MODULE_SUBWINDOW );
|
||||
windowName.append( QStringLiteral( "Module " ) );
|
||||
windowName.append( pcCurrAppModuleIf->m_pcModule->m_pchModuleName );
|
||||
pcCurrAppModuleIf->m_pcDisplaySubWindow = pcModuleSubWindow;
|
||||
// connect( pcModuleSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), m_appModuleVideo,
|
||||
// SLOT( updateSelectionArea( QRect ) ) );
|
||||
// connect( pcModuleSubWindow, SIGNAL( zoomFactorChanged_SWindow( const double, const QPoint ) ), m_appModuleVideo,
|
||||
// SLOT( zoomToFactorAll( double, QPoint ) ) );
|
||||
// connect( pcModuleSubWindow, SIGNAL( scrollBarMoved_SWindow( const QPoint ) ), m_appModuleVideo,
|
||||
// SLOT( moveAllScrollBars( const QPoint ) ) );
|
||||
}
|
||||
else if( pcCurrAppModuleIf->m_pcModule->m_iModuleType == CLP_FRAME_MEASUREMENT_MODULE )
|
||||
|
||||
if( bRequiresDock )
|
||||
{
|
||||
pcCurrAppModuleIf->m_pcDisplaySubWindow = NULL;
|
||||
pcCurrAppModuleIf->m_pcModuleDock = new ModuleHandleDock( m_pcParent, pcCurrAppModuleIf );
|
||||
@@ -420,20 +422,24 @@ void ModulesHandle::activateModule()
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<CalypFrame*> apcFrameList;
|
||||
for( int i = 0; i < videoSubWindowList.size(); i++ )
|
||||
{
|
||||
apcFrameList.push_back( pcCurrAppModuleIf->m_pcSubWindow[i]->getCurrFrame() );
|
||||
}
|
||||
|
||||
// Create Module
|
||||
bool moduleCreated = false;
|
||||
if( pcCurrAppModuleIf->m_pcModule->m_iModuleAPI == CLP_MODULE_API_2 )
|
||||
if( pcCurrAppModuleIf->m_pcModule->m_iModuleType == CLP_STREAM_PROCESSING_MODULE )
|
||||
{
|
||||
}
|
||||
else if( pcCurrAppModuleIf->m_pcModule->m_iModuleAPI == CLP_MODULE_API_2 )
|
||||
{
|
||||
std::vector<CalypFrame*> apcFrameList;
|
||||
for( int i = 0; i < videoSubWindowList.size(); i++ )
|
||||
{
|
||||
apcFrameList.push_back( pcCurrAppModuleIf->m_pcSubWindow[i]->getCurrFrame() );
|
||||
}
|
||||
moduleCreated = pcCurrAppModuleIf->m_pcModule->create( apcFrameList );
|
||||
}
|
||||
else if( pcCurrAppModuleIf->m_pcModule->m_iModuleAPI == CLP_MODULE_API_1 )
|
||||
{
|
||||
pcCurrAppModuleIf->m_pcModule->create( pcCurrAppModuleIf->m_pcSubWindow[0]->getCurrFrame() );
|
||||
pcCurrAppModuleIf->m_pcModule->create( apcFrameList[0] );
|
||||
moduleCreated = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user