summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-09-09 12:48:47 +0100
committerCarl Hetherington <cth@carlh.net>2012-09-09 12:48:47 +0100
commit5c29a3586ea262abcc8829bf267d38d8a5a84d9b (patch)
tree394c46a1b18d0b02b19b3b99439fdb5e33e11b85 /test
parent403c1e43d7e12af9ae72291f4bdff78fd242f9f6 (diff)
Somewhat hacky rearrangement to support multiple CPLs per DCP.
Diffstat (limited to 'test')
-rw-r--r--test/ref/DCP/81fb54df-e1bf-4647-8788-ea7ba154375b_cpl.xml (renamed from test/ref/DCP/9892e944-5046-4dbb-af7c-f50742f62fc2_cpl.xml)10
-rw-r--r--test/ref/DCP/ASSETMAP.xml16
-rw-r--r--test/ref/DCP/audio.mxfbin305326 -> 305326 bytes
-rw-r--r--test/ref/DCP/df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb_pkl.xml20
-rw-r--r--test/ref/DCP/video.mxfbin26080 -> 26080 bytes
-rw-r--r--test/ref/info.log100
-rw-r--r--test/tests.cc20
7 files changed, 97 insertions, 69 deletions
diff --git a/test/ref/DCP/9892e944-5046-4dbb-af7c-f50742f62fc2_cpl.xml b/test/ref/DCP/81fb54df-e1bf-4647-8788-ea7ba154375b_cpl.xml
index 1cd273fc..59d50075 100644
--- a/test/ref/DCP/9892e944-5046-4dbb-af7c-f50742f62fc2_cpl.xml
+++ b/test/ref/DCP/81fb54df-e1bf-4647-8788-ea7ba154375b_cpl.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<CompositionPlaylist xmlns="http://www.smpte-ra.org/schemas/429-7/2006/CPL">
- <Id>urn:uuid:9892e944-5046-4dbb-af7c-f50742f62fc2</Id>
+ <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
<AnnotationText>A Test DCP</AnnotationText>
<IssueDate>2012-07-17T04:45:18+00:00</IssueDate>
<Creator>OpenDCP 0.0.25</Creator>
<ContentTitleText>A Test DCP</ContentTitleText>
<ContentKind>feature</ContentKind>
<ContentVersion>
- <Id>urn:uri:9892e944-5046-4dbb-af7c-f50742f62fc2_2012-07-17T04:45:18+00:00</Id>
- <LabelText>9892e944-5046-4dbb-af7c-f50742f62fc2_2012-07-17T04:45:18+00:00</LabelText>
+ <Id>urn:uri:81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00</Id>
+ <LabelText>81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00</LabelText>
</ContentVersion>
<RatingList/>
<ReelList>
@@ -16,7 +16,7 @@
<Id>urn:uuid:379fa64c-ad71-46cf-bef7-b45624006610</Id>
<AssetList>
<MainPicture>
- <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
+ <Id>urn:uuid:d36f4bb3-c4fa-4a95-9915-6fec3110cd71</Id>
<AnnotationText>video.mxf</AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
@@ -26,7 +26,7 @@
<ScreenAspectRatio>32 32</ScreenAspectRatio>
</MainPicture>
<MainSound>
- <Id>urn:uuid:67b9341e-cadd-4dac-9d5c-f5a1d59f2d06</Id>
+ <Id>urn:uuid:c38bdd62-ce03-4988-8603-195f134207c7</Id>
<AnnotationText>audio.mxf</AnnotationText>
<EditRate>24 1</EditRate>
<IntrinsicDuration>24</IntrinsicDuration>
diff --git a/test/ref/DCP/ASSETMAP.xml b/test/ref/DCP/ASSETMAP.xml
index b0168478..defe18da 100644
--- a/test/ref/DCP/ASSETMAP.xml
+++ b/test/ref/DCP/ASSETMAP.xml
@@ -19,10 +19,10 @@
</ChunkList>
</Asset>
<Asset>
- <Id>urn:uuid:9892e944-5046-4dbb-af7c-f50742f62fc2</Id>
+ <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
<ChunkList>
<Chunk>
- <Path>9892e944-5046-4dbb-af7c-f50742f62fc2_cpl.xml</Path>
+ <Path>81fb54df-e1bf-4647-8788-ea7ba154375b_cpl.xml</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
<Length>1526</Length>
@@ -30,24 +30,24 @@
</ChunkList>
</Asset>
<Asset>
- <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
+ <Id>urn:uuid:c38bdd62-ce03-4988-8603-195f134207c7</Id>
<ChunkList>
<Chunk>
- <Path>video.mxf</Path>
+ <Path>audio.mxf</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>26080</Length>
+ <Length>305326</Length>
</Chunk>
</ChunkList>
</Asset>
<Asset>
- <Id>urn:uuid:67b9341e-cadd-4dac-9d5c-f5a1d59f2d06</Id>
+ <Id>urn:uuid:d36f4bb3-c4fa-4a95-9915-6fec3110cd71</Id>
<ChunkList>
<Chunk>
- <Path>audio.mxf</Path>
+ <Path>video.mxf</Path>
<VolumeIndex>1</VolumeIndex>
<Offset>0</Offset>
- <Length>305326</Length>
+ <Length>26080</Length>
</Chunk>
</ChunkList>
</Asset>
diff --git a/test/ref/DCP/audio.mxf b/test/ref/DCP/audio.mxf
index 52f92d21..9bc735af 100644
--- a/test/ref/DCP/audio.mxf
+++ b/test/ref/DCP/audio.mxf
Binary files differ
diff --git a/test/ref/DCP/df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb_pkl.xml b/test/ref/DCP/df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb_pkl.xml
index 98e3db81..7a8ec697 100644
--- a/test/ref/DCP/df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb_pkl.xml
+++ b/test/ref/DCP/df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb_pkl.xml
@@ -7,22 +7,22 @@
<Creator>OpenDCP 0.0.25</Creator>
<AssetList>
<Asset>
- <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
- <AnnotationText>video.mxf</AnnotationText>
- <Hash>VB9LCTmiD9OLlw4SvrEWUm5d67Q=</Hash>
- <Size>26080</Size>
+ <Id>urn:uuid:c38bdd62-ce03-4988-8603-195f134207c7</Id>
+ <AnnotationText>audio.mxf</AnnotationText>
+ <Hash>+qImGHkt/XouNaJ1V/+7BtcB4VU=</Hash>
+ <Size>305326</Size>
<Type>application/mxf</Type>
</Asset>
<Asset>
- <Id>urn:uuid:67b9341e-cadd-4dac-9d5c-f5a1d59f2d06</Id>
- <AnnotationText>audio.mxf</AnnotationText>
- <Hash>HapNpn7MjiJLa1OHRI61Rx8N/is=</Hash>
- <Size>305326</Size>
+ <Id>urn:uuid:d36f4bb3-c4fa-4a95-9915-6fec3110cd71</Id>
+ <AnnotationText>video.mxf</AnnotationText>
+ <Hash>E2vhyxdJQhEzSQZdp31w84ZZpfk=</Hash>
+ <Size>26080</Size>
<Type>application/mxf</Type>
</Asset>
<Asset>
- <Id>urn:uuid:9892e944-5046-4dbb-af7c-f50742f62fc2</Id>
- <Hash>PbXuvpUOKccTLMxg/lEbaXvNCT4=</Hash>
+ <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id>
+ <Hash>TTn7vvdUQi/G+KaW1Pym/DjxULM=</Hash>
<Size>1526</Size>
<Type>text/xml</Type>
</Asset>
diff --git a/test/ref/DCP/video.mxf b/test/ref/DCP/video.mxf
index 70040fc3..645fb85a 100644
--- a/test/ref/DCP/video.mxf
+++ b/test/ref/DCP/video.mxf
Binary files differ
diff --git a/test/ref/info.log b/test/ref/info.log
index ba0c9991..fe961a32 100644
--- a/test/ref/info.log
+++ b/test/ref/info.log
@@ -1,49 +1,71 @@
DCP: ../libdcp-test/ASTERIX_TSR_F_FR-DE_51_2K_20120411_SE_2D
- Length: 1439
- Frames per second: 24
-Reel 1
-Reel 2
- Subtitle: 30 subtitles in Custom
+ CPL: ASTERIX_TSR_F_FR-DE_51_2K_20120411_SE_2D
+ Length: 1439
+ Frames per second: 24
+ Reel 1
+ Reel 2
+ Subtitle: 30 subtitles in Custom
DCP: ../libdcp-test/WRECK-IT-RALPH_TLR-A-3D_S_EN-DEFR_INT_51_2K_DI_20120620_TEU_i3D
- Length: 3385
- Frames per second: 24
-Reel 1
+ CPL: WRECK-IT-RALPH_TLR-A-3D_S_EN-DEFR_INT_51_2K_DI_20120620_TEU_i3D
+ Length: 3385
+ Frames per second: 24
+ Reel 1
DCP: ../libdcp-test/AVATAR-3D_TLR-H_F_EN-XX_INTL-TXTD_2K_51_TCF_20091022_DUK-i3D-ngb
- Length: 4960
- Frames per second: 24
-Reel 1
+ CPL: AVATAR-3D_TLR-H_F_EN-XX_INTL-TXTD_2K_51_TCF_20091022_DUK-i3D-ngb
+ Length: 4960
+ Frames per second: 24
+ Reel 1
DCP: ../libdcp-test/END-OF-TIME_TLR_F_XX-XX_CH_51_2K_LOK_20120726_DGL_OV
- Length: 2865
- Frames per second: 24
-Reel 1
-Reel 2
+ CPL:
+ Length: 2865
+ Frames per second: 24
+ Reel 1
+ Reel 2
DCP: ../libdcp-test/THE-GUARD_TRL_F_EN-DE-FR_CH_51_2K_20110718_TIT
- Length: 3201
- Frames per second: 24
-Reel 1
+ CPL: THE-GUARD_TRL_F_EN-DE-FR_CH_51_2K_20110718_TIT
+ Length: 3201
+ Frames per second: 24
+ Reel 1
+DCP: ../libdcp-test/SANS-ISSUE_TLR_F_EN-FR_FR_51_2K_SND_20120316_ECL_OV
+ CPL: SANS-ISSUE_TLR_F_FR-XX_FR_51_2K_SND_20120316_ECL_OV
+ Length: 2972
+ Frames per second: 24
+ Reel 1
+ Reel 2
+ CPL: SANS-ISSUE_TLR_F_EN-FR_FR_51_2K_SND_20120316_ECL_OV
+ Length: 2972
+ Frames per second: 24
+ Reel 1
+ Reel 2
+ Subtitle: 49 subtitles in French
DCP: ../libdcp-test/BARBARA_TLR_F_DE-FR_CH_51_2K_LOK_20120410_OV
- Length: 2917
- Frames per second: 24
-Reel 1
- Subtitle: 31 subtitles in French
+ CPL: BARBARA_TLR_F_DE-FR_CH_51_2K_LOK_20120410_OV
+ Length: 2917
+ Frames per second: 24
+ Reel 1
+ Subtitle: 31 subtitles in French
DCP: ../libdcp-test/MACHINE-GUN-PREACH_TLR-1_F_EN-de-fr_CH_51_2K_TIT_20111107
- Length: 3513
- Frames per second: 24
-Reel 1
- Subtitle: 94 subtitles in English
+ CPL: MACHINE-GUN-PREACH_TLR-1_F_EN-de-fr_CH_51_2K_TIT_20111107
+ Length: 3513
+ Frames per second: 24
+ Reel 1
+ Subtitle: 94 subtitles in English
DCP: ../libdcp-test/ASTERIX_TLR-01_F_FR-DE_CH_51_2K_FRE_20120730_DGL_OV
- Length: 3080
- Frames per second: 24
-Reel 1
- Subtitle: 49 subtitles in French
+ CPL:
+ Length: 3080
+ Frames per second: 24
+ Reel 1
+ Subtitle: 49 subtitles in French
DCP: ../libdcp-test/EPIC-3D_TLR-D_S_EN-DE-FR_CH_51_48_ST_20120718_TIT_i3D-ngb_OV
- Length: 3166
- Frames per second: 24
-Reel 1
- Subtitle: 32 subtitles in English
+ CPL:
+ Length: 3166
+ Frames per second: 24
+ Reel 1
+ Subtitle: 32 subtitles in English
DCP: ../libdcp-test/ELLES_TLR_C_FR-DE_20_2K_20120412_SE
- Length: 2794
- Frames per second: 24
-Reel 1
-Reel 2
- Subtitle: 52 subtitles in Custom
+ CPL: ELLES_TLR_C_FR-DE_20_2K_20120412_SE
+ Length: 2794
+ Frames per second: 24
+ Reel 1
+ Reel 2
+ Subtitle: 52 subtitles in Custom
diff --git a/test/tests.cc b/test/tests.cc
index 43c95905..ce9dae75 100644
--- a/test/tests.cc
+++ b/test/tests.cc
@@ -63,7 +63,8 @@ BOOST_AUTO_TEST_CASE (dcp_test)
t->issue_date = "2012-07-17T04:45:18+00:00";
filesystem::remove_all ("build/test/foo");
filesystem::create_directories ("build/test/foo");
- libdcp::DCP d ("build/test/foo", "A Test DCP", libdcp::FEATURE, 24, 24);
+ libdcp::DCP d ("build/test/foo");
+ shared_ptr<libdcp::CPL> cpl (new libdcp::CPL ("build/test/foo", "A Test DCP", libdcp::FEATURE, 24, 24));
shared_ptr<libdcp::MonoPictureAsset> mp (new libdcp::MonoPictureAsset (
sigc::ptr_fun (&j2c),
@@ -86,14 +87,15 @@ BOOST_AUTO_TEST_CASE (dcp_test)
2
));
- d.add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (mp, ms, shared_ptr<libdcp::SubtitleAsset> ())));
+ cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (mp, ms, shared_ptr<libdcp::SubtitleAsset> ())));
+ d.add_cpl (cpl);
d.write_xml ();
}
BOOST_AUTO_TEST_CASE (error_test)
{
- libdcp::DCP d ("build/test/bar", "A Test DCP", libdcp::TEST, 24, 24);
+ libdcp::DCP d ("build/test/bar");
vector<string> p;
p.push_back ("frobozz");
@@ -104,11 +106,15 @@ BOOST_AUTO_TEST_CASE (error_test)
BOOST_AUTO_TEST_CASE (read_dcp)
{
libdcp::DCP d ("test/ref/DCP");
+ d.read ();
- BOOST_CHECK_EQUAL (d.name(), "A Test DCP");
- BOOST_CHECK_EQUAL (d.content_kind(), libdcp::FEATURE);
- BOOST_CHECK_EQUAL (d.frames_per_second(), 24);
- BOOST_CHECK_EQUAL (d.length(), 24);
+ list<shared_ptr<const libdcp::CPL> > cpls = d.cpls ();
+ BOOST_CHECK_EQUAL (cpls.size(), 1);
+
+ BOOST_CHECK_EQUAL (cpls.front()->name(), "A Test DCP");
+ BOOST_CHECK_EQUAL (cpls.front()->content_kind(), libdcp::FEATURE);
+ BOOST_CHECK_EQUAL (cpls.front()->frames_per_second(), 24);
+ BOOST_CHECK_EQUAL (cpls.front()->length(), 24);
}
BOOST_AUTO_TEST_CASE (subtitles1)