Merge branch 'master' into dev_DialogWindowSelector
This commit is contained in:
commit
3b05cd35c4
5 files changed
+27
-10
No files matched your search
@@ -163,7 +163,8 @@ Bool InputStream::open( QString filename, UInt width, UInt height, Int input_for
|
||||
if( !avStatus )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
close();
|
||||
@@ -283,6 +284,8 @@ Bool InputStream::guessFormat( QString filename, UInt& rWidth, UInt& rHeight, In
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( rWidth >= 0 && rHeight >= 0 && rInputFormat >= 0 )
|
||||
bRet = false;
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
@@ -313,10 +316,6 @@ Void InputStream::readNextFrame()
|
||||
{
|
||||
UInt64 bytes_read = 0;
|
||||
//m_cTimer.restart();
|
||||
if( m_iStatus == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( m_iCurrFrameNum + 1 >= ( Int )m_uiTotalFrameNum )
|
||||
{
|
||||
|
||||
@@ -53,7 +53,6 @@ class InputStream
|
||||
private:
|
||||
|
||||
Bool m_bInit;
|
||||
Int m_iStatus;
|
||||
Int m_iErrorStatus;
|
||||
|
||||
#ifdef USE_FFMPEG
|
||||
|
||||
@@ -81,10 +81,6 @@ Bool SubWindowHandle::loadFile( const QString &fileName )
|
||||
{
|
||||
m_pCurrStream = new InputStream;
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// m_pCurrStream->close();
|
||||
// }
|
||||
|
||||
m_pCurrStream->getFormat( Width, Height, InputFormat, FrameRate );
|
||||
|
||||
|
||||
@@ -88,6 +88,15 @@ Void plaYUVerApp::parseArgs( Int argc, Char *argv[] )
|
||||
{
|
||||
loadFile( argv[1] );
|
||||
}
|
||||
if( argc >= 2 )
|
||||
{
|
||||
for( Int i = 1; i < argc; i++ )
|
||||
{
|
||||
loadFile( argv[i] );
|
||||
}
|
||||
mdiArea->tileSubWindows();
|
||||
zoomToFitAll();
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::closeEvent( QCloseEvent *event )
|
||||
@@ -532,6 +541,17 @@ void plaYUVerApp::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 )
|
||||
{
|
||||
if( activeSubWindow() )
|
||||
|
||||
@@ -118,6 +118,9 @@ private:
|
||||
UInt m_uiAveragePlayInterval;
|
||||
|
||||
Void loadFile( QString fileName );
|
||||
|
||||
Void zoomToFitAll();
|
||||
|
||||
//! Playing functions
|
||||
Void setTimerStatus();
|
||||
Void updateCurrFrameNum();
|
||||
|
||||
Reference in new issue
Block a user