From: Dan Dennedy Date: Sat, 22 Sep 2012 20:53:04 +0000 (-0700) Subject: fix letting xml playlist load like virtual clip X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=9c06e834c5e789a5e40b317c15e725c1693c6a28;p=mlt fix letting xml playlist load like virtual clip If an application wants to detect if deserialized XML is a playlist or mulitrack project, then it can check the new _original_type and _original_resource properties. --- diff --git a/src/modules/xml/producer_xml.c b/src/modules/xml/producer_xml.c index 2baec97d..fa5d4d5b 100644 --- a/src/modules/xml/producer_xml.c +++ b/src/modules/xml/producer_xml.c @@ -1734,8 +1734,17 @@ mlt_producer producer_xml_init( mlt_profile profile, mlt_service_type servtype, if ( getenv( "MLT_XML_DEEP" ) == NULL ) { // Now assign additional properties - if ( is_filename && mlt_service_identify( service ) == tractor_type ) + if ( is_filename && ( + mlt_service_identify( service ) == tractor_type || + mlt_service_identify( service ) == playlist_type || + mlt_service_identify( service ) == multitrack_type ) ) + { + mlt_properties_set_int( properties, "_original_type", + mlt_service_identify( service ) ); + mlt_properties_set( properties, "_original_resource", + mlt_properties_get( properties, "resource" ) ); mlt_properties_set( properties, "resource", data ); + } // This tells consumer_xml not to deep copy mlt_properties_set( properties, "xml", "was here" );