[vlmc-devel] commit: TrackWorkflow: Don't add effect for non video tracks. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Mon Aug 30 00:55:27 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Aug 29 22:06:07 2010 +0200| [9726c9d6bc29e10caf07f60a1a10c815e1882f8b] | committer: Hugo Beauzée-Luyssen
TrackWorkflow: Don't add effect for non video tracks.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=9726c9d6bc29e10caf07f60a1a10c815e1882f8b
---
src/Workflow/TrackWorkflow.cpp | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index a3db641..5e35c04 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -45,7 +45,8 @@ TrackWorkflow::TrackWorkflow( Workflow::TrackType type, quint32 trackId ) :
m_length( 0 ),
m_trackType( type ),
m_lastFrame( 0 ),
- m_trackId( trackId )
+ m_trackId( trackId ),
+ m_isRendering( false )
{
m_renderOneFrameMutex = new QMutex;
m_clipsLock = new QReadWriteLock;
@@ -98,6 +99,11 @@ TrackWorkflow::addClip( ClipWorkflow* cw, qint64 start )
EffectsEngine::EffectHelper*
TrackWorkflow::addEffect( Effect *effect, qint64 start /*= 0*/, qint64 end /*= -1*/ )
{
+ if ( m_trackType != Workflow::VideoTrack )
+ {
+ qWarning() << "Effects are only supported for Video tracks.";
+ return NULL;
+ }
EffectInstance *effectInstance = effect->createInstance();
if ( m_isRendering == true )
effectInstance->init( m_width, m_height );
More information about the Vlmc-devel
mailing list