]> git.sesse.net Git - mlt/commitdiff
Add producer xml-nogl to disable auto-qglsl creation.
authorDan Dennedy <dan@dennedy.org>
Fri, 13 Sep 2013 02:59:19 +0000 (19:59 -0700)
committerDan Dennedy <dan@dennedy.org>
Fri, 13 Sep 2013 02:59:19 +0000 (19:59 -0700)
Sometimes you want to load MLT XML while ignoring the presence of OpenGL
filters and transitions.

src/modules/xml/factory.c
src/modules/xml/producer_xml-nogl.yml [new file with mode: 0644]
src/modules/xml/producer_xml-string.yml
src/modules/xml/producer_xml.c

index 5854adbbf94cf7290ab0c9859b63596bb6abecf2..cc941ae20ed3d9f40690cf2e890cfb84c89ac97b 100644 (file)
@@ -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 (file)
index 0000000..1dfc60c
--- /dev/null
@@ -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.
index 8e0010e19fd5ca675e5f0e7d90295d51673ad245..4419b200a48e3243b7929b2b079a9307494a43a9 100644 (file)
@@ -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.
index 526e95c9df085edc553aa9f9d681c15538c7df2c..d7af2d4bac45a80eb835907fae8236d3d9970e13 100644 (file)
@@ -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