[vlmc-devel] commit: VideoClipWorkflow: Init the effect before every render ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Wed Jul 28 00:22:10 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Wed Jul 28 00:21:29 2010 +0200| [a6ae6246a84f054ac0b6b78e15078136d75a3180] | committer: Hugo Beauzée-Luyssen
VideoClipWorkflow: Init the effect before every render
(If the re-init is not required, nothing will happen)
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=a6ae6246a84f054ac0b6b78e15078136d75a3180
---
src/Workflow/VideoClipWorkflow.cpp | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/Workflow/VideoClipWorkflow.cpp b/src/Workflow/VideoClipWorkflow.cpp
index ccfd973..45b3095 100644
--- a/src/Workflow/VideoClipWorkflow.cpp
+++ b/src/Workflow/VideoClipWorkflow.cpp
@@ -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;
More information about the Vlmc-devel
mailing list