Hi,this patch provides ability to pass properties to encapsulated producer and consumer.
-- ________________________________________ Maksym Veremeyenko
>From 8176b91d9c771bd569eea43025f3892dd446c3c6 Mon Sep 17 00:00:00 2001 From: Maksym Veremeyenko <ve...@m1.tv> Date: Fri, 5 Sep 2014 15:33:48 +0300 Subject: [PATCH] pass list of properties for encapsulated producer and consumer --- src/modules/core/producer_consumer.c | 8 +++++++- src/modules/core/producer_consumer.yml | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletions(-) diff --git a/src/modules/core/producer_consumer.c b/src/modules/core/producer_consumer.c index dc436cc..25e4218 100644 --- a/src/modules/core/producer_consumer.c +++ b/src/modules/core/producer_consumer.c @@ -139,6 +139,9 @@ static int get_frame( mlt_producer self, mlt_frame_ptr frame, int index ) mlt_producer_close( cx->producer ); cx->producer = mlt_factory_producer( cx->profile, NULL, mlt_properties_get( properties, "resource" ) ); } + if ( mlt_properties_get( properties, "producer_properties_pass_list" ) ) + mlt_properties_pass_list( MLT_PRODUCER_PROPERTIES( cx->producer ), properties, + mlt_properties_get( properties, "producer_properties_pass_list" ) ); // Since we control the seeking, prevent it from seeking on its own mlt_producer_set_speed( cx->producer, 0 ); @@ -152,7 +155,10 @@ static int get_frame( mlt_producer self, mlt_frame_ptr frame, int index ) mlt_properties_get_int( properties, "real_time" ) ); mlt_properties_pass_list( MLT_CONSUMER_PROPERTIES( cx->consumer ), properties, "buffer, prefill, deinterlace_method, rescale" ); - + if ( mlt_properties_get( properties, "consumer_properties_pass_list" ) ) + mlt_properties_pass_list( MLT_CONSUMER_PROPERTIES( cx->consumer ), properties, + mlt_properties_get( properties, "consumer_properties_pass_list" ) ); + // Connect it all together mlt_consumer_connect( cx->consumer, MLT_PRODUCER_SERVICE( cx->producer ) ); mlt_consumer_start( cx->consumer ); diff --git a/src/modules/core/producer_consumer.yml b/src/modules/core/producer_consumer.yml index 0d1bcc8..34f5df7 100644 --- a/src/modules/core/producer_consumer.yml +++ b/src/modules/core/producer_consumer.yml @@ -32,3 +32,19 @@ parameters: minimum: 0 maximum: 1 default: 0 + + - identifier: producer_properties_pass_list + title: Producer properties pass list + type: string + description: > + Sometimes specific properties should be set to encapsulated producer. This + attribute provides a comma separated list of properties that should be + passed to encapsulated producer. + + - identifier: consumer_properties_pass_list + title: Consumer properties pass list + type: string + description: > + Sometimes specific properties should be set to encapsulated consumer. This + attribute provides a comma separated list of properties that should be + passed to encapsulated consumer. -- 1.7.7.6
------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/
_______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel