init format guessing
This commit is contained in:
1 parent
abb3210432
commit
a7fb2db9ae
3 files changed
+8
-7
No files matched your search
@@ -117,17 +117,15 @@ QStringList InputStream::supportedWriteFormatsList()
|
||||
return formats;
|
||||
}
|
||||
|
||||
Bool InputStream::needFormatDialog( QString filename )
|
||||
Bool InputStream::guessFormat( QString filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rFrameRate )
|
||||
{
|
||||
Bool bRet = false;
|
||||
QString fileExtension = QFileInfo( filename ).completeSuffix();
|
||||
if( !fileExtension.compare( QString( "yuv" ) ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
bRet = true;
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
|
||||
Void InputStream::init( QString filename, UInt width, UInt height, Int input_format, UInt frame_rate )
|
||||
|
||||
@@ -100,6 +100,7 @@ public:
|
||||
};
|
||||
|
||||
Bool needFormatDialog( QString filename );
|
||||
Bool guessFormat( QString filename, UInt& rWidth, UInt& rHeight, Int& rInputFormat, UInt& rFrameRate );
|
||||
|
||||
Void init( QString filename, UInt width, UInt height, Int input_format, UInt frame_rate );
|
||||
Void close();
|
||||
|
||||
@@ -74,9 +74,11 @@ SubWindowHandle::~SubWindowHandle()
|
||||
|
||||
Bool SubWindowHandle::loadFile( const QString &fileName )
|
||||
{
|
||||
UInt Width, Height, rFrameRate;
|
||||
Int InputFormat;
|
||||
ConfigureFormatDialog formatDialog( this );
|
||||
|
||||
if( m_pCurrStream->needFormatDialog( fileName ) )
|
||||
if( m_pCurrStream->guessFormat( fileName, Width, Height, InputFormat, rFrameRate ) )
|
||||
{
|
||||
if( formatDialog.exec() == QDialog::Rejected )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user