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

VideoClipWorkflow: Init the effect before every render

(If the re-init is not required, nothing will happen)
parent 37cf34be
......@@ -39,6 +39,8 @@ VideoClipWorkflow::VideoClipWorkflow( ClipHelper *ch ) :
{
m_effectsLock = new QReadWriteLock();
m_renderedFrameMutex = new QMutex();
Effect *effect = EffectsEngine::getInstance()->effect("bw0r");
appendEffect( effect, 0, 200 );
}
VideoClipWorkflow::~VideoClipWorkflow()
......@@ -99,6 +101,9 @@ VideoClipWorkflow::initVlcOutput()
m_vlcMedia->addOption( buffer );
sprintf( buffer, ":sout-transcode-fps=%f", (float)Clip::DefaultFPS );
m_vlcMedia->addOption( buffer );
foreach ( EffectsEngine::EffectHelper *helper, m_effects )
helper->effect->init( m_width, m_height );
}
void*
......@@ -215,7 +220,6 @@ VideoClipWorkflow::appendEffect( Effect *effect, qint64 start, qint64 end )
return false;
}
EffectInstance *effectInstance = effect->createInstance();
effectInstance->init( m_width, m_height );
QWriteLocker lock( m_effectsLock );
m_effects.push_back( new EffectsEngine::EffectHelper( effectInstance, start, end ) );
return true;
......
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