[vlmc-devel] commit: EffectsEngine: Adding an initMixers method. ( Hugo Beauzée-Luyssen )

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


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Fri Aug 20 00:54:11 2010 +0200| [99393cf36060a808fe14b9ad26a48a1bc52007e3] | committer: Hugo Beauzée-Luyssen 

EffectsEngine: Adding an initMixers method.

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

 src/EffectsEngine/EffectsEngine.cpp |   16 ++++++++++++++++
 src/EffectsEngine/EffectsEngine.h   |    2 ++
 src/Workflow/VideoClipWorkflow.cpp  |    2 --
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/EffectsEngine/EffectsEngine.cpp b/src/EffectsEngine/EffectsEngine.cpp
index 52aa6fa..d6bc16d 100644
--- a/src/EffectsEngine/EffectsEngine.cpp
+++ b/src/EffectsEngine/EffectsEngine.cpp
@@ -24,6 +24,7 @@
 
 #include "Effect.h"
 #include "FilterInstance.h"
+#include "MixerInstance.h"
 #include "Types.h"
 
 #include <QDesktopServices>
@@ -195,3 +196,18 @@ EffectsEngine::getMixer( const MixerList &mixers, qint64 currentFrame )
     }
     return NULL;
 }
+
+void
+EffectsEngine::initMixers( const MixerList &mixers, quint32 width, quint32 height )
+{
+    if ( mixers.size() <= 0 )
+        return ;
+    EffectsEngine::MixerList::const_iterator   it = mixers.constBegin();
+    EffectsEngine::MixerList::const_iterator   ite = mixers.constEnd();
+
+    while ( it != ite )
+    {
+        it.value()->effect->init( width, height );
+        ++it;
+    }
+}
diff --git a/src/EffectsEngine/EffectsEngine.h b/src/EffectsEngine/EffectsEngine.h
index 6a5ae3e..90a3a41 100644
--- a/src/EffectsEngine/EffectsEngine.h
+++ b/src/EffectsEngine/EffectsEngine.h
@@ -81,6 +81,8 @@ class   EffectsEngine : public QObject, public Singleton<EffectsEngine>
 
         //Mixers methods:
         static MixerHelper*     getMixer( const MixerList& mixers, qint64 currentFrame );
+        static void             initMixers( const MixerList& mixers, quint32 width,
+                                            quint32 height );
 
     private:
         EffectsEngine();
diff --git a/src/Workflow/VideoClipWorkflow.cpp b/src/Workflow/VideoClipWorkflow.cpp
index e268185..95cbc6d 100644
--- a/src/Workflow/VideoClipWorkflow.cpp
+++ b/src/Workflow/VideoClipWorkflow.cpp
@@ -146,9 +146,7 @@ VideoClipWorkflow::lock( VideoClipWorkflow *cw, void **pp_ret, int size )
 
     cw->m_renderLock->lock();
     if ( cw->m_availableBuffers.isEmpty() == true )
-    {
         frame = new Workflow::Frame( cw->m_width, cw->m_height );
-    }
     else
         frame = cw->m_availableBuffers.dequeue();
     cw->m_computedBuffers.enqueue( frame );



More information about the Vlmc-devel mailing list