X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fcore%2Ftransition_region.c;h=52bcb0f8eac7092670efd6a1c4e5e3e6cd01ef74;hb=4112170ce8053261b9c67f58df87c2a3573b6602;hp=59c856daa60e585685d4f529aa1d4a027138735e;hpb=bf3264b9e340ba5c11cbf59835a8af3db94e0cc2;p=melted diff --git a/src/modules/core/transition_region.c b/src/modules/core/transition_region.c index 59c856d..52bcb0f 100644 --- a/src/modules/core/transition_region.c +++ b/src/modules/core/transition_region.c @@ -46,7 +46,8 @@ static int create_instance( mlt_transition this, char *name, char *value, int co *arg ++ = '\0'; // Create the filter - filter = mlt_factory_filter( type, arg ); + mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( this ) ); + filter = mlt_factory_filter( profile, type, arg ); // If we have a filter, then initialise and store it if ( filter != NULL ) @@ -167,7 +168,8 @@ static int transition_get_image( mlt_frame frame, uint8_t **image, mlt_image_for if ( composite == NULL ) { // Create composite via the factory - composite = mlt_factory_transition( "composite", NULL ); + mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( this ) ); + composite = mlt_factory_transition( profile, "composite", NULL ); // If we have one if ( composite != NULL ) @@ -270,7 +272,7 @@ static int transition_get_image( mlt_frame frame, uint8_t **image, mlt_image_for if ( composite != NULL ) { // Get the resource of this filter (could be a shape [rectangle/circle] or an alpha provider of choice - char *resource = mlt_properties_get( properties, "resource" ); + const char *resource = mlt_properties_get( properties, "resource" ); // Get the old resource in case it's changed char *old_resource = mlt_properties_get( properties, "_old_resource" ); @@ -336,16 +338,11 @@ static int transition_get_image( mlt_frame frame, uint8_t **image, mlt_image_for // Special case circle resource if ( strcmp( resource, "circle" ) == 0 ) - { - // Special case to ensure that fezzik produces a pixbuf with a NULL constructor - resource = "pixbuf"; - - // Specify the svg circle - mlt_properties_set( properties, "producer.resource", "" ); - } + resource = "pixbuf:"; - // Create the producer - producer = mlt_factory_producer( factory, resource ); + // Create the producer + mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( this ) ); + producer = mlt_factory_producer( profile, factory, resource ); // If we have one if ( producer != NULL ) @@ -422,7 +419,7 @@ static mlt_frame transition_process( mlt_transition this, mlt_frame a_frame, mlt /** Constructor for the transition. */ -mlt_transition transition_region_init( void *arg ) +mlt_transition transition_region_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ) { // Create a new transition mlt_transition this = mlt_transition_new( );