Adapt for changes in parent branch, and test churn.
authorCarl Hetherington <cth@carlh.net>
Sun, 20 Sep 2020 22:53:55 +0000 (00:53 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 20 Sep 2020 23:18:37 +0000 (01:18 +0200)
17 files changed:
src/combine.cc
src/combine.h
test/combine_test.cc
test/ref/DCP/dcp_test1/ASSETMAP.xml
test/ref/DCP/dcp_test1/audio.mxf
test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
test/ref/DCP/dcp_test1/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml [deleted file]
test/ref/DCP/dcp_test1/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml [new file with mode: 0644]
test/ref/DCP/dcp_test7/ASSETMAP
test/ref/DCP/dcp_test7/audio.mxf
test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml
test/ref/DCP/dcp_test7/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml [deleted file]
test/ref/DCP/dcp_test7/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml [new file with mode: 0644]
test/ref/cpl_metadata_test1.xml
test/ref/cpl_metadata_test2.xml
test/test.cc
test/verify_test.cc

index 0e262fce064ef16131094f4561bd5fd8e9f74e3e..65cd3d0b6453afc628b0176c36f1decfdad2e3c4 100644 (file)
@@ -94,7 +94,15 @@ create_hard_link_or_copy (boost::filesystem::path from, boost::filesystem::path
 
 
 void
-dcp::combine (vector<boost::filesystem::path> inputs, boost::filesystem::path output, shared_ptr<const CertificateChain> signer)
+dcp::combine (
+       vector<boost::filesystem::path> inputs,
+       boost::filesystem::path output,
+       string issuer,
+       string creator,
+       string issue_date,
+       string annotation_text,
+       shared_ptr<const CertificateChain> signer
+       )
 {
        using namespace boost::filesystem;
 
@@ -161,5 +169,5 @@ dcp::combine (vector<boost::filesystem::path> inputs, boost::filesystem::path ou
        }
 
        output_dcp.resolve_refs (assets);
-       output_dcp.write_xml (*standard, dcp::XMLMetadata(), signer);
+       output_dcp.write_xml (*standard, issuer, creator, issue_date, annotation_text, signer);
 }
index 5d40d4d1274a584347b3d156259a029af1f558cb..3d8a6284f3b4e290e4d83c80317b3798cbd0ce89 100644 (file)
@@ -32,6 +32,8 @@
 */
 
 
+#include "compose.hpp"
+#include "version.h"
 #include <boost/filesystem.hpp>
 
 
@@ -39,7 +41,15 @@ namespace dcp {
 
 class CertificateChain;
 
-void combine (std::vector<boost::filesystem::path> inputs, boost::filesystem::path output, boost::shared_ptr<const CertificateChain> signer = boost::shared_ptr<CertificateChain>());
+void combine (
+       std::vector<boost::filesystem::path> inputs,
+       boost::filesystem::path output,
+       std::string issuer = String::compose("libdcp %1", dcp::version),
+       std::string creator = String::compose("libdcp %1", dcp::version),
+       std::string issue_date = LocalTime().as_string(),
+       std::string annotation_text = String::compose("Created by libdcp %1", dcp::version),
+       boost::shared_ptr<const CertificateChain> signer = boost::shared_ptr<CertificateChain>()
+       );
 
 }
 
index 70c55b90a550fecbf245c5688d9d9f808545630b..c5d2f4a782353dc951f34664fe3b4fd6f853fd5e 100644 (file)
@@ -165,7 +165,7 @@ BOOST_AUTO_TEST_CASE (combine_two_dcps_with_same_asset_filenames_test)
        boost::filesystem::path const out = "build/test/combine_two_dcps_with_same_asset_filenames_test";
 
        shared_ptr<dcp::DCP> second = make_simple ("build/test/combine_input2");
-       second->write_xml (dcp::SMPTE, dcp::XMLMetadata());
+       second->write_xml (dcp::SMPTE);
 
        remove_all (out);
        vector<path> inputs;
@@ -185,10 +185,10 @@ BOOST_AUTO_TEST_CASE (combine_two_dcps_with_interop_subs_test)
        boost::filesystem::path const out = "build/test/combine_two_dcps_with_interop_subs_test";
 
        shared_ptr<dcp::DCP> first = make_simple_with_interop_subs ("build/test/combine_input1");
-       first->write_xml (dcp::INTEROP, dcp::XMLMetadata());
+       first->write_xml (dcp::INTEROP);
 
        shared_ptr<dcp::DCP> second = make_simple_with_interop_subs ("build/test/combine_input2");
-       second->write_xml (dcp::INTEROP, dcp::XMLMetadata());
+       second->write_xml (dcp::INTEROP);
 
        remove_all (out);
        vector<path> inputs;
@@ -208,10 +208,10 @@ BOOST_AUTO_TEST_CASE (combine_two_dcps_with_smpte_subs_test)
        boost::filesystem::path const out = "build/test/combine_two_dcps_with_smpte_subs_test";
 
        shared_ptr<dcp::DCP> first = make_simple_with_smpte_subs ("build/test/combine_input1");
-       first->write_xml (dcp::SMPTE, dcp::XMLMetadata());
+       first->write_xml (dcp::SMPTE);
 
        shared_ptr<dcp::DCP> second = make_simple_with_smpte_subs ("build/test/combine_input2");
-       second->write_xml (dcp::SMPTE, dcp::XMLMetadata());
+       second->write_xml (dcp::SMPTE);
 
        remove_all (out);
        vector<path> inputs;
@@ -231,10 +231,10 @@ BOOST_AUTO_TEST_CASE (combine_two_dcps_with_interop_ccaps_test)
        boost::filesystem::path const out = "build/test/combine_two_dcps_with_interop_ccaps_test";
 
        shared_ptr<dcp::DCP> first = make_simple_with_interop_ccaps ("build/test/combine_input1");
-       first->write_xml (dcp::INTEROP, dcp::XMLMetadata());
+       first->write_xml (dcp::INTEROP);
 
        shared_ptr<dcp::DCP> second = make_simple_with_interop_ccaps ("build/test/combine_input2");
-       second->write_xml (dcp::INTEROP, dcp::XMLMetadata());
+       second->write_xml (dcp::INTEROP);
 
        remove_all (out);
        vector<path> inputs;
@@ -254,10 +254,10 @@ BOOST_AUTO_TEST_CASE (combine_two_dcps_with_smpte_ccaps_test)
        boost::filesystem::path const out = "build/test/combine_two_dcps_with_interop_ccaps_test";
 
        shared_ptr<dcp::DCP> first = make_simple_with_smpte_ccaps ("build/test/combine_input1");
-       first->write_xml (dcp::SMPTE, dcp::XMLMetadata());
+       first->write_xml (dcp::SMPTE);
 
        shared_ptr<dcp::DCP> second = make_simple_with_smpte_ccaps ("build/test/combine_input2");
-       second->write_xml (dcp::SMPTE, dcp::XMLMetadata());
+       second->write_xml (dcp::SMPTE);
 
        remove_all (out);
        vector<path> inputs;
@@ -277,10 +277,10 @@ BOOST_AUTO_TEST_CASE (combine_two_multi_reel_dcps)
        boost::filesystem::path const out = "build/test/combine_two_multi_reel_dcps";
 
        shared_ptr<dcp::DCP> first = make_simple ("build/test/combine_input1", 4);
-       first->write_xml (dcp::SMPTE, dcp::XMLMetadata());
+       first->write_xml (dcp::SMPTE);
 
        shared_ptr<dcp::DCP> second = make_simple ("build/test/combine_input2", 4);
-       second->write_xml (dcp::SMPTE, dcp::XMLMetadata());
+       second->write_xml (dcp::SMPTE);
 
        remove_all (out);
        vector<path> inputs;
@@ -299,32 +299,25 @@ BOOST_AUTO_TEST_CASE (combine_two_dcps_with_shared_asset)
        boost::filesystem::path const out = "build/test/combine_two_dcps_with_shared_asset";
 
        shared_ptr<dcp::DCP> first = make_simple ("build/test/combine_input1", 1);
-       first->write_xml (dcp::SMPTE, dcp::XMLMetadata());
+       first->write_xml (dcp::SMPTE);
 
        remove_all ("build/test/combine_input2");
        shared_ptr<dcp::DCP> second(new dcp::DCP("build/test/combine_input2"));
 
-       /* Some known metadata */
-       dcp::XMLMetadata xml_meta;
-       xml_meta.annotation_text = "A Test DCP";
-       xml_meta.issuer = "OpenDCP 0.0.25";
-       xml_meta.creator = "OpenDCP 0.0.25";
-       xml_meta.issue_date = "2012-07-17T04:45:18+00:00";
        dcp::MXFMetadata mxf_meta;
        mxf_meta.company_name = "OpenDCP";
-       mxf_meta.product_name = "OpenDCP";
        mxf_meta.product_version = "0.0.25";
 
        shared_ptr<dcp::CPL> cpl (new dcp::CPL("A Test DCP", dcp::FEATURE));
-       cpl->set_content_version_id ("urn:uuid:75ac29aa-42ac-1234-ecae-49251abefd11");
-       cpl->set_content_version_label_text ("content-version-label-text");
-       cpl->set_metadata (xml_meta);
+       cpl->set_content_version (
+               dcp::ContentVersion("urn:uuid:75ac29aa-42ac-1234-ecae-49251abefd11","content-version-label-text")
+               );
 
        shared_ptr<dcp::ReelMonoPictureAsset> pic(new dcp::ReelMonoPictureAsset(simple_picture("build/test/combine_input2", ""), 0));
        shared_ptr<dcp::ReelSoundAsset> sound(new dcp::ReelSoundAsset(first->cpls().front()->reels().front()->main_sound()->asset(), 0));
        cpl->add (shared_ptr<dcp::Reel>(new dcp::Reel(pic, sound)));
        second->add (cpl);
-       second->write_xml (dcp::SMPTE, dcp::XMLMetadata());
+       second->write_xml (dcp::SMPTE);
 
        remove_all (out);
        vector<path> inputs;
index 401c6c6d7a223dcef4cfdc0d47cf07dfc13145d3..cf2fdaa79ca3734edc2d34222675567461aeb0b3 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <AssetMap xmlns="http://www.smpte-ra.org/schemas/429-9/2007/AM">
-  <Id>urn:uuid:ae8a9818-872a-4f86-8493-11dfdea03e09</Id>
+  <Id>urn:uuid:63c3aece-c581-4603-b612-75e43f0c0430</Id>
   <AnnotationText>Created by libdcp</AnnotationText>
   <Creator>OpenDCP 0.0.25</Creator>
   <VolumeCount>1</VolumeCount>
@@ -8,11 +8,11 @@
   <Issuer>OpenDCP 0.0.25</Issuer>
   <AssetList>
     <Asset>
-      <Id>urn:uuid:18be072e-5a0f-44e1-b2eb-c8a52ae12789</Id>
+      <Id>urn:uuid:cd49971e-bf4c-4594-8474-54ebef09a40c</Id>
       <PackingList>true</PackingList>
       <ChunkList>
         <Chunk>
-          <Path>pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml</Path>
+          <Path>pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml</Path>
           <VolumeIndex>1</VolumeIndex>
           <Offset>0</Offset>
           <Length>1186</Length>
index 62158f3f17a7c9ce30301abb294847a07f25cf54..b58ff4363322a83b00a121952d1b4517804ab0b7 100644 (file)
Binary files a/test/ref/DCP/dcp_test1/audio.mxf and b/test/ref/DCP/dcp_test1/audio.mxf differ
index 682ae51005c291c302dde0fd5d1deb1e18e85de7..042b7be2822000e11137740523fa784d7f6d98ba 100644 (file)
@@ -14,7 +14,7 @@
   <RatingList/>
   <ReelList>
     <Reel>
-      <Id>urn:uuid:8e293965-f8ad-48c6-971d-261b01f65cdb</Id>
+      <Id>urn:uuid:48db27c3-4964-46a2-8b02-3e5570efb42d</Id>
       <AssetList>
         <MainPicture>
           <Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id>
@@ -34,7 +34,7 @@
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
           <Duration>24</Duration>
-          <Hash>ifmC1P7fjigb1oVxx6xs3Paz/GY=</Hash>
+          <Hash>cb1OLhgHG9svy7G8hoTSPpltzhw=</Hash>
         </MainSound>
       </AssetList>
     </Reel>
diff --git a/test/ref/DCP/dcp_test1/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml b/test/ref/DCP/dcp_test1/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml
deleted file mode 100644 (file)
index 105a711..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<PackingList xmlns="http://www.smpte-ra.org/schemas/429-8/2007/PKL">
-  <Id>urn:uuid:18be072e-5a0f-44e1-b2eb-c8a52ae12789</Id>
-  <AnnotationText>Created by libdcp</AnnotationText>
-  <IssueDate>2012-07-17T04:45:18+00:00</IssueDate>
-  <Issuer>OpenDCP 0.0.25</Issuer>
-  <Creator>OpenDCP 0.0.25</Creator>
-  <AssetList>
-    <Asset>
-      <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
-      <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
-      <Hash>xU8Fk6atIPk9mlT9F1n9s+FgF8c=</Hash>
-      <Size>1585</Size>
-      <Type>text/xml</Type>
-    </Asset>
-    <Asset>
-      <Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id>
-      <AnnotationText>1fab8bb0-cfaf-4225-ad6d-01768bc10470</AnnotationText>
-      <Hash>1uPB643nrQfpY+Y0AypGko+PiPE=</Hash>
-      <Size>26080</Size>
-      <Type>application/mxf</Type>
-    </Asset>
-    <Asset>
-      <Id>urn:uuid:9482e87d-292d-4e0e-a98d-c61822b60fe9</Id>
-      <AnnotationText>9482e87d-292d-4e0e-a98d-c61822b60fe9</AnnotationText>
-      <Hash>ifmC1P7fjigb1oVxx6xs3Paz/GY=</Hash>
-      <Size>161326</Size>
-      <Type>application/mxf</Type>
-    </Asset>
-  </AssetList>
-</PackingList>
diff --git a/test/ref/DCP/dcp_test1/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml b/test/ref/DCP/dcp_test1/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml
new file mode 100644 (file)
index 0000000..c93f3d4
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PackingList xmlns="http://www.smpte-ra.org/schemas/429-8/2007/PKL">
+  <Id>urn:uuid:cd49971e-bf4c-4594-8474-54ebef09a40c</Id>
+  <AnnotationText>Created by libdcp</AnnotationText>
+  <IssueDate>2012-07-17T04:45:18+00:00</IssueDate>
+  <Issuer>OpenDCP 0.0.25</Issuer>
+  <Creator>OpenDCP 0.0.25</Creator>
+  <AssetList>
+    <Asset>
+      <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
+      <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
+      <Hash>ubRkmdOx95G/R77P6U8MSb/2XYE=</Hash>
+      <Size>1585</Size>
+      <Type>text/xml</Type>
+    </Asset>
+    <Asset>
+      <Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id>
+      <AnnotationText>1fab8bb0-cfaf-4225-ad6d-01768bc10470</AnnotationText>
+      <Hash>1uPB643nrQfpY+Y0AypGko+PiPE=</Hash>
+      <Size>26080</Size>
+      <Type>application/mxf</Type>
+    </Asset>
+    <Asset>
+      <Id>urn:uuid:9482e87d-292d-4e0e-a98d-c61822b60fe9</Id>
+      <AnnotationText>9482e87d-292d-4e0e-a98d-c61822b60fe9</AnnotationText>
+      <Hash>cb1OLhgHG9svy7G8hoTSPpltzhw=</Hash>
+      <Size>161326</Size>
+      <Type>application/mxf</Type>
+    </Asset>
+  </AssetList>
+</PackingList>
index 4a2bb306ad1b59447d0a124d45b5f438bdeeb30f..b410f5ed6d4e0609ed8454c41755fe8559952b3f 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <AssetMap xmlns="http://www.digicine.com/PROTO-ASDCP-AM-20040311#">
-  <Id>urn:uuid:ae8a9818-872a-4f86-8493-11dfdea03e09</Id>
+  <Id>urn:uuid:63c3aece-c581-4603-b612-75e43f0c0430</Id>
   <AnnotationText>Created by libdcp</AnnotationText>
   <VolumeCount>1</VolumeCount>
   <IssueDate>2012-07-17T04:45:18+00:00</IssueDate>
@@ -8,11 +8,11 @@
   <Creator>OpenDCP 0.0.25</Creator>
   <AssetList>
     <Asset>
-      <Id>urn:uuid:18be072e-5a0f-44e1-b2eb-c8a52ae12789</Id>
+      <Id>urn:uuid:cd49971e-bf4c-4594-8474-54ebef09a40c</Id>
       <PackingList>true</PackingList>
       <ChunkList>
         <Chunk>
-          <Path>pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml</Path>
+          <Path>pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml</Path>
           <VolumeIndex>1</VolumeIndex>
           <Offset>0</Offset>
           <Length>1253</Length>
index 62158f3f17a7c9ce30301abb294847a07f25cf54..b58ff4363322a83b00a121952d1b4517804ab0b7 100644 (file)
Binary files a/test/ref/DCP/dcp_test7/audio.mxf and b/test/ref/DCP/dcp_test7/audio.mxf differ
index 4cce722e0d9c2a9b070aed6eb087ac7cbc5fc085..aa966ea644efa76f8ac42d09a3b204c7a9618cd7 100644 (file)
@@ -14,7 +14,7 @@
   <RatingList/>
   <ReelList>
     <Reel>
-      <Id>urn:uuid:8e293965-f8ad-48c6-971d-261b01f65cdb</Id>
+      <Id>urn:uuid:48db27c3-4964-46a2-8b02-3e5570efb42d</Id>
       <AssetList>
         <MainPicture>
           <Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id>
@@ -34,7 +34,7 @@
           <IntrinsicDuration>24</IntrinsicDuration>
           <EntryPoint>0</EntryPoint>
           <Duration>24</Duration>
-          <Hash>ifmC1P7fjigb1oVxx6xs3Paz/GY=</Hash>
+          <Hash>cb1OLhgHG9svy7G8hoTSPpltzhw=</Hash>
         </MainSound>
       </AssetList>
     </Reel>
diff --git a/test/ref/DCP/dcp_test7/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml b/test/ref/DCP/dcp_test7/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml
deleted file mode 100644 (file)
index f526f38..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<PackingList xmlns="http://www.digicine.com/PROTO-ASDCP-PKL-20040311#">
-  <Id>urn:uuid:18be072e-5a0f-44e1-b2eb-c8a52ae12789</Id>
-  <AnnotationText>Created by libdcp</AnnotationText>
-  <IssueDate>2012-07-17T04:45:18+00:00</IssueDate>
-  <Issuer>OpenDCP 0.0.25</Issuer>
-  <Creator>OpenDCP 0.0.25</Creator>
-  <AssetList>
-    <Asset>
-      <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
-      <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
-      <Hash>6pwcsW6Ysnzp0U5khSsM4vYe5bM=</Hash>
-      <Size>1587</Size>
-      <Type>text/xml;asdcpKind=CPL</Type>
-    </Asset>
-    <Asset>
-      <Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id>
-      <AnnotationText>1fab8bb0-cfaf-4225-ad6d-01768bc10470</AnnotationText>
-      <Hash>1uPB643nrQfpY+Y0AypGko+PiPE=</Hash>
-      <Size>26080</Size>
-      <Type>application/x-smpte-mxf;asdcpKind=Picture</Type>
-    </Asset>
-    <Asset>
-      <Id>urn:uuid:9482e87d-292d-4e0e-a98d-c61822b60fe9</Id>
-      <AnnotationText>9482e87d-292d-4e0e-a98d-c61822b60fe9</AnnotationText>
-      <Hash>ifmC1P7fjigb1oVxx6xs3Paz/GY=</Hash>
-      <Size>161326</Size>
-      <Type>application/x-smpte-mxf;asdcpKind=Sound</Type>
-    </Asset>
-  </AssetList>
-</PackingList>
diff --git a/test/ref/DCP/dcp_test7/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml b/test/ref/DCP/dcp_test7/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml
new file mode 100644 (file)
index 0000000..7c980d4
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PackingList xmlns="http://www.digicine.com/PROTO-ASDCP-PKL-20040311#">
+  <Id>urn:uuid:cd49971e-bf4c-4594-8474-54ebef09a40c</Id>
+  <AnnotationText>Created by libdcp</AnnotationText>
+  <IssueDate>2012-07-17T04:45:18+00:00</IssueDate>
+  <Issuer>OpenDCP 0.0.25</Issuer>
+  <Creator>OpenDCP 0.0.25</Creator>
+  <AssetList>
+    <Asset>
+      <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
+      <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText>
+      <Hash>jI0HRE3Ncpe2bQnfFWOSvcgCkqk=</Hash>
+      <Size>1587</Size>
+      <Type>text/xml;asdcpKind=CPL</Type>
+    </Asset>
+    <Asset>
+      <Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id>
+      <AnnotationText>1fab8bb0-cfaf-4225-ad6d-01768bc10470</AnnotationText>
+      <Hash>1uPB643nrQfpY+Y0AypGko+PiPE=</Hash>
+      <Size>26080</Size>
+      <Type>application/x-smpte-mxf;asdcpKind=Picture</Type>
+    </Asset>
+    <Asset>
+      <Id>urn:uuid:9482e87d-292d-4e0e-a98d-c61822b60fe9</Id>
+      <AnnotationText>9482e87d-292d-4e0e-a98d-c61822b60fe9</AnnotationText>
+      <Hash>cb1OLhgHG9svy7G8hoTSPpltzhw=</Hash>
+      <Size>161326</Size>
+      <Type>application/x-smpte-mxf;asdcpKind=Sound</Type>
+    </Asset>
+  </AssetList>
+</PackingList>
index 5d49e765e1ce4d2a5eeaabff5fb3f9d610101499..4046708fc619bec13200f9edc9fc4716ae54ca96 100644 (file)
@@ -14,7 +14,7 @@
   <RatingList/>
   <ReelList>
     <Reel>
-      <Id>urn:uuid:8b92bcee-62fc-4a33-a51a-816e9611ce85</Id>
+      <Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id>
       <AssetList>
         <MainPicture>
           <Id>urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516</Id>
@@ -39,7 +39,7 @@
           <Language>de-DE</Language>
         </MainSubtitle>
         <meta:CompositionMetadataAsset xmlns:meta="http://www.smpte-ra.org/schemas/429-16/2014/CPL-Metadata">
-          <Id>urn:uuid:77e1fb48-ce0c-4d29-bf88-8c3bfec8013a</Id>
+          <Id>urn:uuid:8b92bcee-62fc-4a33-a51a-816e9611ce85</Id>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <meta:FullContentTitleText language="de">full-content-title</meta:FullContentTitleText>
index a7b20ff36390d316f93c157c8b89fc39450ffec9..e3829f1aa51bdcc10b6de80f096c6643c59ac04f 100644 (file)
@@ -14,7 +14,7 @@
   <RatingList/>
   <ReelList>
     <Reel>
-      <Id>urn:uuid:8b92bcee-62fc-4a33-a51a-816e9611ce85</Id>
+      <Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id>
       <AssetList>
         <MainPicture>
           <Id>urn:uuid:46c3eb45-15e5-47d6-8684-d8641e4dc516</Id>
@@ -28,7 +28,7 @@
           <ScreenAspectRatio>1998 1080</ScreenAspectRatio>
         </MainPicture>
         <meta:CompositionMetadataAsset xmlns:meta="http://www.smpte-ra.org/schemas/429-16/2014/CPL-Metadata">
-          <Id>urn:uuid:77e1fb48-ce0c-4d29-bf88-8c3bfec8013a</Id>
+          <Id>urn:uuid:8b92bcee-62fc-4a33-a51a-816e9611ce85</Id>
           <EditRate>24 1</EditRate>
           <IntrinsicDuration>24</IntrinsicDuration>
           <meta:FullContentTitleText/>
index 62013687a8d83e97c8d7cf1c6c46a2c9fa16207d..382ffd77b0c990e339990c46cc4b6e29b5588b91 100644 (file)
@@ -67,6 +67,7 @@
 using std::string;
 using std::min;
 using std::list;
+using std::vector;
 using boost::shared_ptr;
 using boost::optional;
 
@@ -247,11 +248,6 @@ shared_ptr<dcp::DCP>
 make_simple (boost::filesystem::path path, int reels)
 {
        /* Some known metadata */
-       dcp::XMLMetadata xml_meta;
-       xml_meta.annotation_text = "A Test DCP";
-       xml_meta.issuer = "OpenDCP 0.0.25";
-       xml_meta.creator = "OpenDCP 0.0.25";
-       xml_meta.issue_date = "2012-07-17T04:45:18+00:00";
        dcp::MXFMetadata mxf_meta;
        mxf_meta.company_name = "OpenDCP";
        mxf_meta.product_name = "OpenDCP";
@@ -261,18 +257,24 @@ make_simple (boost::filesystem::path path, int reels)
        boost::filesystem::create_directories (path);
        shared_ptr<dcp::DCP> d (new dcp::DCP (path));
        shared_ptr<dcp::CPL> cpl (new dcp::CPL ("A Test DCP", dcp::FEATURE));
-       cpl->set_content_version_id ("urn:uuid:75ac29aa-42ac-1234-ecae-49251abefd11");
-       cpl->set_content_version_label_text ("content-version-label-text");
-       cpl->set_metadata (xml_meta);
+       cpl->set_annotation_text ("A Test DCP");
+       cpl->set_issuer ("OpenDCP 0.0.25");
+       cpl->set_creator ("OpenDCP 0.0.25");
+       cpl->set_issue_date ("2012-07-17T04:45:18+00:00");
+       cpl->set_content_version (
+               dcp::ContentVersion("urn:uuid:75ac29aa-42ac-1234-ecae-49251abefd11", "content-version-label-text")
+               );
 
        for (int i = 0; i < reels; ++i) {
                string suffix = reels == 1 ? "" : dcp::String::compose("%1", i);
 
                shared_ptr<dcp::MonoPictureAsset> mp = simple_picture (path, suffix);
 
-               shared_ptr<dcp::SoundAsset> ms (new dcp::SoundAsset (dcp::Fraction (24, 1), 48000, 1, dcp::SMPTE));
+               shared_ptr<dcp::SoundAsset> ms (new dcp::SoundAsset(dcp::Fraction(24, 1), 48000, 1, dcp::LanguageTag("en-US"), dcp::SMPTE));
                ms->set_metadata (mxf_meta);
-               shared_ptr<dcp::SoundAssetWriter> sound_writer = ms->start_write (path / dcp::String::compose("audio%1.mxf", suffix));
+               vector<dcp::Channel> active_channels;
+               active_channels.push_back (dcp::LEFT);
+               shared_ptr<dcp::SoundAssetWriter> sound_writer = ms->start_write (path / dcp::String::compose("audio%1.mxf", suffix), active_channels);
 
                SF_INFO info;
                info.format = 0;
index 47828ca58ae9f0e6648393ce7a44b781a2758021..645393a0f6fba1616e5874425e9aa5d2cc1d98c5 100644 (file)
@@ -141,7 +141,7 @@ BOOST_AUTO_TEST_CASE (verify_test1)
        list<dcp::VerificationNote> notes = dcp::verify (directories, &stage, &progress, xsd_test);
 
        boost::filesystem::path const cpl_file = "build/test/verify_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml";
-       boost::filesystem::path const pkl_file = "build/test/verify_test1/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml";
+       boost::filesystem::path const pkl_file = "build/test/verify_test1/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml";
        boost::filesystem::path const assetmap_file = "build/test/verify_test1/ASSETMAP.xml";
 
        list<pair<string, optional<boost::filesystem::path> > >::const_iterator st = stages.begin();
@@ -195,7 +195,7 @@ BOOST_AUTO_TEST_CASE (verify_test2)
 
        mod = fopen("build/test/verify_test2/audio.mxf", "r+b");
        BOOST_REQUIRE (mod);
-       fseek (mod, 4096, SEEK_SET);
+       BOOST_REQUIRE_EQUAL (fseek(mod, -64, SEEK_END), 0);
        BOOST_REQUIRE (fwrite (&x, sizeof(x), 1, mod) == 1);
        fclose (mod);
 
@@ -218,7 +218,7 @@ BOOST_AUTO_TEST_CASE (verify_test3)
        vector<boost::filesystem::path> directories = setup (1, 3);
 
        {
-               Editor e ("build/test/verify_test3/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml");
+               Editor e ("build/test/verify_test3/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml");
                e.replace ("<Hash>", "<Hash>x");
        }
 
@@ -274,7 +274,7 @@ static
 boost::filesystem::path
 pkl (int n)
 {
-       return dcp::String::compose("build/test/verify_test%1/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml", n);
+       return dcp::String::compose("build/test/verify_test%1/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml", n);
 }
 
 static
@@ -425,7 +425,7 @@ BOOST_AUTO_TEST_CASE (verify_test11)
 {
        check_after_replace (
                11, &pkl,
-               "<Id>urn:uuid:18b", "<Id>urn:uuid:x8b",
+               "<Id>urn:uuid:cd4", "<Id>urn:uuid:xd4",
                dcp::VerificationNote::XML_VALIDATION_ERROR
                );
 }
@@ -435,7 +435,7 @@ BOOST_AUTO_TEST_CASE (verify_test12)
 {
        check_after_replace (
                12, &asset_map,
-               "<Id>urn:uuid:ae8", "<Id>urn:uuid:xe8",
+               "<Id>urn:uuid:63c", "<Id>urn:uuid:x3c",
                dcp::VerificationNote::XML_VALIDATION_ERROR
                );
 }