diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-09 00:43:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-09 00:43:13 +0100 |
| commit | 87c2c54ebfdc1e6ceb0673058c01fd30e13258c2 (patch) | |
| tree | 10a7d3427cb1f399fc9cb298efff580247427bdd /test/write_subtitle_test.cc | |
| parent | 34be688550e3acdd99c3ca612e7e4696710f3438 (diff) | |
Switch to UUIDs for Interop image subtitle identification (rather than indices). Basic and untested SMPTE image subtitle support.
Diffstat (limited to 'test/write_subtitle_test.cc')
| -rw-r--r-- | test/write_subtitle_test.cc | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/test/write_subtitle_test.cc b/test/write_subtitle_test.cc index dec815c0..cf595faf 100644 --- a/test/write_subtitle_test.cc +++ b/test/write_subtitle_test.cc @@ -343,7 +343,7 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test3) dcp::file_to_string("build/test/write_interop_subtitle_test3/subs.xml"), list<string>() ); - check_file ("build/test/write_interop_subtitle_test3/sub_0.png", "test/data/sub.png"); + check_file ("build/test/write_interop_subtitle_test3/822bd341-c751-45b1-94d2-410e4ffcff1b.png", "test/data/sub.png"); } /* Write some subtitle content as SMPTE XML and check that it is right */ @@ -637,3 +637,35 @@ BOOST_AUTO_TEST_CASE (write_smpte_subtitle_test2) list<string> () ); } + +/* Write some subtitle content as SMPTE using bitmaps and check that it is right */ +BOOST_AUTO_TEST_CASE (write_smpte_subtitle_test3) +{ + dcp::SMPTESubtitleAsset c; + c.set_reel_number (1); + c.set_language ("EN"); + c.set_content_title_text ("Test"); + + c.add ( + shared_ptr<dcp::Subtitle> ( + new dcp::SubtitleImage ( + dcp::Data ("test/data/sub.png"), + dcp::Time (0, 4, 9, 22, 24), + dcp::Time (0, 4, 11, 22, 24), + 0, + dcp::HALIGN_CENTER, + 0.8, + dcp::VALIGN_TOP, + dcp::Time (0, 0, 0, 0, 24), + dcp::Time (0, 0, 0, 0, 24) + ) + ) + ); + + c._id = "a6c58cff-3e1e-4b38-acec-a42224475ef6"; + + boost::filesystem::create_directories ("build/test/write_smpte_subtitle_test3"); + c.write ("build/test/write_smpte_subtitle_test3/subs.mxf"); + + /* XXX: check this result when we can read them back in again */ +} |
