Don't give ASSETMAP/VOLINDEX an .xml suffix with interop DCPs.
authorCarl Hetherington <cth@carlh.net>
Mon, 6 Jan 2014 13:12:56 +0000 (13:12 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 6 Jan 2014 13:12:56 +0000 (13:12 +0000)
src/dcp.cc
src/dcp.h

index 2f2c0e39ce8df060c8edca2ac4a30f44ed4a22df..eaa88367725049e6c6076a7011559a1aa9bd6dfa 100644 (file)
@@ -74,7 +74,7 @@ DCP::write_xml (bool interop, XMLMetadata const & metadata, shared_ptr<const Sig
        string pkl_uuid = make_uuid ();
        string pkl_path = write_pkl (pkl_uuid, interop, metadata, signer);
        
-       write_volindex ();
+       write_volindex (interop);
        write_assetmap (pkl_uuid, boost::filesystem::file_size (pkl_path), interop, metadata);
 }
 
@@ -127,11 +127,15 @@ DCP::write_pkl (string pkl_uuid, bool interop, XMLMetadata const & metadata, sha
 }
 
 void
-DCP::write_volindex () const
+DCP::write_volindex (bool interop) const
 {
        boost::filesystem::path p;
        p /= _directory;
-       p /= "VOLINDEX.xml";
+       if (interop) {
+               p /= "VOLINDEX";
+       } else {
+               p /= "VOLINDEX.xml";
+       }
 
        xmlpp::Document doc;
        xmlpp::Element* root = doc.create_root_node ("VolumeIndex", "http://www.smpte-ra.org/schemas/429-9/2007/AM");
@@ -144,7 +148,11 @@ DCP::write_assetmap (string pkl_uuid, int pkl_length, bool interop, XMLMetadata
 {
        boost::filesystem::path p;
        p /= _directory;
-       p /= "ASSETMAP.xml";
+       if (interop) {
+               p /= "ASSETMAP";
+       } else {
+               p /= "ASSETMAP.xml";
+       }
 
        xmlpp::Document doc;
        xmlpp::Element* root;
index 635a972d65a07c3e961abaacd21741effb043a02..59790f0967da465c8854ce57ec02fb1fc3975d5f 100644 (file)
--- a/src/dcp.h
+++ b/src/dcp.h
@@ -129,7 +129,7 @@ private:
        std::string write_pkl (std::string pkl_uuid, bool, XMLMetadata const &, boost::shared_ptr<const Signer>) const;
        
        /** Write the VOLINDEX file */
-       void write_volindex () const;
+       void write_volindex (bool) const;
 
        /** Write the ASSETMAP file.
         *  @param pkl_uuid UUID of our PKL.