[vlmc-devel] EffectInstance: Use application runtime as frei0r time parameter

Hugo Beauzée-Luyssen git at videolan.org
Sun Mar 27 17:03:50 CEST 2016


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Mar 27 12:19:16 2016 +0200| [b08d8e0f7fd256fbcc964cd960d53feac3f3c071] | committer: Hugo Beauzée-Luyssen

EffectInstance: Use application runtime as frei0r time parameter

Which is actually what it expects according to the documentation

> https://code.videolan.org/videolan/vlmc/commit/b08d8e0f7fd256fbcc964cd960d53feac3f3c071
---

 src/EffectsEngine/EffectInstance.cpp | 10 +++++-----
 src/EffectsEngine/EffectInstance.h   |  4 ++--
 src/EffectsEngine/EffectUser.cpp     |  2 +-
 src/Workflow/TrackWorkflow.cpp       |  3 +--
 4 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/EffectsEngine/EffectInstance.cpp b/src/EffectsEngine/EffectInstance.cpp
index d8e50ff..7e273c6 100644
--- a/src/EffectsEngine/EffectInstance.cpp
+++ b/src/EffectsEngine/EffectInstance.cpp
@@ -22,8 +22,8 @@
 
 #include "EffectsEngine/EffectInstance.h"
 #include "EffectsEngine/EffectSettingValue.h"
-
 #include "EffectsEngine/Effect.h"
+#include "Main/Core.h"
 
 EffectInstance::EffectInstance( Effect *effect ) :
         m_effect( effect ),
@@ -107,16 +107,16 @@ EffectInstance::params()
 }
 
 void
-EffectInstance::process( double time, const quint32 *frame1, const quint32 *frame2,
+EffectInstance::process( const quint32 *frame1, const quint32 *frame2,
                        const quint32 *frame3, quint32 *output )
 {
     Q_ASSERT( m_effect->type() == Effect::Mixer2 );
-    m_effect->m_f0r_update2( m_instance, time, frame1, frame2, frame3, output );
+    m_effect->m_f0r_update2( m_instance, Core::getInstance()->runtime(), frame1, frame2, frame3, output );
 }
 
 void
-EffectInstance::process( double time, const quint32 *input, quint32 *output ) const
+EffectInstance::process( const quint32 *input, quint32 *output ) const
 {
     Q_ASSERT( m_effect->type() == Effect::Filter );
-    m_effect->m_f0r_update( m_instance, time, input, output );
+    m_effect->m_f0r_update( m_instance, Core::getInstance()->runtime(), input, output );
 }
diff --git a/src/EffectsEngine/EffectInstance.h b/src/EffectsEngine/EffectInstance.h
index dd2379d..50507d7 100644
--- a/src/EffectsEngine/EffectInstance.h
+++ b/src/EffectsEngine/EffectInstance.h
@@ -41,8 +41,8 @@ class EffectInstance
         Effect*         effect();
         const ParamList &params() const;
         ParamList       &params();
-        void            process( double time, const quint32* input, quint32* output ) const;
-        void            process( double time, const quint32 *frame1, const quint32 *frame2,
+        void            process( const quint32* input, quint32* output ) const;
+        void            process( const quint32 *frame1, const quint32 *frame2,
                                 const quint32 *frame3, quint32 *output );
 
     protected:
diff --git a/src/EffectsEngine/EffectUser.cpp b/src/EffectsEngine/EffectUser.cpp
index 12e1abf..55553d9 100644
--- a/src/EffectsEngine/EffectUser.cpp
+++ b/src/EffectsEngine/EffectUser.cpp
@@ -102,7 +102,7 @@ EffectUser::applyFilters( const Workflow::Frame* frame,
             if ( *buff == NULL )
                 *buff = new quint32[frame->nbPixels()];
             EffectInstance      *effect = (*it)->effectInstance();
-            effect->process( time, input, *buff );
+            effect->process( input, *buff );
             input = *buff;
             firstBuff = !firstBuff;
         }
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index ba21b21..7993501 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -335,8 +335,7 @@ TrackWorkflow::getOutput( qint64 currentFrame, qint64 subFrame, bool paused )
         if ( mixer != NULL && frames[0] != NULL ) //There's no point using the mixer if there's no frame rendered.
         {
             //FIXME: We don't handle mixer3 yet.
-            mixer->effectInstance()->process( currentFrame * 1000.0 / m_fps,
-                                    frames[0]->buffer(),
+            mixer->effectInstance()->process( frames[0]->buffer(),
                                     frames[1] != NULL ? frames[1]->buffer() : Core::getInstance()->workflow()->blackOutput()->buffer(),
                                     NULL, m_mixerBuffer->buffer() );
             m_mixerBuffer->ptsDiff = frames[0]->ptsDiff;



More information about the Vlmc-devel mailing list