[vlmc-devel] ClipWorkflow: Remove Stopping state

Hugo Beauzée-Luyssen git at videolan.org
Sun Jan 26 22:48:57 CET 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Jan 26 23:16:47 2014 +0200| [e101f50a7e5b500fa59393af1eb4cf94bb50df6c] | committer: Hugo Beauzée-Luyssen

ClipWorkflow: Remove Stopping state

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=e101f50a7e5b500fa59393af1eb4cf94bb50df6c
---

 src/Workflow/ClipWorkflow.cpp |   10 ++--------
 src/Workflow/ClipWorkflow.h   |   14 ++++++--------
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/src/Workflow/ClipWorkflow.cpp b/src/Workflow/ClipWorkflow.cpp
index f38fec1..4c6f864 100644
--- a/src/Workflow/ClipWorkflow.cpp
+++ b/src/Workflow/ClipWorkflow.cpp
@@ -130,13 +130,8 @@ ClipWorkflow::stopRenderer()
     QWriteLocker    lockState( m_stateLock );
 
     //Let's make sure the ClipWorkflow isn't beeing stopped from another thread.
-    if ( m_mediaPlayer &&
-         m_state != Stopping && m_state != Stopped )
+    if ( m_mediaPlayer && m_state != Stopped )
     {
-        //Set a specific state to avoid operation (getOutput beeing called actually, as it
-        //would freeze the render waiting for a frame) while the stopping process occurs.
-        m_state = Stopping;
-
         m_mediaPlayer->stop();
         m_mediaPlayer->disconnect();
         MemoryPool<LibVLCpp::MediaPlayer>::getInstance()->release( m_mediaPlayer );
@@ -297,8 +292,7 @@ ClipWorkflow::shouldRender() const
 {
     ClipWorkflow::State state = getState();
     return ( state != ClipWorkflow::Error &&
-             state != ClipWorkflow::Stopped &&
-             state != ClipWorkflow::Stopping );
+             state != ClipWorkflow::Stopped);
 }
 
 void
diff --git a/src/Workflow/ClipWorkflow.h b/src/Workflow/ClipWorkflow.h
index fa632a6..b3d52e6 100644
--- a/src/Workflow/ClipWorkflow.h
+++ b/src/Workflow/ClipWorkflow.h
@@ -69,25 +69,23 @@ class   ClipWorkflow : public EffectUser
             Initializing,       //1
             /// \brief  Used when the clipworkflow is launched and active
             Rendering,          //2
-            /// \brief  Used when stopping
-            Stopping,           //3
             /// \brief  Used when end is reached, IE no more frame has to be rendered, but the trackworkflow
             ///         may eventually ask for some.
-            EndReached,         //4
+            EndReached,         //3
             // Here start internal states :
             /// \brief  This state will be used when an unpause
             ///         has been required
-            UnpauseRequired,    //5
+            UnpauseRequired,    //4
             /// \brief  This state will be used when a pause
             ///         has been required
-            PauseRequired,      //6
+            PauseRequired,      //5
             /// \brief  This state will be used when the media player is paused,
             ///         because of a sufficient number of computed buffers
-            Paused,             //7
+            Paused,             //6
             /// \brief  This state means a clip is mutted and must not be restarted
-            Muted,              //8
+            Muted,              //7
             /// \brief  An error was encountered, this ClipWorkflow must not be used anymore.
-            Error,              //9
+            Error,              //8
         };
 
         /**



More information about the Vlmc-devel mailing list