diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-12-31 18:16:58 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-12-31 18:16:58 +0000 |
| commit | 4f902db0ad994910a34ca845225635ceefcac96e (patch) | |
| tree | adf80a8543c20082057f7ed1e75b46524257b2e1 /test | |
| parent | e651d843c513e8dbf0967735ea702a3795ac321d (diff) | |
Initial hacks.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ref/DCP/81fb54df-e1bf-4647-8788-ea7ba154375b_cpl.xml | 39 | ||||
| -rw-r--r-- | test/ref/DCP/ASSETMAP.xml | 55 | ||||
| -rw-r--r-- | test/ref/DCP/VOLINDEX.xml | 4 | ||||
| -rw-r--r-- | test/ref/DCP/audio.mxf | bin | 305326 -> 0 bytes | |||
| -rw-r--r-- | test/ref/DCP/df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb_pkl.xml | 30 | ||||
| -rw-r--r-- | test/ref/DCP/video.mxf | bin | 26080 -> 0 bytes | |||
| -rw-r--r-- | test/tests.cc | 57 |
7 files changed, 52 insertions, 133 deletions
diff --git a/test/ref/DCP/81fb54df-e1bf-4647-8788-ea7ba154375b_cpl.xml b/test/ref/DCP/81fb54df-e1bf-4647-8788-ea7ba154375b_cpl.xml deleted file mode 100644 index 59d50075..00000000 --- a/test/ref/DCP/81fb54df-e1bf-4647-8788-ea7ba154375b_cpl.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<CompositionPlaylist xmlns="http://www.smpte-ra.org/schemas/429-7/2006/CPL"> - <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: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> - <Reel> - <Id>urn:uuid:379fa64c-ad71-46cf-bef7-b45624006610</Id> - <AssetList> - <MainPicture> - <Id>urn:uuid:d36f4bb3-c4fa-4a95-9915-6fec3110cd71</Id> - <AnnotationText>video.mxf</AnnotationText> - <EditRate>24 1</EditRate> - <IntrinsicDuration>24</IntrinsicDuration> - <EntryPoint>0</EntryPoint> - <Duration>24</Duration> - <FrameRate>24 1</FrameRate> - <ScreenAspectRatio>32 32</ScreenAspectRatio> - </MainPicture> - <MainSound> - <Id>urn:uuid:c38bdd62-ce03-4988-8603-195f134207c7</Id> - <AnnotationText>audio.mxf</AnnotationText> - <EditRate>24 1</EditRate> - <IntrinsicDuration>24</IntrinsicDuration> - <EntryPoint>0</EntryPoint> - <Duration>24</Duration> - </MainSound> - </AssetList> - </Reel> - </ReelList> -</CompositionPlaylist> diff --git a/test/ref/DCP/ASSETMAP.xml b/test/ref/DCP/ASSETMAP.xml deleted file mode 100644 index defe18da..00000000 --- a/test/ref/DCP/ASSETMAP.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<AssetMap xmlns="http://www.smpte-ra.org/schemas/429-9/2007/AM"> - <Id>urn:uuid:b135d5cf-d180-43d8-b0b3-7373737b73bf</Id> - <Creator>OpenDCP 0.0.25</Creator> - <VolumeCount>1</VolumeCount> - <IssueDate>2012-07-17T04:45:18+00:00</IssueDate> - <Issuer>OpenDCP 0.0.25</Issuer> - <AssetList> - <Asset> - <Id>urn:uuid:df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb</Id> - <PackingList>true</PackingList> - <ChunkList> - <Chunk> - <Path>df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb_pkl.xml</Path> - <VolumeIndex>1</VolumeIndex> - <Offset>0</Offset> - <Length>1049</Length> - </Chunk> - </ChunkList> - </Asset> - <Asset> - <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id> - <ChunkList> - <Chunk> - <Path>81fb54df-e1bf-4647-8788-ea7ba154375b_cpl.xml</Path> - <VolumeIndex>1</VolumeIndex> - <Offset>0</Offset> - <Length>1526</Length> - </Chunk> - </ChunkList> - </Asset> - <Asset> - <Id>urn:uuid:c38bdd62-ce03-4988-8603-195f134207c7</Id> - <ChunkList> - <Chunk> - <Path>audio.mxf</Path> - <VolumeIndex>1</VolumeIndex> - <Offset>0</Offset> - <Length>305326</Length> - </Chunk> - </ChunkList> - </Asset> - <Asset> - <Id>urn:uuid:d36f4bb3-c4fa-4a95-9915-6fec3110cd71</Id> - <ChunkList> - <Chunk> - <Path>video.mxf</Path> - <VolumeIndex>1</VolumeIndex> - <Offset>0</Offset> - <Length>26080</Length> - </Chunk> - </ChunkList> - </Asset> - </AssetList> -</AssetMap> diff --git a/test/ref/DCP/VOLINDEX.xml b/test/ref/DCP/VOLINDEX.xml deleted file mode 100644 index f66c004a..00000000 --- a/test/ref/DCP/VOLINDEX.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<VolumeIndex xmlns="http://www.smpte-ra.org/schemas/429-9/2007/AM"> - <Index>1</Index> -</VolumeIndex> diff --git a/test/ref/DCP/audio.mxf b/test/ref/DCP/audio.mxf Binary files differdeleted file mode 100644 index 9bc735af..00000000 --- a/test/ref/DCP/audio.mxf +++ /dev/null diff --git a/test/ref/DCP/df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb_pkl.xml b/test/ref/DCP/df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb_pkl.xml deleted file mode 100644 index 7a8ec697..00000000 --- a/test/ref/DCP/df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb_pkl.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<PackingList xmlns="http://www.smpte-ra.org/schemas/429-8/2007/PKL"> - <Id>urn:uuid:df0e4141-13c3-4a7a-bef8-b5a04fcbc4bb</Id> - <AnnotationText>A Test DCP</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: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: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:81fb54df-e1bf-4647-8788-ea7ba154375b</Id> - <Hash>TTn7vvdUQi/G+KaW1Pym/DjxULM=</Hash> - <Size>1526</Size> - <Type>text/xml</Type> - </Asset> - </AssetList> -</PackingList> diff --git a/test/ref/DCP/video.mxf b/test/ref/DCP/video.mxf Binary files differdeleted file mode 100644 index 645fb85a..00000000 --- a/test/ref/DCP/video.mxf +++ /dev/null diff --git a/test/tests.cc b/test/tests.cc index ef25b7c8..a842fa4d 100644 --- a/test/tests.cc +++ b/test/tests.cc @@ -76,7 +76,8 @@ BOOST_AUTO_TEST_CASE (dcp_test) 24, 24, 32, - 32 + 32, + false )); shared_ptr<libdcp::SoundAsset> ms (new libdcp::SoundAsset ( @@ -86,7 +87,8 @@ BOOST_AUTO_TEST_CASE (dcp_test) &(d.Progress), 24, 24, - 2 + 2, + false )); cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (mp, ms, shared_ptr<libdcp::SubtitleAsset> ()))); @@ -97,12 +99,12 @@ BOOST_AUTO_TEST_CASE (dcp_test) BOOST_AUTO_TEST_CASE (error_test) { - libdcp::DCP d ("build/test/bar"); + libdcp::DCP d ("build/test/fred"); vector<string> p; p.push_back ("frobozz"); - BOOST_CHECK_THROW (new libdcp::MonoPictureAsset (p, "build/test/bar", "video.mxf", &d.Progress, 24, 24, 32, 32), libdcp::FileError); - BOOST_CHECK_THROW (new libdcp::SoundAsset (p, "build/test/bar", "audio.mxf", &d.Progress, 24, 24), libdcp::FileError); + BOOST_CHECK_THROW (new libdcp::MonoPictureAsset (p, "build/test/fred", "video.mxf", &d.Progress, 24, 24, 32, 32, false), libdcp::FileError); + BOOST_CHECK_THROW (new libdcp::SoundAsset (p, "build/test/fred", "audio.mxf", &d.Progress, 24, 24, false), libdcp::FileError); } BOOST_AUTO_TEST_CASE (read_dcp) @@ -579,3 +581,48 @@ BOOST_AUTO_TEST_CASE (color) BOOST_CHECK_EQUAL (c.to_argb_string(), "FF0000FF"); } + +BOOST_AUTO_TEST_CASE (encryption) +{ + Kumu::libdcp_test = true; + + libdcp::Metadata* t = libdcp::Metadata::instance (); + t->issuer = "OpenDCP 0.0.25"; + t->creator = "OpenDCP 0.0.25"; + t->company_name = "OpenDCP"; + t->product_name = "OpenDCP"; + t->product_version = "0.0.25"; + t->issue_date = "2012-07-17T04:45:18+00:00"; + boost::filesystem::remove_all ("build/test/bar"); + boost::filesystem::create_directories ("build/test/bar"); + libdcp::DCP d ("build/test/bar"); + shared_ptr<libdcp::CPL> cpl (new libdcp::CPL ("build/test/bar", "A Test DCP", libdcp::FEATURE, 24, 24)); + + shared_ptr<libdcp::MonoPictureAsset> mp (new libdcp::MonoPictureAsset ( + j2c, + "build/test/bar", + "video.mxf", + &d.Progress, + 24, + 24, + 32, + 32, + false + )); + + shared_ptr<libdcp::SoundAsset> ms (new libdcp::SoundAsset ( + wav, + "build/test/bar", + "audio.mxf", + &(d.Progress), + 24, + 24, + 2, + false + )); + + cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (mp, ms, shared_ptr<libdcp::SubtitleAsset> ()))); + d.add_cpl (cpl); + + d.write_xml (); +} |
