X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_service.c;h=6df363064cebcd5534d3c38c35bd2fc9002ef665;hb=909d149697331a560edb1924f58fc58c5a25aaea;hp=7a66a577e417b40224d71bd2ce121080a9ddb26e;hpb=52c1bb26fcbb895824cd9237c228ea4834ce1433;p=melted diff --git a/src/framework/mlt_service.c b/src/framework/mlt_service.c index 7a66a57..6df3630 100644 --- a/src/framework/mlt_service.c +++ b/src/framework/mlt_service.c @@ -53,6 +53,7 @@ mlt_service_base; static void mlt_service_disconnect( mlt_service this ); static void mlt_service_connect( mlt_service this, mlt_service that ); static int service_get_frame( mlt_service this, mlt_frame_ptr frame, int index ); +static void mlt_service_property_changed( mlt_listener, mlt_properties owner, mlt_service this, void **args ); /** Constructor */ @@ -79,11 +80,20 @@ int mlt_service_init( mlt_service this, void *child ) { this->parent.close = ( mlt_destructor )mlt_service_close; this->parent.close_object = this; + + mlt_events_init( &this->parent ); + mlt_events_register( &this->parent, "property-changed", ( mlt_transmitter )mlt_service_property_changed ); } return error; } +static void mlt_service_property_changed( mlt_listener listener, mlt_properties owner, mlt_service this, void **args ) +{ + if ( listener != NULL ) + listener( owner, this, ( char * )args[ 0 ] ); +} + /** Connect a producer service. Returns: > 0 warning, == 0 success, < 0 serious error 1 = this service does not accept input