diff --git a/CMakeLists.txt b/CMakeLists.txt index d1d0719..7173a79 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,6 +83,7 @@ IF( NOT USE_QT4) ENDIF() -status("Using third-party libraries:") +status("Dependencies:") +status(" QT:" USE_QT4 THEN "QT4" ELSE "QT5" ) status(" Use OpenCV:" USE_OPENCV THEN YES ELSE NO) status(" FFMPEG:" USE_FFMPEG THEN YES ELSE NO) diff --git a/source/ConfigureFormatDialog.cpp b/source/ConfigureFormatDialog.cpp index 31848df..1c068af 100755 --- a/source/ConfigureFormatDialog.cpp +++ b/source/ConfigureFormatDialog.cpp @@ -124,7 +124,7 @@ ConfigureFormatDialog::ConfigureFormatDialog( QWidget *parent ) : widthLabel->setText( QApplication::translate( "ConfigureFormat", "Width", 0 ) ); widthSpinBox = new QSpinBox(); widthSpinBox->setObjectName( QStringLiteral( "widthSpinBox" ) ); - widthSpinBox->setRange( 0, 5000 ); + widthSpinBox->setRange( 0, 7240 ); widthSpinBox->setValue( 0 ); heightLabel = new QLabel(); @@ -132,7 +132,7 @@ ConfigureFormatDialog::ConfigureFormatDialog( QWidget *parent ) : heightLabel->setText( QApplication::translate( "ConfigureFormat", "Height", 0 ) ); heightSpinBox = new QSpinBox(); heightSpinBox->setObjectName( QStringLiteral( "heightSpinBox" ) ); - heightSpinBox->setRange( 0, 5000 ); + heightSpinBox->setRange( 0, 5432 ); heightSpinBox->setValue( 0 ); pixelsLabel = new QLabel(); diff --git a/source/SubWindowHandle.cpp b/source/SubWindowHandle.cpp index f128e93..55d3ad7 100644 --- a/source/SubWindowHandle.cpp +++ b/source/SubWindowHandle.cpp @@ -94,9 +94,7 @@ bool SubWindowHandle::loadFile( const QString &fileName ) QApplication::restoreOverrideCursor(); - m_pCurrStream->getFrame( m_pCurrFrameQImage ); - m_cViewArea->setImage( QPixmap::fromImage( *m_pCurrFrameQImage ) ); - + refreshFrame(); normalSize(); m_cWindowName = QString( " " ); @@ -109,6 +107,12 @@ bool SubWindowHandle::loadFile( const QString &fileName ) return true; } +Void SubWindowHandle::refreshFrame() +{ + m_pCurrStream->getFrame( m_pCurrFrameQImage ); + m_cViewArea->setImage( QPixmap::fromImage( *m_pCurrFrameQImage ) ); +} + bool SubWindowHandle::save() { QString supported = tr( "Supported Files" ); @@ -154,8 +158,7 @@ bool SubWindowHandle::playEvent() { iRet = false; } - m_pCurrStream->getFrame( m_pCurrFrameQImage ); - m_cViewArea->setImage( QPixmap::fromImage( *m_pCurrFrameQImage ) ); + refreshFrame(); return iRet; } return false; @@ -165,16 +168,14 @@ Void SubWindowHandle::seekEvent( UInt new_frame_num ) { m_pCurrStream->seekInput( new_frame_num ); m_pCurrStream->readFrame(); - m_pCurrStream->getFrame( m_pCurrFrameQImage ); - m_cViewArea->setImage( QPixmap::fromImage( *m_pCurrFrameQImage ) ); + refreshFrame(); } Void SubWindowHandle::stopEvent() { m_pCurrStream->seekInput( 0 ); m_pCurrStream->readFrame(); - m_pCurrStream->getFrame( m_pCurrFrameQImage ); - m_cViewArea->setImage( QPixmap::fromImage( *m_pCurrFrameQImage ) ); + refreshFrame(); return; } diff --git a/source/SubWindowHandle.h b/source/SubWindowHandle.h index f3f57b9..619edf2 100644 --- a/source/SubWindowHandle.h +++ b/source/SubWindowHandle.h @@ -70,6 +70,8 @@ public: Void stopEvent(); Void seekEvent( UInt new_frame_num ); + Void refreshFrame(); + InputStream* getInputStream() { return m_pCurrStream; diff --git a/source/plaYUVerApp.cpp b/source/plaYUVerApp.cpp index c9e9324..d31c46b 100644 --- a/source/plaYUVerApp.cpp +++ b/source/plaYUVerApp.cpp @@ -64,7 +64,9 @@ plaYUVerApp::plaYUVerApp() setUnifiedTitleAndToolBarOnMac( true ); playingTimer = new QTimer; +#if( QT_VERSION_PLAYUVER == 5 ) playingTimer->setTimerType( Qt::CoarseTimer ); +#endif connect( playingTimer, SIGNAL( timeout() ), this, SLOT( playEvent() ) ); setAcceptDrops( true );