X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fsdl%2Fconsumer_sdl_preview.c;h=84a2c307c90b72335abec95a156a286d505bba98;hb=2da2cbad1bf870a02d095c21f8c157a92a9be84b;hp=5415ed3c8280b5c5322ba56dc7d8e587f224cebd;hpb=c12c6c380fa37b6a0d28ce98fdcda487a8aca76d;p=melted diff --git a/src/modules/sdl/consumer_sdl_preview.c b/src/modules/sdl/consumer_sdl_preview.c index 5415ed3..84a2c30 100644 --- a/src/modules/sdl/consumer_sdl_preview.c +++ b/src/modules/sdl/consumer_sdl_preview.c @@ -139,11 +139,20 @@ static int consumer_stop( mlt_consumer parent ) if ( this->joined == 0 ) { + mlt_properties properties = mlt_consumer_properties( parent ); + int app_locked = mlt_properties_get_int( properties, "app_locked" ); + void ( *lock )( void ) = mlt_properties_get_data( properties, "app_lock", NULL ); + void ( *unlock )( void ) = mlt_properties_get_data( properties, "app_unlock", NULL ); + + if ( app_locked && unlock ) unlock( ); + // Kill the thread and clean up this->running = 0; pthread_join( this->thread, NULL ); this->joined = 1; + + if ( app_locked && lock ) lock( ); } return 0; @@ -190,12 +199,14 @@ static void *consumer_thread( void *arg ) mlt_properties_set_data( still, "transport_producer", mlt_properties_get_data( properties, "transport_producer", NULL ), 0, NULL, NULL ); mlt_properties_set_data( play, "transport_callback", mlt_properties_get_data( properties, "transport_callback", NULL ), 0, NULL, NULL ); mlt_properties_set_data( still, "transport_callback", mlt_properties_get_data( properties, "transport_callback", NULL ), 0, NULL, NULL ); + mlt_properties_set_int( play, "resize", mlt_properties_get_int( properties, "resize" ) ); + mlt_properties_set_int( still, "resize", mlt_properties_get_int( properties, "resize" ) ); mlt_properties_set( play, "rescale", mlt_properties_get( properties, "rescale" ) ); mlt_properties_set( still, "rescale", mlt_properties_get( properties, "rescale" ) ); - mlt_properties_set( play, "width", mlt_properties_get( properties, "width" ) ); - mlt_properties_set( still, "width", mlt_properties_get( properties, "width" ) ); - mlt_properties_set( play, "height", mlt_properties_get( properties, "height" ) ); - mlt_properties_set( still, "height", mlt_properties_get( properties, "height" ) ); + mlt_properties_set_int( play, "width", mlt_properties_get_int( properties, "width" ) ); + mlt_properties_set_int( still, "width", mlt_properties_get_int( properties, "width" ) ); + mlt_properties_set_int( play, "height", mlt_properties_get_int( properties, "height" ) ); + mlt_properties_set_int( still, "height", mlt_properties_get_int( properties, "height" ) ); mlt_properties_set_int( play, "progressive", 1 ); mlt_properties_set_int( still, "progressive", 1 );