From c2c3d8d80d6753f051bf9fb98956f970d4dc5d44 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Sat, 8 Feb 2014 22:36:36 +0000 Subject: [PATCH 1/4] Add refresh frame function --- source/SubWindowHandle.cpp | 19 ++++++++++--------- source/SubWindowHandle.h | 2 ++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/source/SubWindowHandle.cpp b/source/SubWindowHandle.cpp index 9ea4ca6..7ac4e09 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 e92233b..985bc2e 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; From de147bbd92bba3bf501501aaf2c0667f5ffc04da Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Fri, 21 Feb 2014 18:58:26 +0000 Subject: [PATCH 2/4] Increase the resolution limit --- source/ConfigureFormatDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); From fbb91b24f35d07468b78bd1afc0faa6510ce30f2 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Wed, 5 Mar 2014 17:45:29 +0000 Subject: [PATCH 3/4] Add a new report line into cmake output --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) From 3d76888a998c4ab65f5c4076094d8e36f9bf36c8 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Wed, 5 Mar 2014 17:53:36 +0000 Subject: [PATCH 4/4] Fix compatibility with QT4 in QTimer usage --- source/plaYUVerApp.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/plaYUVerApp.cpp b/source/plaYUVerApp.cpp index 53580c5..7bd192f 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 );