Merge branch 'devel' into features_recentfilelist
Conflicts: source/app/SubWindowHandle.h source/app/plaYUVerApp.h
This commit is contained in:
commit
e9b5630ca3
38 files changed
+1392
-426
No files matched your search
@@ -94,7 +94,7 @@ Bool SubWindowHandle::loadFile( QString cFilename, Bool bForceDialog )
|
||||
if( m_pCurrStream->guessFormat( cFilename, Width, Height, InputFormat, FrameRate ) || bForceDialog )
|
||||
{
|
||||
ConfigureFormatDialog formatDialog( this );
|
||||
if( formatDialog.runConfigureFormatDialog( Width, Height, InputFormat, FrameRate ) == QDialog::Rejected )
|
||||
if( formatDialog.runConfigureFormatDialog( cFilename, Width, Height, InputFormat, FrameRate ) == QDialog::Rejected )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -118,6 +118,7 @@ Bool SubWindowHandle::loadFile( QString cFilename, Bool bForceDialog )
|
||||
m_sStreamInfo.m_uiFrameRate = FrameRate;
|
||||
|
||||
m_cWindowName = m_pCurrStream->getStreamInformationString();
|
||||
m_cWindowShortName = QFileInfo( cFilename ).fileName();
|
||||
setWindowTitle( m_cWindowName );
|
||||
return true;
|
||||
}
|
||||
@@ -205,8 +206,33 @@ Void SubWindowHandle::refreshFrame()
|
||||
|
||||
Bool SubWindowHandle::save( QString filename )
|
||||
{
|
||||
Bool iRet = false;
|
||||
QApplication::setOverrideCursor( Qt::WaitCursor );
|
||||
Bool iRet = m_pCurrStream->saveFrame( filename );
|
||||
if( !m_pCurrStream )
|
||||
{
|
||||
if( !m_pcCurrFrame )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Int iFileFormat = PlaYUVerStream::INVALID_INPUT;
|
||||
QStringList formatsExt = PlaYUVerStream::supportedReadFormatsExt();
|
||||
QString currExt = QFileInfo( filename ).suffix();
|
||||
if( formatsExt.contains( currExt ) )
|
||||
{
|
||||
iFileFormat = formatsExt.indexOf( currExt );
|
||||
}
|
||||
if( iFileFormat == PlaYUVerStream::YUVINPUT )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
m_pcCurrFrame->FrametoRGB8();
|
||||
QImage qimg = QImage( m_pcCurrFrame->getQImageBuffer(), m_pcCurrFrame->getWidth(), m_pcCurrFrame->getHeight(), QImage::Format_RGB888 );
|
||||
iRet = qimg.save( filename );
|
||||
}
|
||||
else
|
||||
{
|
||||
iRet = m_pCurrStream->saveFrame( filename );
|
||||
}
|
||||
QApplication::restoreOverrideCursor();
|
||||
return iRet;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user