Support for variable number of inputs

This commit is contained in:
2019-05-28 18:55:34 +01:00
parent 2adfd28e48
commit b36bbeef7a
2 changed files with 15 additions and 2 deletions
+13 -1
View File
@@ -311,7 +311,7 @@ bool VideoSubWindow::loadFile( QString cFilename, bool bForceDialog )
{
ConfigureFormatDialog formatDialog( this );
unsigned int Width = 0, Height = 0, BitsPel = 8, FrameRate = 30;
int Endianness = CLP_BIG_ENDIAN;
int Endianness = CLP_LITTLE_ENDIAN;
int InputFormat = CLP_YUV420P;
if( m_pCurrStream )
@@ -550,6 +550,18 @@ bool VideoSubWindow::guessFormat( QString filename, unsigned int& rWidth, unsign
rBitsPerPixel = -1;
}
}
// QRegularExpressionMatch BppOnlybMatch = QRegularExpression( "_\\d*b" ).match( FilenameShort );
// if( BppOnlybMatch.hasMatch() )
// {
// QString matchString = BppOnlybMatch.captured( BppMatch.lastCapturedIndex() );
// matchString.remove( "_" );
// matchString.remove( "bpp" );
// rBitsPerPixel = matchString.toUInt();
// if( !( rBitsPerPixel > 0 && rBitsPerPixel < 16 ) )
// {
// rBitsPerPixel = -1;
// }
// }
// Guess frame rate - match %dbpp
QRegularExpressionMatch FpsMatch = QRegularExpression( "_\\d*fps" ).match( FilenameShort );
+2 -1
View File
@@ -324,7 +324,8 @@ int CalypTools::Open( int argc, char* argv[] )
return -1;
}
if( m_apcInputStreams.size() != m_pcCurrModuleIf->m_uiNumberOfFrames )
if( !(m_pcCurrModuleIf->m_uiModuleRequirements & CLP_MODULES_VARIABLE_NUM_FRAMES) &&
m_apcInputStreams.size() != m_pcCurrModuleIf->m_uiNumberOfFrames )
{
log( CLP_LOG_ERROR, "Invalid number of inputs! " );
return -1;