From c0e1dcd4601233d4cf4dd2882f813942927ca972 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Wed, 25 Mar 2015 01:19:05 +0000 Subject: [PATCH] Change DialogSubWindowSelector in order to use check boxes --- app/DialogSubWindowSelector.cpp | 199 ++++++++++++-------------------- app/DialogSubWindowSelector.h | 25 +++- app/ModulesHandle.cpp | 17 +-- app/QualityHandle.cpp | 33 ------ app/QualityHandle.h | 2 - app/VideoHandle.cpp | 14 +-- modules/PlaYUVerModuleIf.h | 6 +- tools/PlaYUVerTools.cpp | 8 ++ 8 files changed, 114 insertions(+), 190 deletions(-) diff --git a/app/DialogSubWindowSelector.cpp b/app/DialogSubWindowSelector.cpp index 0b7d191..d36876a 100644 --- a/app/DialogSubWindowSelector.cpp +++ b/app/DialogSubWindowSelector.cpp @@ -22,6 +22,8 @@ * \brief Dialog box to select sub windows */ +#include +#include #include "PlaYUVerSubWindowHandle.h" #include "DialogSubWindowSelector.h" #include "VideoSubWindow.h" @@ -29,83 +31,58 @@ namespace plaYUVer { -DialogSubWindowSelector::DialogSubWindowSelector( QWidget *parent, PlaYUVerSubWindowHandle *windowManager, UInt uiCategory, Int minWindowsSelected, Int maxWindowsSelected ) : +DialogSubWindowSelector::DialogSubWindowSelector( QWidget *parent, PlaYUVerSubWindowHandle *windowManager, UInt uiCategory, Int minWindowsSelected, + Int maxWindowsSelected ) : QDialog( parent ), m_uiCategory( uiCategory ), m_iMinSelectedWindows( minWindowsSelected ), m_iMaxSlectedWindows( maxWindowsSelected ), m_pcMainWindowManager( windowManager ) { - QFont titleFont, menusFont; - - titleFont.setPointSize( 14 ); - titleFont.setBold( true ); - titleFont.setWeight( 75 ); - - menusFont.setBold( true ); - menusFont.setWeight( 75 ); QSize windowSize( 350, 80 ); resize( windowSize ); - setWindowTitle( "Sub Windows Selection" ); + setWindowTitle( "Select desired Sub-Windows" ); - QHBoxLayout* MainLayout = new QHBoxLayout( this ); + QVBoxLayout* mainLayout = new QVBoxLayout( this ); - // Window list and add button - m_comboBoxWindowList = new QComboBox(); - QSizePolicy sizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ); - sizePolicy.setHorizontalStretch( 0 ); - sizePolicy.setVerticalStretch( 0 ); - sizePolicy.setHeightForWidth( m_comboBoxWindowList->sizePolicy().hasHeightForWidth() ); - m_comboBoxWindowList->setSizePolicy( sizePolicy ); - m_comboBoxWindowList->setAcceptDrops( true ); + minWindowsSelected = minWindowsSelected == 0 ? 1 : minWindowsSelected; + + m_pcGroupCheckBox = new QGroupBox( tr( "Exclusive Radio Buttons" ) ); + m_pcGroupCheckBox->setLayout( new QVBoxLayout() ); + + mainLayout->addWidget( m_pcGroupCheckBox ); - m_pushButtonAdd = new QPushButton( "Add", this ); m_pushButtonAddAll = new QPushButton( "Add all", this ); - m_pushButtonRemove = new QPushButton( "Remove", this ); m_pushButtonRemoveAll = new QPushButton( "Remove All", this ); - m_pushButtonRemove->setEnabled( false ); m_pushButtonRemoveAll->setEnabled( false ); - // Selected Sub Window List - m_listSelectedWindows = new QListWidget( this ); - // Confirmation buttons m_pushButtonOkCancel = new QDialogButtonBox(); m_pushButtonOkCancel->setStandardButtons( QDialogButtonBox::Cancel | QDialogButtonBox::Ok ); - m_pushButtonOkCancel->setOrientation( Qt::Vertical ); + m_pushButtonOkCancel->setOrientation( Qt::Horizontal ); m_pushButtonOkCancel->setCenterButtons( false ); m_pushButtonOkCancel->buttons().at( 0 )->setEnabled( false ); - // Create Layouts - QVBoxLayout* LeftVLayout = new QVBoxLayout(); - LeftVLayout->addWidget( m_comboBoxWindowList ); - //LeftVLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); - LeftVLayout->addWidget( m_listSelectedWindows ); - - QVBoxLayout* RightVLayout = new QVBoxLayout(); - RightVLayout->addWidget( m_pushButtonAdd ); - RightVLayout->addWidget( m_pushButtonAddAll ); - RightVLayout->addWidget( m_pushButtonRemove ); - RightVLayout->addWidget( m_pushButtonRemoveAll ); - RightVLayout->addItem( new QSpacerItem( 40, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); - RightVLayout->addWidget( m_pushButtonOkCancel ); + QHBoxLayout* BottomHLayout = new QHBoxLayout(); + BottomHLayout->addWidget( m_pushButtonAddAll ); + BottomHLayout->addWidget( m_pushButtonRemoveAll ); + BottomHLayout->addWidget( m_pushButtonOkCancel ); // Add components - //MainLayout->addItem( new QSpacerItem( 10, 5, QSizePolicy::Expanding, QSizePolicy::Fixed ) ); - MainLayout->addLayout( LeftVLayout ); - MainLayout->addLayout( RightVLayout ); + mainLayout->addLayout( BottomHLayout ); - setLayout( MainLayout ); + setLayout( mainLayout ); // Create actions connect( m_pushButtonOkCancel, SIGNAL( accepted() ), this, SLOT( accept() ) ); connect( m_pushButtonOkCancel, SIGNAL( rejected() ), this, SLOT( reject() ) ); - connect( m_pushButtonAdd, SIGNAL( clicked() ), this, SLOT( addSubWindow() ) ); + connect( m_pushButtonAddAll, SIGNAL( clicked() ), this, SLOT( addAllSubWindow() ) ); - connect( m_pushButtonRemove, SIGNAL( clicked() ), this, SLOT( removeSubWindow() ) ); connect( m_pushButtonRemoveAll, SIGNAL( clicked() ), this, SLOT( removeAllSubWindow() ) ); - QMetaObject::connectSlotsByName( this ); + + m_mapperWindowsList = new QSignalMapper( this ); + connect( m_mapperWindowsList, SIGNAL( mapped(int) ), this, SLOT( toggleSubWindow(int) ) ); updateSubWindowList(); } @@ -115,49 +92,58 @@ Void DialogSubWindowSelector::updateSubWindowList() SubWindowHandle *subWindow; QString currSubWindowName; m_pcWindowListNames.clear(); - QList subWindowList = m_pcMainWindowManager->findSubWindow( m_uiCategory ); - for( Int i = 0; i < subWindowList.size(); i++ ) + m_apcSubWindowList = m_pcMainWindowManager->findSubWindow( m_uiCategory ); + + QCheckBox* windowCheckBox; + + for( Int i = 0; i < m_apcSubWindowList.size(); i++ ) { - subWindow = subWindowList.at( i ); + subWindow = m_apcSubWindowList.at( i ); currSubWindowName = subWindow->getWindowName(); - if( !m_pcSelectedWindowListNames.contains( currSubWindowName ) ) - m_pcWindowListNames.append( currSubWindowName ); + windowCheckBox = new QCheckBox( currSubWindowName, this ); + connect( windowCheckBox, SIGNAL( stateChanged(int) ), m_mapperWindowsList, SLOT( map() ) ); + m_mapperWindowsList->setMapping( windowCheckBox, i ); + m_pcGroupCheckBox->layout()->addWidget( windowCheckBox ); + m_apcWindowsListCheckBox.append( windowCheckBox ); } - m_comboBoxWindowList->clear(); - m_comboBoxWindowList->insertItems( 0, m_pcWindowListNames ); - m_comboBoxWindowList->setCurrentIndex( -1 ); - Bool enableAddAll = true; +} - if( m_iMaxSlectedWindows >= 0 ) +Void DialogSubWindowSelector::selectSubWindow( SubWindowHandle* subWindow ) +{ + Int iIdx = m_apcSubWindowList.indexOf( subWindow ); + if( iIdx >= 0 ) { - if( m_pcSelectedWindowListNames.size() >= m_iMaxSlectedWindows ) - { - m_pushButtonAdd->setEnabled( false ); - } - else - { - m_pushButtonAdd->setEnabled( true ); - } - if( m_pcWindowListNames.size() > m_iMaxSlectedWindows ) - { - enableAddAll = false; - } + m_apcWindowsListCheckBox.at( iIdx )->setChecked( true ); + m_apcSelectedSubWindowList.append( m_apcSubWindowList.at( iIdx ) ); } - m_pushButtonAddAll->setEnabled( enableAddAll ); +} - if( m_pcSelectedWindowListNames.size() > 0 ) +// ----------------------- Slot Functions ----------------------- + +Void DialogSubWindowSelector::toggleSubWindow( Int idx ) +{ + Bool isChecked = m_apcWindowsListCheckBox.at( idx )->isChecked(); + + if( isChecked ) + { + m_apcSelectedSubWindowList.append( m_apcSubWindowList.at( idx ) ); + } + else + { + m_apcSelectedSubWindowList.removeOne( m_apcSubWindowList.at( idx ) ); + } + + if( m_apcSelectedSubWindowList.size() > 0 ) { - m_pushButtonRemove->setEnabled( true ); m_pushButtonRemoveAll->setEnabled( true ); } else { - m_pushButtonRemove->setEnabled( false ); m_pushButtonRemoveAll->setEnabled( false ); } - if( m_pcSelectedWindowListNames.size() >= m_iMinSelectedWindows ) + if( m_apcSelectedSubWindowList.size() >= m_iMinSelectedWindows ) { m_pushButtonOkCancel->buttons().at( 0 )->setEnabled( true ); } @@ -166,68 +152,35 @@ Void DialogSubWindowSelector::updateSubWindowList() m_pushButtonOkCancel->buttons().at( 0 )->setEnabled( false ); } -} - -Void DialogSubWindowSelector::setSubWindowList( QStringList cWindowListNames ) -{ - m_pcSelectedWindowListNames = cWindowListNames; - m_listSelectedWindows->clear(); - m_listSelectedWindows->insertItems( 0, cWindowListNames ); - updateSubWindowList(); -} - -// ----------------------- Slot Functions ----------------------- - -Void DialogSubWindowSelector::addSubWindow() -{ - Int iSelectedIdx = m_comboBoxWindowList->currentIndex(); - if( iSelectedIdx >= 0 ) + if( m_iMaxSlectedWindows > 0 ) { - m_pcSelectedWindowListNames.append( m_pcWindowListNames.at( iSelectedIdx ) ); - m_listSelectedWindows->clear(); - m_listSelectedWindows->insertItems( 0, m_pcSelectedWindowListNames ); - updateSubWindowList(); + if( m_apcSelectedSubWindowList.size() >= m_iMaxSlectedWindows ) + { + m_pcGroupCheckBox->setEnabled( false ); + } + else + { + m_pcGroupCheckBox->setEnabled( true ); + } } } Void DialogSubWindowSelector::addAllSubWindow() { - if( m_iMaxSlectedWindows <= 0 || m_pcWindowListNames.size() <= m_iMaxSlectedWindows ) + for( Int i = 0; i < m_apcWindowsListCheckBox.size(); i++ ) { - for( Int i = 0; i < m_pcWindowListNames.size(); i++ ) - { - m_pcSelectedWindowListNames.append( m_pcWindowListNames.at( i ) ); - } - m_listSelectedWindows->clear(); - m_listSelectedWindows->insertItems( 0, m_pcSelectedWindowListNames ); - updateSubWindowList(); - } -} - -Void DialogSubWindowSelector::removeSubWindow() -{ - QList selectedWindows = m_listSelectedWindows->selectedItems(); - if( selectedWindows.size() ) - { - for( Int i = 0; i < selectedWindows.size(); i++ ) - { - QString currName = selectedWindows.at( i )->text(); - Int indexCurrName = m_pcSelectedWindowListNames.indexOf( currName ); - m_pcSelectedWindowListNames.removeAt( indexCurrName ); - m_listSelectedWindows->removeItemWidget( selectedWindows[i] ); - } - m_listSelectedWindows->clear(); - m_listSelectedWindows->insertItems( 0, m_pcSelectedWindowListNames ); - updateSubWindowList(); + m_apcWindowsListCheckBox.at( i )->setChecked( true ); + m_apcSelectedSubWindowList.append( m_apcSubWindowList.at( i ) ); } } Void DialogSubWindowSelector::removeAllSubWindow() { - QList selectedWindows = m_listSelectedWindows->selectedItems(); - m_listSelectedWindows->clear(); - m_pcSelectedWindowListNames.clear(); - updateSubWindowList(); + for( Int i = 0; i < m_apcWindowsListCheckBox.size(); i++ ) + { + m_apcWindowsListCheckBox.at( i )->setChecked( false ); + } + m_apcSelectedSubWindowList.clear(); } } // Namespace SCode diff --git a/app/DialogSubWindowSelector.h b/app/DialogSubWindowSelector.h index 3779826..704ddef 100644 --- a/app/DialogSubWindowSelector.h +++ b/app/DialogSubWindowSelector.h @@ -34,13 +34,19 @@ #endif #include +#include + class QPixmap; class QColor; +class QCheckBox; +class QGroupBox; namespace plaYUVer { class PlaYUVerSubWindowHandle; +class SubWindowHandle; + /** * Class to define the dialog box to select sub windows * This class enable the selection of several group of windows @@ -50,18 +56,26 @@ class DialogSubWindowSelector: public QDialog Q_OBJECT public: - DialogSubWindowSelector( QWidget *parent, PlaYUVerSubWindowHandle *windowManager, UInt uiCategory, Int minWindowsSelected = 0, Int maxWindowsSelected = -1 ); + DialogSubWindowSelector( QWidget *parent, PlaYUVerSubWindowHandle *windowManager, UInt uiCategory, Int minWindowsSelected = 1, Int maxWindowsSelected = -1 ); - Void setSubWindowList( QStringList cWindowListNames ); - QStringList getSelectedWindows() + Void selectSubWindow( SubWindowHandle* subWindow ); + QList getSelectedWindows() { - return m_pcSelectedWindowListNames; + return m_apcSelectedSubWindowList; } private: UInt m_uiCategory; Int m_iMinSelectedWindows; Int m_iMaxSlectedWindows; PlaYUVerSubWindowHandle* m_pcMainWindowManager; + + QList m_apcSubWindowList; + QList m_apcSelectedSubWindowList; + + QSignalMapper* m_mapperWindowsList; + QGroupBox* m_pcGroupCheckBox; + QVector m_apcWindowsListCheckBox; + QStringList m_pcWindowListNames; QStringList m_pcSelectedWindowListNames; @@ -76,9 +90,8 @@ private: Void updateSubWindowList(); private Q_SLOTS: - void addSubWindow(); + void toggleSubWindow( int ); void addAllSubWindow(); - void removeSubWindow(); void removeAllSubWindow(); }; diff --git a/app/ModulesHandle.cpp b/app/ModulesHandle.cpp index 35c4791..aeb7503 100644 --- a/app/ModulesHandle.cpp +++ b/app/ModulesHandle.cpp @@ -255,21 +255,14 @@ Void ModulesHandle::enableModuleIf( PlaYUVerAppModuleIf *pcCurrModuleIf ) DialogSubWindowSelector dialogWindowsSelection( m_pcParent, m_pcMainWindowManager, SubWindowHandle::VIDEO_SUBWINDOW, numberOfFrames, numberOfFrames ); if( dialogWindowsSelection.exec() == QDialog::Accepted ) { - QStringList selectedWindows = dialogWindowsSelection.getSelectedWindows(); VideoSubWindow *videoSubWindow; - QList subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowHandle::VIDEO_SUBWINDOW ); - for( Int j = 0; j < selectedWindows.size(); j++ ) + QList subWindowList = dialogWindowsSelection.getSelectedWindows(); + for( Int i = 0; i < subWindowList.size(); i++ ) { - for( Int i = 0; i < subWindowList.size(); i++ ) - { - videoSubWindow = qobject_cast( subWindowList.at( i ) ); - if( videoSubWindow->getWindowName() == selectedWindows.at( j ) ) - { - videoSubWindowList.append( videoSubWindow ); - pcCurrModuleIf->m_pcSubWindow[j] = videoSubWindow; - } - } + videoSubWindow = qobject_cast( subWindowList.at( i ) ); + videoSubWindowList.append( videoSubWindow ); } + } // Check for same fmt in more than one frame modules for( Int i = 1; i < videoSubWindowList.size(); i++ ) diff --git a/app/QualityHandle.cpp b/app/QualityHandle.cpp index 550f622..ba4f630 100644 --- a/app/QualityHandle.cpp +++ b/app/QualityHandle.cpp @@ -70,8 +70,6 @@ Void QualityHandle::createActions() m_arrayActions[SELECT_CURR_REF_ACT] = new QAction( "Mark as Reference", this ); connect( m_arrayActions[SELECT_CURR_REF_ACT], SIGNAL( triggered() ), this, SLOT( slotSelectCurrentAsReference() ) ); - m_arrayActions[SELECT_REF_ACT] = new QAction( "Select Reference", this ); - connect( m_arrayActions[SELECT_REF_ACT], SIGNAL( triggered() ), this, SLOT( slotSelectReference() ) ); m_arrayActions[PLOT_QUALITY] = new QAction( "Plot Window's Quality", this ); connect( m_arrayActions[PLOT_QUALITY], SIGNAL( triggered() ), this, SLOT( slotPlotQualitySingle() ) ); @@ -85,7 +83,6 @@ QMenu* QualityHandle::createMenu() m_pcSubMenuQualityMetrics = m_pcMenuQuality->addMenu( "Quality Metrics" ); m_pcSubMenuQualityMetrics->addActions( m_actionGroupQualityMetric->actions() ); m_pcMenuQuality->addAction( m_arrayActions[SELECT_CURR_REF_ACT] ); - //m_pcMenuQuality->addAction( m_arrayActions[SELECT_REF_ACT] ); m_pcMenuQuality->addSeparator(); m_pcMenuQuality->addAction( m_arrayActions[PLOT_QUALITY] ); m_pcMenuQuality->addAction( m_arrayActions[PLOT_SEVERAL_QUALITY] ); @@ -114,7 +111,6 @@ Void QualityHandle::updateMenus() m_pcSubMenuQualityMetrics->setEnabled( hasSubWindow ); m_arrayActions[SELECT_CURR_REF_ACT]->setEnabled( hasSubWindow ); - m_arrayActions[SELECT_REF_ACT]->setEnabled( hasSubWindow ); m_arrayActions[PLOT_QUALITY]->setEnabled( hasSubWindow ); m_arrayActions[PLOT_SEVERAL_QUALITY]->setEnabled( hasSubWindow ); @@ -250,35 +246,6 @@ Void QualityHandle::slotSelectCurrentAsReference() } } -Void QualityHandle::slotSelectReference() -{ - DialogSubWindowSelector dialogWindowSelection( this, m_pcMainWindowManager, SubWindowHandle::VIDEO_SUBWINDOW, 1, 1 ); - if( dialogWindowSelection.exec() == QDialog::Accepted ) - { - VideoSubWindow* pcVideoSubWindow; - VideoSubWindow* pcRefSubWindow = NULL; - QStringList selectedWindows = dialogWindowSelection.getSelectedWindows(); - QList subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowHandle::VIDEO_SUBWINDOW ); - for( Int i = 0; i < subWindowList.size(); i++ ) - { - pcVideoSubWindow = qobject_cast( subWindowList.at( i ) ); - if( pcVideoSubWindow->getWindowName() == selectedWindows.at( 0 ) ) - { - pcRefSubWindow = pcVideoSubWindow; - break; - } - } - for( Int i = 0; i < subWindowList.size(); i++ ) - { - pcVideoSubWindow = qobject_cast( subWindowList.at( i ) ); - if( pcVideoSubWindow != pcRefSubWindow ) - pcVideoSubWindow->setRefSubWindow( pcRefSubWindow ); - } - m_pcQualityHandleSideBar->updateSidebarData(); - m_pcQualityHandleDock->show(); - } -} - Void QualityHandle::slotPlotQualitySingle() { VideoSubWindow* pcSubWindow = qobject_cast( m_pcMainWindowManager->activeSubWindow() ); diff --git a/app/QualityHandle.h b/app/QualityHandle.h index 663c59e..e1bc0b4 100644 --- a/app/QualityHandle.h +++ b/app/QualityHandle.h @@ -66,7 +66,6 @@ private: enum { SELECT_CURR_REF_ACT, - SELECT_REF_ACT, PLOT_QUALITY, PLOT_SEVERAL_QUALITY, TOTAL_ACT, @@ -91,7 +90,6 @@ Q_SIGNALS: private Q_SLOTS: void slotQualityMetricChanged( int ); void slotSelectCurrentAsReference(); - void slotSelectReference(); void slotPlotQualitySingle(); void slotPlotQualitySeveral(); }; diff --git a/app/VideoHandle.cpp b/app/VideoHandle.cpp index 0ae2ea5..e06a4ac 100644 --- a/app/VideoHandle.cpp +++ b/app/VideoHandle.cpp @@ -574,25 +574,17 @@ Void VideoHandle::videoSelectionButtonEvent() QStringList cWindowListNames; for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ ) { - cWindowListNames.append( m_acPlayingSubWindows.at( i )->getWindowName() ); - dialogWindowsSelection.setSubWindowList( cWindowListNames ); + dialogWindowsSelection.selectSubWindow( m_acPlayingSubWindows.at( i ) ); } if( dialogWindowsSelection.exec() == QDialog::Accepted ) { - QStringList selectedWindows = dialogWindowsSelection.getSelectedWindows(); m_acPlayingSubWindows.clear(); VideoSubWindow *videoSubWindow; - QString windowName; - QList subWindowList = m_pcMainWindowManager->findSubWindow( SubWindowHandle::VIDEO_STREAM_SUBWINDOW ); + QList subWindowList = dialogWindowsSelection.getSelectedWindows(); for( Int i = 0; i < subWindowList.size(); i++ ) { videoSubWindow = qobject_cast( subWindowList.at( i ) ); - windowName = videoSubWindow->getWindowName(); - if( selectedWindows.contains( windowName ) ) - { - m_acPlayingSubWindows.append( videoSubWindow ); - videoSubWindow->seekAbsoluteEvent( m_acPlayingSubWindows.at( 0 )->getInputStream()->getCurrFrameNum() ); - } + m_acPlayingSubWindows.append( videoSubWindow ); } if( m_acPlayingSubWindows.size() > 0 ) { diff --git a/modules/PlaYUVerModuleIf.h b/modules/PlaYUVerModuleIf.h index 227374e..527bbda 100644 --- a/modules/PlaYUVerModuleIf.h +++ b/modules/PlaYUVerModuleIf.h @@ -57,9 +57,9 @@ enum Module_NumberOfFrames enum Module_Requirements { MODULE_REQUIRES_NOTHING = 0, - MODULE_REQUIRES_SKIP_WHILE_PLAY = 2, - MODULE_REQUIRES_OPTIONS = 4, - MODULE_REQUIRES_NEW_WINDOW = 6, + MODULE_REQUIRES_SKIP_WHILE_PLAY = 1, + MODULE_REQUIRES_OPTIONS = 2, + MODULE_REQUIRES_NEW_WINDOW = 4, }; class PlaYUVerModuleIf diff --git a/tools/PlaYUVerTools.cpp b/tools/PlaYUVerTools.cpp index d9a9c3b..2da3fbf 100644 --- a/tools/PlaYUVerTools.cpp +++ b/tools/PlaYUVerTools.cpp @@ -301,6 +301,10 @@ PlaYUVerFrame* PlaYUVerTools::applyFrameModule() case MODULE_REQUIRES_TWO_FRAMES: pcProcessedFrame = m_pcCurrModuleIf->process( m_apcInputStreams[0]->getCurrFrame(), m_apcInputStreams[1]->getCurrFrame() ); break; + case MODULE_REQUIRES_THREE_FRAMES: + pcProcessedFrame = m_pcCurrModuleIf->process( m_apcInputStreams[0]->getCurrFrame(), m_apcInputStreams[1]->getCurrFrame(), + m_apcInputStreams[2]->getCurrFrame() ); + break; } } return pcProcessedFrame; @@ -338,6 +342,10 @@ Int PlaYUVerTools::ModuleOperation() case MODULE_REQUIRES_TWO_FRAMES: dMeasurementResult = m_pcCurrModuleIf->measure( m_apcInputStreams[0]->getCurrFrame(), m_apcInputStreams[1]->getCurrFrame() ); break; + case MODULE_REQUIRES_THREE_FRAMES: + dMeasurementResult = m_pcCurrModuleIf->measure( m_apcInputStreams[0]->getCurrFrame(), m_apcInputStreams[1]->getCurrFrame(), + m_apcInputStreams[2]->getCurrFrame() ); + break; } m_cCmdLineHandler.log( CommandLineHandle::INFO, " %3d", frame ); m_cCmdLineHandler.log( CommandLineHandle::RESULT, " %8.3f \n", dMeasurementResult );