X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2B%2B%2Fsrc%2FMltTransition.cpp;h=3a194e45b9568f31df52a4b1629be58026d84f52;hb=80fec40c4f046be50645a0dfbf05a92520b50e7c;hp=4ef08a53170356a437a06ba65e57db74bdf2bb2e;hpb=8283ca2eb4e3b523e04a46578a19a985d3b2af3c;p=melted diff --git a/mlt++/src/MltTransition.cpp b/mlt++/src/MltTransition.cpp index 4ef08a5..3a194e4 100644 --- a/mlt++/src/MltTransition.cpp +++ b/mlt++/src/MltTransition.cpp @@ -21,14 +21,15 @@ #include #include #include "MltTransition.h" +#include "MltProfile.h" using namespace Mlt; -Transition::Transition( char *id, char *arg ) : +Transition::Transition( Profile& profile, char *id, char *arg ) : instance( NULL ) { if ( arg != NULL ) { - instance = mlt_factory_transition( id, arg ); + instance = mlt_factory_transition( profile.get_profile(), id, arg ); } else { @@ -37,17 +38,28 @@ Transition::Transition( char *id, char *arg ) : char *temp = strdup( id ); char *arg = strchr( temp, ':' ) + 1; *( arg - 1 ) = '\0'; - instance = mlt_factory_transition( temp, arg ); + instance = mlt_factory_transition( profile.get_profile(), temp, arg ); free( temp ); } else { - instance = mlt_factory_transition( id, NULL ); + instance = mlt_factory_transition( profile.get_profile(), id, NULL ); } } } +Transition::Transition( Service &transition ) : + instance( NULL ) +{ + if ( transition.type( ) == transition_type ) + { + instance = ( mlt_transition )transition.get_service( ); + inc_ref( ); + } +} + Transition::Transition( Transition &transition ) : + Mlt::Service( transition ), instance( transition.get_transition( ) ) { inc_ref( ); @@ -74,3 +86,7 @@ mlt_service Transition::get_service( ) return mlt_transition_service( get_transition( ) ); } +void Transition::set_in_and_out( int in, int out ) +{ + mlt_transition_set_in_and_out( get_transition( ), in, out ); +}