diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-11-21 02:45:30 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-11-21 02:45:30 +0000 |
| commit | 84012cdd64f451891febd36154b7226ea21a899b (patch) | |
| tree | 096fb898aa14d936dfc8f8598a6908337508233c /test | |
| parent | 254b3044d72de6b033d7c584f5abd2b9aa70aad5 (diff) | |
Put Film pointer into Decoder.
Diffstat (limited to 'test')
| -rw-r--r-- | test/dcp_subtitle_test.cc | 12 | ||||
| -rw-r--r-- | test/ffmpeg_decoder_seek_test.cc | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/test/dcp_subtitle_test.cc b/test/dcp_subtitle_test.cc index 5a1cf4391..89eb11a60 100644 --- a/test/dcp_subtitle_test.cc +++ b/test/dcp_subtitle_test.cc @@ -90,11 +90,11 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_within_dcp_test) film->examine_and_add_content (content); BOOST_REQUIRE (!wait_for_jobs ()); - shared_ptr<DCPDecoder> decoder (new DCPDecoder (content, false)); + shared_ptr<DCPDecoder> decoder (new DCPDecoder (film, content, false)); decoder->only_text()->PlainStart.connect (bind (store, _1)); stored = optional<ContentStringText> (); - while (!decoder->pass(film) && !stored) {} + while (!decoder->pass() && !stored) {} BOOST_REQUIRE (stored); BOOST_REQUIRE_EQUAL (stored->subs.size(), 2); @@ -113,11 +113,11 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test2) film->examine_and_add_content (content); BOOST_REQUIRE (!wait_for_jobs ()); - shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder(content)); + shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder(film, content)); decoder->only_text()->PlainStart.connect (bind (store, _1)); stored = optional<ContentStringText> (); - while (!decoder->pass(film)) { + while (!decoder->pass()) { if (stored && stored->from() == ContentTime(0)) { BOOST_CHECK_EQUAL (stored->subs.front().text(), "<b>Hello world!</b>"); } @@ -139,9 +139,9 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test3) film->make_dcp (); BOOST_REQUIRE (!wait_for_jobs ()); - shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder (content)); + shared_ptr<DCPSubtitleDecoder> decoder (new DCPSubtitleDecoder (film, content)); stored = optional<ContentStringText> (); - while (!decoder->pass (film)) { + while (!decoder->pass ()) { decoder->only_text()->PlainStart.connect (bind (store, _1)); if (stored && stored->from() == ContentTime::from_seconds(0.08)) { list<dcp::SubtitleString> s = stored->subs; diff --git a/test/ffmpeg_decoder_seek_test.cc b/test/ffmpeg_decoder_seek_test.cc index c6fae48cd..b8bfe3532 100644 --- a/test/ffmpeg_decoder_seek_test.cc +++ b/test/ffmpeg_decoder_seek_test.cc @@ -54,12 +54,12 @@ store (ContentVideo v) } static void -check (shared_ptr<const Film> film, shared_ptr<FFmpegDecoder> decoder, int frame) +check (shared_ptr<FFmpegDecoder> decoder, int frame) { BOOST_REQUIRE (decoder->ffmpeg_content()->video_frame_rate ()); - decoder->seek (film, ContentTime::from_frames (frame, decoder->ffmpeg_content()->video_frame_rate().get()), true); + decoder->seek (ContentTime::from_frames (frame, decoder->ffmpeg_content()->video_frame_rate().get()), true); stored = optional<ContentVideo> (); - while (!decoder->pass(film) && !stored) {} + while (!decoder->pass() && !stored) {} BOOST_CHECK (stored->frame <= frame); } @@ -77,7 +77,7 @@ test (boost::filesystem::path file, vector<int> frames) decoder->video->Data.connect (bind (&store, _1)); for (vector<int>::const_iterator i = frames.begin(); i != frames.end(); ++i) { - check (film, decoder, *i); + check (decoder, *i); } } |
