diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-21 00:53:55 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-21 21:57:18 +0200 |
| commit | 4b2b565a03f26c399960416efeed300dd80e401b (patch) | |
| tree | 853c5efe4b1b21290ecdcf2c623d53d2e47df10c | |
| parent | cdd98db2de839a5ef14b3c9c67a58392a8e123c1 (diff) | |
Adapt for changes in parent branch, and test churn.
| -rw-r--r-- | src/combine.cc | 12 | ||||
| -rw-r--r-- | src/combine.h | 12 | ||||
| -rw-r--r-- | test/combine_test.cc | 39 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test1/ASSETMAP.xml | 6 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test1/audio.mxf | bin | 161326 -> 161326 bytes | |||
| -rw-r--r-- | test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml | 4 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test1/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml (renamed from test/ref/DCP/dcp_test1/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml) | 6 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test7/ASSETMAP | 6 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test7/audio.mxf | bin | 161326 -> 161326 bytes | |||
| -rw-r--r-- | test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml | 4 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test7/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml (renamed from test/ref/DCP/dcp_test7/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml) | 6 | ||||
| -rw-r--r-- | test/ref/cpl_metadata_test1.xml | 4 | ||||
| -rw-r--r-- | test/ref/cpl_metadata_test2.xml | 4 | ||||
| -rw-r--r-- | test/test.cc | 22 | ||||
| -rw-r--r-- | test/verify_test.cc | 12 |
15 files changed, 75 insertions, 62 deletions
diff --git a/src/combine.cc b/src/combine.cc index 0e262fce..65cd3d0b 100644 --- a/src/combine.cc +++ b/src/combine.cc @@ -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); } diff --git a/src/combine.h b/src/combine.h index 5d40d4d1..3d8a6284 100644 --- a/src/combine.h +++ b/src/combine.h @@ -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>() + ); } diff --git a/test/combine_test.cc b/test/combine_test.cc index 70c55b90..c5d2f4a7 100644 --- a/test/combine_test.cc +++ b/test/combine_test.cc @@ -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; diff --git a/test/ref/DCP/dcp_test1/ASSETMAP.xml b/test/ref/DCP/dcp_test1/ASSETMAP.xml index 401c6c6d..cf2fdaa7 100644 --- a/test/ref/DCP/dcp_test1/ASSETMAP.xml +++ b/test/ref/DCP/dcp_test1/ASSETMAP.xml @@ -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> diff --git a/test/ref/DCP/dcp_test1/audio.mxf b/test/ref/DCP/dcp_test1/audio.mxf Binary files differindex 62158f3f..b58ff436 100644 --- a/test/ref/DCP/dcp_test1/audio.mxf +++ b/test/ref/DCP/dcp_test1/audio.mxf diff --git a/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml b/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml index 682ae510..042b7be2 100644 --- a/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml +++ b/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml @@ -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_cd49971e-bf4c-4594-8474-54ebef09a40c.xml index 105a7110..c93f3d43 100644 --- a/test/ref/DCP/dcp_test1/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml +++ b/test/ref/DCP/dcp_test1/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml @@ -1,6 +1,6 @@ <?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> + <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> @@ -9,7 +9,7 @@ <Asset> <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id> <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText> - <Hash>xU8Fk6atIPk9mlT9F1n9s+FgF8c=</Hash> + <Hash>ubRkmdOx95G/R77P6U8MSb/2XYE=</Hash> <Size>1585</Size> <Type>text/xml</Type> </Asset> @@ -23,7 +23,7 @@ <Asset> <Id>urn:uuid:9482e87d-292d-4e0e-a98d-c61822b60fe9</Id> <AnnotationText>9482e87d-292d-4e0e-a98d-c61822b60fe9</AnnotationText> - <Hash>ifmC1P7fjigb1oVxx6xs3Paz/GY=</Hash> + <Hash>cb1OLhgHG9svy7G8hoTSPpltzhw=</Hash> <Size>161326</Size> <Type>application/mxf</Type> </Asset> diff --git a/test/ref/DCP/dcp_test7/ASSETMAP b/test/ref/DCP/dcp_test7/ASSETMAP index 4a2bb306..b410f5ed 100644 --- a/test/ref/DCP/dcp_test7/ASSETMAP +++ b/test/ref/DCP/dcp_test7/ASSETMAP @@ -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> diff --git a/test/ref/DCP/dcp_test7/audio.mxf b/test/ref/DCP/dcp_test7/audio.mxf Binary files differindex 62158f3f..b58ff436 100644 --- a/test/ref/DCP/dcp_test7/audio.mxf +++ b/test/ref/DCP/dcp_test7/audio.mxf diff --git a/test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml b/test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml index 4cce722e..aa966ea6 100644 --- a/test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml +++ b/test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml @@ -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_cd49971e-bf4c-4594-8474-54ebef09a40c.xml index f526f380..7c980d47 100644 --- a/test/ref/DCP/dcp_test7/pkl_18be072e-5a0f-44e1-b2eb-c8a52ae12789.xml +++ b/test/ref/DCP/dcp_test7/pkl_cd49971e-bf4c-4594-8474-54ebef09a40c.xml @@ -1,6 +1,6 @@ <?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> + <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> @@ -9,7 +9,7 @@ <Asset> <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id> <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText> - <Hash>6pwcsW6Ysnzp0U5khSsM4vYe5bM=</Hash> + <Hash>jI0HRE3Ncpe2bQnfFWOSvcgCkqk=</Hash> <Size>1587</Size> <Type>text/xml;asdcpKind=CPL</Type> </Asset> @@ -23,7 +23,7 @@ <Asset> <Id>urn:uuid:9482e87d-292d-4e0e-a98d-c61822b60fe9</Id> <AnnotationText>9482e87d-292d-4e0e-a98d-c61822b60fe9</AnnotationText> - <Hash>ifmC1P7fjigb1oVxx6xs3Paz/GY=</Hash> + <Hash>cb1OLhgHG9svy7G8hoTSPpltzhw=</Hash> <Size>161326</Size> <Type>application/x-smpte-mxf;asdcpKind=Sound</Type> </Asset> diff --git a/test/ref/cpl_metadata_test1.xml b/test/ref/cpl_metadata_test1.xml index 5d49e765..4046708f 100644 --- a/test/ref/cpl_metadata_test1.xml +++ b/test/ref/cpl_metadata_test1.xml @@ -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> diff --git a/test/ref/cpl_metadata_test2.xml b/test/ref/cpl_metadata_test2.xml index a7b20ff3..e3829f1a 100644 --- a/test/ref/cpl_metadata_test2.xml +++ b/test/ref/cpl_metadata_test2.xml @@ -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/> diff --git a/test/test.cc b/test/test.cc index 62013687..382ffd77 100644 --- a/test/test.cc +++ b/test/test.cc @@ -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; diff --git a/test/verify_test.cc b/test/verify_test.cc index 47828ca5..645393a0 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -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 ); } |
