X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2B%2B%2Fsrc%2FMltFilter.cpp;h=ad79fcf063c7f558d54a798cf62f0297225b19c8;hb=c1dda4b336a041cef7ad422a9dffc4705c7128fa;hp=7842f55ac0b8a5d8bfbfd6085a3f24fcd46400f1;hpb=8283ca2eb4e3b523e04a46578a19a985d3b2af3c;p=melted diff --git a/mlt++/src/MltFilter.cpp b/mlt++/src/MltFilter.cpp index 7842f55..ad79fcf 100644 --- a/mlt++/src/MltFilter.cpp +++ b/mlt++/src/MltFilter.cpp @@ -21,14 +21,15 @@ #include #include #include "MltFilter.h" +#include "MltProfile.h" using namespace Mlt; -Filter::Filter( char *id, char *arg ) : +Filter::Filter( Profile& profile, char *id, char *arg ) : instance( NULL ) { if ( arg != NULL ) { - instance = mlt_factory_filter( id, arg ); + instance = mlt_factory_filter( profile.get_profile(), id, arg ); } else { @@ -37,17 +38,28 @@ Filter::Filter( char *id, char *arg ) : char *temp = strdup( id ); char *arg = strchr( temp, ':' ) + 1; *( arg - 1 ) = '\0'; - instance = mlt_factory_filter( temp, arg ); + instance = mlt_factory_filter( profile.get_profile(), temp, arg ); free( temp ); } else { - instance = mlt_factory_filter( id, NULL ); + instance = mlt_factory_filter( profile.get_profile(), id, NULL ); } } } +Filter::Filter( Service &filter ) : + instance( NULL ) +{ + if ( filter.type( ) == filter_type ) + { + instance = ( mlt_filter )filter.get_service( ); + inc_ref( ); + } +} + Filter::Filter( Filter &filter ) : + Mlt::Service( filter ), instance( filter.get_filter( ) ) { inc_ref( );