add qcif format support and frame rate guessing on opening sequence
This commit is contained in:
+16
-2
@@ -322,7 +322,7 @@ bool VideoSubWindow::loadFile( QString cFilename, bool bForceDialog )
|
||||
m_pCurrStream = new CalypStream;
|
||||
}
|
||||
|
||||
bool bConfig = guessFormat( cFilename, Width, Height, InputFormat, BitsPel, Endianness ) || bForceDialog;
|
||||
bool bConfig = guessFormat( cFilename, Width, Height, InputFormat, BitsPel, Endianness, FrameRate ) || bForceDialog;
|
||||
bool bRet = false;
|
||||
for( int iPass = 0; iPass < 2 && !bRet; iPass++ )
|
||||
{
|
||||
@@ -435,7 +435,7 @@ void VideoSubWindow::updateVideoWindowInfo()
|
||||
}
|
||||
|
||||
bool VideoSubWindow::guessFormat( QString filename, unsigned int& rWidth, unsigned int& rHeight, int& rInputFormat, unsigned int& rBitsPerPixel,
|
||||
int& rEndianness )
|
||||
int& rEndianness, unsigned int& rFrameRate )
|
||||
{
|
||||
std::vector<CalypStandardResolution> stdResList = CalypStream::stdResolutionSizes();
|
||||
bool bGuessed = true;
|
||||
@@ -542,6 +542,20 @@ bool VideoSubWindow::guessFormat( QString filename, unsigned int& rWidth, unsign
|
||||
}
|
||||
}
|
||||
|
||||
// Guess frame rate - match %dbpp
|
||||
QRegularExpressionMatch FpsMatch = QRegularExpression( "_\\d*fps" ).match( FilenameShort );
|
||||
if( FpsMatch.hasMatch() )
|
||||
{
|
||||
QString matchString = FpsMatch.captured( 0 );
|
||||
matchString.remove( "_" );
|
||||
matchString.remove( "fps" );
|
||||
rFrameRate = matchString.toUInt();
|
||||
if( rFrameRate < 0 )
|
||||
{
|
||||
rFrameRate = 30;
|
||||
}
|
||||
}
|
||||
|
||||
// Guess Endianness
|
||||
if( FilenameShort.contains( QStringLiteral( "be" ), Qt::CaseInsensitive ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user