Change errors messages and include StreamHandler name

This commit is contained in:
2017-12-04 18:54:12 +00:00
parent e5825b602f
commit 7280d26fab
8 changed files with 73 additions and 87 deletions
+15 -17
View File
@@ -316,22 +316,19 @@ Bool VideoSubWindow::loadFile( QString cFilename, Bool bForceDialog )
}
}
try
{
m_pCurrStream->open( cFilename.toStdString(), Width, Height, InputFormat, BitsPel, Endianness, FrameRate, true );
}
catch( ... )
{
if( formatDialog.runConfigureFormatDialog( QFileInfo( cFilename ).fileName(), Width, Height,
InputFormat, BitsPel, Endianness,
FrameRate ) == QDialog::Rejected )
{
return false;
}
m_pCurrStream->open( cFilename.toStdString(), Width, Height, InputFormat, BitsPel,
Endianness,
FrameRate, true );
}
try
{
m_pCurrStream->open( cFilename.toStdString(), Width, Height, InputFormat, BitsPel, Endianness, FrameRate, true );
}
catch( ... )
{
if( formatDialog.runConfigureFormatDialog( QFileInfo( cFilename ).fileName(), Width, Height, InputFormat, BitsPel, Endianness, FrameRate ) ==
QDialog::Rejected )
{
return false;
}
m_pCurrStream->open( cFilename.toStdString(), Width, Height, InputFormat, BitsPel, Endianness, FrameRate, true );
}
m_sStreamInfo.m_cFilename = cFilename;
m_sStreamInfo.m_uiWidth = Width;
@@ -433,7 +430,8 @@ Bool VideoSubWindow::guessFormat( QString filename, UInt& rWidth, UInt& rHeight,
{
return false;
}
if( !fileExtension.compare( "yuv", Qt::CaseInsensitive ) || !fileExtension.compare( "rgb", Qt::CaseInsensitive ) || !fileExtension.compare( "gray", Qt::CaseInsensitive ) )
if( !fileExtension.compare( "yuv", Qt::CaseInsensitive ) || !fileExtension.compare( "rgb", Qt::CaseInsensitive ) ||
!fileExtension.compare( "gray", Qt::CaseInsensitive ) )
{
bGuessed = false;
// Guess pixel format