X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fplayer_test.cc;h=0c9b6f21f0a8c81f55b0e13e383ccc5802b3148b;hb=ed68bfad5c795afb342c5228f3c1dc7770a6d646;hp=605f3bddd1a0fc9207c24a7e5c0ef03064cfa316;hpb=ae4f0d9f55489ddc50b3e5f0d713621ee8f50645;p=dcpomatic.git diff --git a/test/player_test.cc b/test/player_test.cc index 605f3bddd..0c9b6f21f 100644 --- a/test/player_test.cc +++ b/test/player_test.cc @@ -194,12 +194,6 @@ BOOST_AUTO_TEST_CASE (player_interleave_test) } } -static void -note_handler (dcp::NoteType, std::string) -{ - -} - /** Test some seeks towards the start of a DCP with awkward subtitles; see mantis #1085 * and a number of others. I thought this was a player seek bug but in fact it was * caused by the subtitle starting just after the start of the video frame and hence @@ -226,7 +220,7 @@ BOOST_AUTO_TEST_CASE (player_seek_test) butler->seek (t, true); pair, DCPTime> video = butler->get_video(); BOOST_CHECK_EQUAL(video.second.get(), t.get()); - write_image(video.first->image(note_handler, PlayerVideo::always_rgb, false, true), String::compose("build/test/player_seek_test_%1.png", i), "RGB"); + write_image(video.first->image(bind(PlayerVideo::force, _1, AV_PIX_FMT_RGB24), false, true), String::compose("build/test/player_seek_test_%1.png", i), "RGB"); /* This 0.011 is empirically chosen (hopefully) to accept changes in rendering between the reference and a test machine (17.10 and 16.04 seem to anti-alias a little differently) but to reject gross errors e.g. missing fonts or missing text altogether. @@ -259,7 +253,7 @@ BOOST_AUTO_TEST_CASE (player_seek_test2) butler->seek (t, true); pair, DCPTime> video = butler->get_video(); BOOST_CHECK_EQUAL(video.second.get(), t.get()); - write_image(video.first->image(note_handler, PlayerVideo::always_rgb, false, true), String::compose("build/test/player_seek_test2_%1.png", i), "RGB"); + write_image(video.first->image(bind(PlayerVideo::force, _1, AV_PIX_FMT_RGB24), false, true), String::compose("build/test/player_seek_test2_%1.png", i), "RGB"); check_image(String::compose("test/data/player_seek_test2_%1.png", i), String::compose("build/test/player_seek_test2_%1.png", i), 0.011); } } @@ -286,15 +280,17 @@ BOOST_AUTO_TEST_CASE (player_trim_test) struct Sub { PlayerText text; TextType type; + optional track; DCPTimePeriod period; }; static void -store (list* out, PlayerText text, TextType type, DCPTimePeriod period) +store (list* out, PlayerText text, TextType type, optional track, DCPTimePeriod period) { Sub s; s.text = text; s.type = type; + s.track = track; s.period = period; out->push_back (s); } @@ -316,7 +312,7 @@ BOOST_AUTO_TEST_CASE (player_ignore_video_and_audio_test) player->set_ignore_audio (); list out; - player->Text.connect (bind (&store, &out, _1, _2, _3)); + player->Text.connect (bind (&store, &out, _1, _2, _3, _4)); while (!player->pass ()) {} BOOST_CHECK_EQUAL (out.size(), 6);