[vlmc-devel] commit: ClipWorkflow: Removing preGetOutput. (Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Wed Apr 7 17:22:09 CEST 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Wed Apr  7 17:15:22 2010 +0200| [036f9c8db195160bb4d9f0aaf41c1ef3b1a1669f] | committer: Hugo Beauzee-Luyssen 

ClipWorkflow: Removing preGetOutput.

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

 src/Workflow/AudioClipWorkflow.cpp |    2 +-
 src/Workflow/ClipWorkflow.cpp      |    8 --------
 src/Workflow/ClipWorkflow.h        |    1 -
 src/Workflow/VideoClipWorkflow.cpp |    2 +-
 4 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/Workflow/AudioClipWorkflow.cpp b/src/Workflow/AudioClipWorkflow.cpp
index 9ebd148..1ac7136 100644
--- a/src/Workflow/AudioClipWorkflow.cpp
+++ b/src/Workflow/AudioClipWorkflow.cpp
@@ -82,7 +82,7 @@ AudioClipWorkflow::getOutput( ClipWorkflow::GetMode mode )
 {
     QMutexLocker    lock( m_renderLock );
 
-    if ( preGetOutput() == false )
+    if ( getNbComputedBuffers() == 0 )
         return NULL;
     if ( isEndReached() == true )
         return NULL;
diff --git a/src/Workflow/ClipWorkflow.cpp b/src/Workflow/ClipWorkflow.cpp
index 209acb4..af22162 100644
--- a/src/Workflow/ClipWorkflow.cpp
+++ b/src/Workflow/ClipWorkflow.cpp
@@ -172,14 +172,6 @@ LibVLCpp::MediaPlayer*       ClipWorkflow::getMediaPlayer()
     return m_mediaPlayer;
 }
 
-bool        ClipWorkflow::preGetOutput()
-{
-    //Computed buffer mutex is already locked by underlying clipworkflow getoutput method
-    if ( getNbComputedBuffers() == 0 )
-        return false;
-    return true;
-}
-
 void        ClipWorkflow::postGetOutput()
 {
     //If we're running out of computed buffers, refill our stack.
diff --git a/src/Workflow/ClipWorkflow.h b/src/Workflow/ClipWorkflow.h
index bbdcc97..7a7dd8a 100644
--- a/src/Workflow/ClipWorkflow.h
+++ b/src/Workflow/ClipWorkflow.h
@@ -97,7 +97,6 @@ class   ClipWorkflow : public QObject
          *  of the rendering process advancement.
          */
         virtual void*           getOutput( ClipWorkflow::GetMode mode ) = 0;
-        bool                    preGetOutput();
         void                    postGetOutput();
         virtual void            initVlcOutput() = 0;
         void                    initialize();
diff --git a/src/Workflow/VideoClipWorkflow.cpp b/src/Workflow/VideoClipWorkflow.cpp
index 908d3fc..18167e2 100644
--- a/src/Workflow/VideoClipWorkflow.cpp
+++ b/src/Workflow/VideoClipWorkflow.cpp
@@ -114,7 +114,7 @@ VideoClipWorkflow::getOutput( ClipWorkflow::GetMode mode )
 
     if ( isEndReached() == true )
         return NULL;
-    if ( preGetOutput() == false )
+    if ( getNbComputedBuffers() == 0 )
         m_renderWaitCond->wait( m_renderLock );
     ::StackedBuffer<LightVideoFrame*>* buff;
     if ( mode == ClipWorkflow::Pop )



More information about the Vlmc-devel mailing list