Commit 99393cf3 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

EffectsEngine: Adding an initMixers method.

parent 07c32681
......@@ -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;
}
}
......@@ -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();
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment