Merge branch 'master' into dev_DialogWindowSelector

This commit is contained in:
jfmcarreira committed 2014-05-09 02:03:16 +01:00
commit 3b05cd35c4
5 files changed
+27 -10

No files matched your search

+4 -5
View File
@@ -163,7 +163,8 @@ Bool InputStream::open( QString filename, UInt width, UInt height, Int input_for
if( !avStatus ) if( !avStatus )
{ {
m_pFile = NULL; m_pFile = NULL;
m_pFile = fopen( m_cFilename.toLocal8Bit().data(), "rb" ); Char *filename = m_cFilename.toLocal8Bit().data();
m_pFile = fopen( filename, "rb" );
if( m_pFile == NULL ) if( m_pFile == NULL )
{ {
close(); close();
@@ -283,6 +284,8 @@ Bool InputStream::guessFormat( QString filename, UInt& rWidth, UInt& rHeight, In
break; break;
} }
} }
if( rWidth >= 0 && rHeight >= 0 && rInputFormat >= 0 )
bRet = false;
} }
return bRet; return bRet;
} }
@@ -313,10 +316,6 @@ Void InputStream::readNextFrame()
{ {
UInt64 bytes_read = 0; UInt64 bytes_read = 0;
//m_cTimer.restart(); //m_cTimer.restart();
if( m_iStatus == 0 )
{
return;
}
if( m_iCurrFrameNum + 1 >= ( Int )m_uiTotalFrameNum ) if( m_iCurrFrameNum + 1 >= ( Int )m_uiTotalFrameNum )
{ {
-1
View File
@@ -53,7 +53,6 @@ class InputStream
private: private:
Bool m_bInit; Bool m_bInit;
Int m_iStatus;
Int m_iErrorStatus; Int m_iErrorStatus;
#ifdef USE_FFMPEG #ifdef USE_FFMPEG
-4
View File
@@ -81,10 +81,6 @@ Bool SubWindowHandle::loadFile( const QString &fileName )
{ {
m_pCurrStream = new InputStream; m_pCurrStream = new InputStream;
} }
// else
// {
// m_pCurrStream->close();
// }
m_pCurrStream->getFormat( Width, Height, InputFormat, FrameRate ); m_pCurrStream->getFormat( Width, Height, InputFormat, FrameRate );
+20
View File
@@ -88,6 +88,15 @@ Void plaYUVerApp::parseArgs( Int argc, Char *argv[] )
{ {
loadFile( argv[1] ); loadFile( argv[1] );
} }
if( argc >= 2 )
{
for( Int i = 1; i < argc; i++ )
{
loadFile( argv[i] );
}
mdiArea->tileSubWindows();
zoomToFitAll();
}
} }
Void plaYUVerApp::closeEvent( QCloseEvent *event ) Void plaYUVerApp::closeEvent( QCloseEvent *event )
@@ -532,6 +541,17 @@ void plaYUVerApp::zoomToFit()
activeSubWindow()->zoomToFit(); activeSubWindow()->zoomToFit();
} }
Void plaYUVerApp::zoomToFitAll()
{
SubWindowHandle *subWindow;
for( Int i = 0; i < mdiArea->subWindowList().size(); i++ )
{
subWindow = qobject_cast<SubWindowHandle *>( mdiArea->subWindowList().at( i ) );
subWindow->zoomToFit();
}
}
void plaYUVerApp::scaleFrame( int ratio ) void plaYUVerApp::scaleFrame( int ratio )
{ {
if( activeSubWindow() ) if( activeSubWindow() )
+3
View File
@@ -118,6 +118,9 @@ private:
UInt m_uiAveragePlayInterval; UInt m_uiAveragePlayInterval;
Void loadFile( QString fileName ); Void loadFile( QString fileName );
Void zoomToFitAll();
//! Playing functions //! Playing functions
Void setTimerStatus(); Void setTimerStatus();
Void updateCurrFrameNum(); Void updateCurrFrameNum();