Minor changes and code format

This commit is contained in:
jfmcarreira committed 2015-02-27 01:01:04 +00:00
1 parent e6b5fb8b27
commit c24e71bf55
2 files changed
+13 -15

No files matched your search

+11 -13
View File
@@ -327,16 +327,16 @@ Void VideoHandle::moveAllScrollBars( const QPoint offset )
scrollBar = m_pcCurrentVideoSubWindow->horizontalScrollBar();
// Do not move other images, if current image reached maximum or minimum scroll position
if(scrollBar->value()==scrollBar->maximum() && offset.x()>0)
newOffset.setX(0);
if(scrollBar->value()==scrollBar->minimum() && offset.x()<0)
newOffset.setX(0);
if( scrollBar->value() == scrollBar->maximum() && offset.x() > 0 )
newOffset.setX( 0 );
if( scrollBar->value() == scrollBar->minimum() && offset.x() < 0 )
newOffset.setX( 0 );
scrollBar = m_pcCurrentVideoSubWindow->verticalScrollBar();
if(scrollBar->value()==scrollBar->maximum() && offset.y()>0)
newOffset.setY(0);
if(scrollBar->value()==scrollBar->minimum() && offset.y()<0)
newOffset.setY(0);
if( scrollBar->value() == scrollBar->maximum() && offset.y() > 0 )
newOffset.setY( 0 );
if( scrollBar->value() == scrollBar->minimum() && offset.y() < 0 )
newOffset.setY( 0 );
for( Int i = 0; i < subWindowList.size(); i++ )
{
@@ -505,16 +505,14 @@ Void VideoHandle::playEvent()
QString warningMsg = "Error while playing " + QFileInfo( m_pcCurrentVideoSubWindow->getCurrentFileName() ).fileName() + " with the following error: \n"
+ msg;
QMessageBox::warning( this, QApplication::applicationName(), warningMsg );
//statusBar()->showMessage( warningMsg, 2000 );
qDebug( ) << warningMsg;
stop();
m_pcCurrentVideoSubWindow->close();
}
#if( _CONTROL_PLAYING_TIME_ == 1 )
m_dAverageFps = Double( m_dAverageFps * m_uiNumberPlayedFrames + m_pcPlayControlTimer->elapsed() )
/ Double( m_uiNumberPlayedFrames + 1 );
m_uiNumberPlayedFrames++;
m_pcPlayControlTimer->restart();
m_dAverageFps = Double( m_dAverageFps * m_uiNumberPlayedFrames + m_pcPlayControlTimer->elapsed() ) / Double( m_uiNumberPlayedFrames + 1 );
m_uiNumberPlayedFrames++;
m_pcPlayControlTimer->restart();
#endif
emit changed();
}
+2 -2
View File
@@ -249,14 +249,14 @@ PlaYUVerFrame::Pixel PlaYUVerFrame::ConvertPixel( PlaYUVerFrame::Pixel inputPixe
if( eOutputSpace == COLOR_RGB )
{
yuvToRgb<Int>( inputPixel.Y(), inputPixel.Cb(), inputPixel.Cr(), outA, outB, outC );
yuvToRgb( inputPixel.Y(), inputPixel.Cb(), inputPixel.Cr(), outA, outB, outC );
outPixel.R() = outA;
outPixel.G() = outB;
outPixel.B() = outC;
}
if( eOutputSpace == COLOR_YUV )
{
rgbToYuv<Int>( inputPixel.R(), inputPixel.G(), inputPixel.B(), outA, outB, outC );
rgbToYuv( inputPixel.R(), inputPixel.G(), inputPixel.B(), outA, outB, outC );
outPixel.Y() = outA;
outPixel.Cb() = outB;
outPixel.Cr() = outC;