diff --git a/app/VideoHandle.cpp b/app/VideoHandle.cpp index 83e5b01..029d20d 100644 --- a/app/VideoHandle.cpp +++ b/app/VideoHandle.cpp @@ -148,11 +148,11 @@ QWidget* VideoHandle::createStatusBarMessage() QWidget* pcStatusBarWidget = new QWidget; QHBoxLayout* mainlayout = new QHBoxLayout; - m_pcFormatCodeLabel = new QLabel; - m_pcFormatCodeLabel->setText( " " ); - m_pcFormatCodeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); - m_pcFormatCodeLabel->setMinimumWidth( 100 ); - m_pcFormatCodeLabel->setAlignment( Qt::AlignCenter ); + m_pcVideoFormatLabel = new QLabel; + m_pcVideoFormatLabel->setText( " " ); + m_pcVideoFormatLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + m_pcVideoFormatLabel->setMinimumWidth( 150 ); + m_pcVideoFormatLabel->setAlignment( Qt::AlignCenter ); m_pcResolutionLabel = new QLabel; m_pcResolutionLabel->setText( " " ); @@ -160,15 +160,8 @@ QWidget* VideoHandle::createStatusBarMessage() m_pcResolutionLabel->setMinimumWidth( 90 ); m_pcResolutionLabel->setAlignment( Qt::AlignCenter ); - m_pcColorSpace = new QLabel; - m_pcColorSpace->setText( " " ); - m_pcColorSpace->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); - m_pcColorSpace->setMinimumWidth( 60 ); - m_pcColorSpace->setAlignment( Qt::AlignCenter ); - - mainlayout->addWidget( m_pcFormatCodeLabel ); + mainlayout->addWidget( m_pcVideoFormatLabel ); mainlayout->addWidget( m_pcResolutionLabel ); - mainlayout->addWidget( m_pcColorSpace ); pcStatusBarWidget->setLayout( mainlayout ); return pcStatusBarWidget; @@ -220,11 +213,11 @@ Void VideoHandle::update() Int frame_num = 0; UInt64 total_frame_num = 1; + m_pcVideoFormatLabel->setText( m_pcCurrentVideoSubWindow->getStreamInformation() ); + QString resolution; if( pcFrame ) { - QString pelFmt( PlaYUVerFrame::supportedPixelFormatListNames()[pcFrame->getPelFormat()].data() ); - m_pcColorSpace->setText( pelFmt ); resolution.append( QString( "%1x%2" ).arg( pcFrame->getWidth() ).arg( pcFrame->getHeight() ) ); } @@ -233,18 +226,13 @@ Void VideoHandle::update() frame_num = pcStream->getCurrFrameNum(); m_pcFrameNumInfo->setCurrFrameNum( frame_num ); total_frame_num = getMaxFrameNumber(); - resolution.append( QString( "@%1" ).arg( pcStream->getFrameRate() ) ); - m_pcFormatCodeLabel->setText( QString( "%1 | %2" ) - .arg( QString::fromStdString( pcStream->getFormatName() ) ) - .arg( QString::fromStdString( pcStream->getCodecName() ) ) ); } else { m_pcFrameNumInfo->setCurrFrameNum( 0 ); - m_pcFormatCodeLabel->setText( QString( "" ) ); if( m_pcCurrentVideoSubWindow->getIsModule() ) - m_pcFormatCodeLabel->setText( QString( "Module" ) ); + m_pcVideoFormatLabel->setText( QString( "Module" ) ); } if( pcFrame ) diff --git a/app/VideoHandle.h b/app/VideoHandle.h index 4c6e346..df11798 100644 --- a/app/VideoHandle.h +++ b/app/VideoHandle.h @@ -90,9 +90,8 @@ private: QDockWidget* m_pcFramePropertiesDock; FramePropertiesSideBar* m_pcFramePropertiesSideBar; - QLabel* m_pcFormatCodeLabel; + QLabel* m_pcVideoFormatLabel; QLabel* m_pcResolutionLabel; - QLabel* m_pcColorSpace; VideoSubWindow* m_pcCurrentVideoSubWindow; QVector m_acPlayingSubWindows; diff --git a/app/VideoSubWindow.cpp b/app/VideoSubWindow.cpp index e51ce91..bdab765 100644 --- a/app/VideoSubWindow.cpp +++ b/app/VideoSubWindow.cpp @@ -163,8 +163,7 @@ Bool VideoSubWindow::loadFile( QString cFilename, Bool bForceDialog ) QString m_cFormatName = QString::fromStdString( m_pCurrStream->getFormatName() ); QString m_cCodedName = QString::fromStdString( m_pCurrStream->getCodecName() ); QString m_cPelFmtName = QString::fromStdString( m_pCurrStream->getPelFmtName() ); - m_cStreamInformationString = "[" + m_cFormatName + " / " + m_cCodedName + " / " + m_cPelFmtName + "] "; - m_cStreamInformationString += QFileInfo( m_cFilename ).fileName(); + m_cStreamInformation = m_cFormatName + " | " + m_cCodedName + " | " + m_cPelFmtName; setWindowName( m_cWindowShortName ); return true; @@ -195,8 +194,7 @@ Bool VideoSubWindow::loadFile( PlaYUVerStreamInfo* streamInfo ) QString m_cFormatName = QString::fromStdString( m_pCurrStream->getFormatName() ); QString m_cCodedName = QString::fromStdString( m_pCurrStream->getCodecName() ); QString m_cPelFmtName = QString::fromStdString( m_pCurrStream->getPelFmtName() ); - m_cStreamInformationString = "[" + m_cFormatName + " / " + m_cCodedName + " / " + m_cPelFmtName + "] "; - m_cStreamInformationString += QFileInfo( m_cFilename ).fileName(); + m_cStreamInformation = m_cFormatName + " | " + m_cCodedName + " | " + m_cPelFmtName; setWindowName( m_cWindowShortName ); return true; diff --git a/app/VideoSubWindow.h b/app/VideoSubWindow.h index 690d4b3..5518778 100644 --- a/app/VideoSubWindow.h +++ b/app/VideoSubWindow.h @@ -65,7 +65,7 @@ private: ViewArea* m_cViewArea; QString m_cFilename; - QString m_cStreamInformationString; + QString m_cStreamInformation; PlaYUVerStreamInfo m_sStreamInfo; PlaYUVerStream* m_pCurrStream; @@ -89,7 +89,7 @@ private: * Private zoom function to handle * zoom to fit */ - Void scaleView( const QSize & size , QPoint center = QPoint() ); + Void scaleView( const QSize & size, QPoint center = QPoint() ); public: enum VideoSubWindowCategories @@ -125,6 +125,10 @@ public: { return m_sStreamInfo; } + QString getStreamInformation() + { + return m_cStreamInformation; + } PlaYUVerStream* getInputStream() { @@ -170,8 +174,8 @@ public: */ Void normalSize(); Void zoomToFit(); - Void scaleView( Double scale , QPoint center = QPoint() ); - Void zoomToFactor( Double factor , QPoint center = QPoint() ); + Void scaleView( Double scale, QPoint center = QPoint() ); + Void zoomToFactor( Double factor, QPoint center = QPoint() ); Double getScaleFactor() { @@ -181,11 +185,10 @@ public: /** * Size related functions */ - QSize sizeHint() const ; - QSize sizeHint( const QSize & ) const ; + QSize sizeHint() const; + QSize sizeHint( const QSize & ) const; - - Void setWindowShortName( const QString& name) + Void setWindowShortName( const QString& name ) { m_cWindowShortName = name; }