From ccf95fde934897b452958197f1c0564383d11f50 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Thu, 12 Sep 2013 19:59:19 -0700 Subject: [PATCH] Add producer xml-nogl to disable auto-qglsl creation. Sometimes you want to load MLT XML while ignoring the presence of OpenGL filters and transitions. --- src/modules/xml/factory.c | 2 ++ src/modules/xml/producer_xml-nogl.yml | 17 +++++++++++++++++ src/modules/xml/producer_xml-string.yml | 5 +++++ src/modules/xml/producer_xml.c | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 src/modules/xml/producer_xml-nogl.yml diff --git a/src/modules/xml/factory.c b/src/modules/xml/factory.c index 5854adbb..cc941ae2 100644 --- a/src/modules/xml/factory.c +++ b/src/modules/xml/factory.c @@ -37,8 +37,10 @@ MLT_REPOSITORY MLT_REGISTER( consumer_type, "xml", consumer_xml_init ); MLT_REGISTER( producer_type, "xml", producer_xml_init ); MLT_REGISTER( producer_type, "xml-string", producer_xml_init ); + MLT_REGISTER( producer_type, "xml-nogl", producer_xml_init ); MLT_REGISTER_METADATA( consumer_type, "xml", metadata, "consumer_xml.yml" ); MLT_REGISTER_METADATA( producer_type, "xml", metadata, "producer_xml.yml" ); MLT_REGISTER_METADATA( producer_type, "xml-string", metadata, "producer_xml-string.yml" ); + MLT_REGISTER_METADATA( producer_type, "xml-nogl", metadata, "producer_xml-nogl.yml" ); } diff --git a/src/modules/xml/producer_xml-nogl.yml b/src/modules/xml/producer_xml-nogl.yml new file mode 100644 index 00000000..1dfc60cf --- /dev/null +++ b/src/modules/xml/producer_xml-nogl.yml @@ -0,0 +1,17 @@ +schema_version: 0.1 +type: producer +identifier: xml-nogl +title: XML without OpenGL +version: 1 +copyright: Ushodaya Enterprises Limited +creator: Dan Dennedy +license: LGPLv2.1 +language: en +tags: + - Audio + - Video +description: > + This is the same as the regular "xml" producer except it prevents + automatically creating the qglsl consumer when it detects the usage of + OpenGL-based services within the XML. + See ProducerXml for more information. diff --git a/src/modules/xml/producer_xml-string.yml b/src/modules/xml/producer_xml-string.yml index 8e0010e1..4419b200 100644 --- a/src/modules/xml/producer_xml-string.yml +++ b/src/modules/xml/producer_xml-string.yml @@ -10,3 +10,8 @@ language: en tags: - Audio - Video +description: > + This is the same as the regular "xml" producer except it takes a pointer to + a string as the constructor argument. That means it can only be used + by applications and not directly exposed to users of those applications. + See ProducerXml for more information. diff --git a/src/modules/xml/producer_xml.c b/src/modules/xml/producer_xml.c index 526e95c9..d7af2d4b 100644 --- a/src/modules/xml/producer_xml.c +++ b/src/modules/xml/producer_xml.c @@ -1709,7 +1709,7 @@ mlt_producer producer_xml_init( mlt_profile profile, mlt_service_type servtype, // may exist when trying to load glsl. or movit. services. // The "if requested" part can come from query string qglsl=1 or when // a service beginning with glsl. or movit. appears in the XML. - if ( mlt_properties_get_int( context->params, "qglsl" ) ) + if ( mlt_properties_get_int( context->params, "qglsl" ) && strcmp( id, "xml-nogl" ) ) context->qglsl = mlt_factory_consumer( profile, "qglsl", NULL ); // Setup SAX callbacks for second pass -- 2.39.2