[vlmc-devel] commit: TrackHandler: Removing StackedBuffer stuff. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Fri Aug 20 00:55:05 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Aug 19 12:39:09 2010 +0200| [66759c59f1d482a67227b85811232268900fc882] | committer: Hugo Beauzée-Luyssen 

TrackHandler: Removing StackedBuffer stuff.

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

 src/Workflow/TrackHandler.cpp  |   24 ++++--------------------
 src/Workflow/TrackWorkflow.cpp |    7 +++++--
 2 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/src/Workflow/TrackHandler.cpp b/src/Workflow/TrackHandler.cpp
index 4da1c82..9190b0a 100644
--- a/src/Workflow/TrackHandler.cpp
+++ b/src/Workflow/TrackHandler.cpp
@@ -110,27 +110,11 @@ TrackHandler::getOutput( qint64 currentFrame, qint64 subFrame, bool paused )
         if ( m_tracks[i].activated() == false || m_tracks[i]->hasFrameToRender( currentFrame ) )
             continue ;
         validTrack = true;
-        if ( m_trackType == MainWorkflow::VideoTrack )
-        {
-            void*   ret = m_tracks[i]->getOutput( currentFrame, subFrame, paused );
-            StackedBuffer<Workflow::Frame*>   *buff = reinterpret_cast<StackedBuffer<Workflow::Frame*>*>( ret );
-            if ( ret == NULL )
-                continue ;
-            else
-                return buff->get();
-        }
+        void*   ret = m_tracks[i]->getOutput( currentFrame, subFrame, paused );
+        if ( ret == NULL )
+            continue ;
         else
-        {
-            //If paused is false at this point, there's probably something wrong...
-            void*   ret = m_tracks[i]->getOutput( currentFrame, subFrame, paused );
-            //m_tmpAudioBuffer is NULL by default, so it will remain NULL if we continue;
-            if ( ret == NULL )
-                continue ;
-            StackedBuffer<Workflow::AudioSample*>* stackedBuffer =
-                reinterpret_cast<StackedBuffer<Workflow::AudioSample*>*> ( ret );
-            if ( stackedBuffer != NULL )
-                return stackedBuffer->get();
-        }
+            return ret;
     }
     if ( validTrack == false )
         allTracksEnded();
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index e4ea414..246cca1 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -339,8 +339,11 @@ TrackWorkflow::getOutput( qint64 currentFrame, qint64 subFrame, bool paused )
         ++it;
     }
     m_lastFrame = subFrame;
-
-    return ret;
+    if ( ret == NULL )
+        return NULL;
+    if ( m_trackType == MainWorkflow::VideoTrack )
+        return reinterpret_cast<StackedBuffer<Workflow::Frame*>*>( ret )->get();
+    return reinterpret_cast<StackedBuffer<Workflow::AudioSample*>*>( ret )->get();
 }
 
 void            TrackWorkflow::moveClip( const QUuid& id, qint64 startingFrame )



More information about the Vlmc-devel mailing list