[vlmc-devel] Minor changes & comments fixup
Hugo Beauzée-Luyssen
git at videolan.org
Sun Jan 26 22:48:58 CET 2014
vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Jan 26 23:36:32 2014 +0200| [c85c64db4331914f4d9c261e5c0a2ca9b8840120] | committer: Hugo Beauzée-Luyssen
Minor changes & comments fixup
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=c85c64db4331914f4d9c261e5c0a2ca9b8840120
---
src/Workflow/ClipWorkflow.cpp | 6 +-----
src/Workflow/TrackWorkflow.cpp | 13 ++++++-------
2 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/src/Workflow/ClipWorkflow.cpp b/src/Workflow/ClipWorkflow.cpp
index 4c6f864..d1536da 100644
--- a/src/Workflow/ClipWorkflow.cpp
+++ b/src/Workflow/ClipWorkflow.cpp
@@ -185,8 +185,6 @@ ClipWorkflow::postGetOutput()
m_state = ClipWorkflow::UnpauseRequired;
//This will act like an "unpause";
m_mediaPlayer->pause();
- // Since we use DirectConnection for mediaPlayerUnpaused(), the media player should be
- // "Rendering" at this point.
}
}
}
@@ -201,8 +199,6 @@ ClipWorkflow::commonUnlock()
QWriteLocker lock( m_stateLock );
m_state = ClipWorkflow::PauseRequired;
m_mediaPlayer->pause();
- // Since we use DirectConnection for mediaPlayerPaused(), the media player should be
- // "Paused" at this point.
}
}
@@ -290,7 +286,7 @@ ClipWorkflow::errorEncountered()
bool
ClipWorkflow::shouldRender() const
{
- ClipWorkflow::State state = getState();
+ ClipWorkflow::State state = m_state;
return ( state != ClipWorkflow::Error &&
state != ClipWorkflow::Stopped);
}
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index 61712ed..a271fff 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -224,9 +224,10 @@ void
TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw )
{
// qDebug() << "Stopping clip workflow";
- if ( cw->getState() == ClipWorkflow::Stopped ||
- cw->getState() == ClipWorkflow::Muted ||
- cw->getState() == ClipWorkflow::Error )
+ ClipWorkflow::State state = cw->getState();
+ if ( state == ClipWorkflow::Stopped ||
+ state == ClipWorkflow::Muted ||
+ state == ClipWorkflow::Error )
return ;
cw->stop();
}
@@ -240,10 +241,8 @@ TrackWorkflow::hasNoMoreFrameToRender( qint64 currentFrame ) const
QMap<qint64, ClipWorkflow*>::const_iterator it = m_clips.end() - 1;
ClipWorkflow* cw = it.value();
//Check if the Clip is in error state. If so, don't bother checking anything else.
- {
- if ( cw->getState() == ClipWorkflow::Error )
- return true;
- }
+ if ( cw->getState() == ClipWorkflow::Error )
+ return true;
//If it ends before the current frame, we reached end.
return ( cw->getClipHelper()->length() + it.key() < currentFrame );
}
More information about the Vlmc-devel
mailing list