diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-01-20 00:33:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-01-20 20:36:46 +0100 |
| commit | 8850569d93a8524625b3b595cb6edf45bdf6de07 (patch) | |
| tree | 9391c57efe416cdeb0d9f11a8bc534659c732d1b /test/player_test.cc | |
| parent | 385635f00d39822389adbc99a2d5bdd992f16432 (diff) | |
Pass tolerant flag into Player.
This is needed because the DCPDecoder ends up needing it when it reads
reel information from CPLs.
Maybe all that stuff should be in our metadata.
Diffstat (limited to 'test/player_test.cc')
| -rw-r--r-- | test/player_test.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/player_test.cc b/test/player_test.cc index cac5dffe9..eb49bc4df 100644 --- a/test/player_test.cc +++ b/test/player_test.cc @@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE (player_silence_padding_test) accumulated = std::make_shared<AudioBuffers>(film->audio_channels(), 0); - Player player(film, Image::Alignment::COMPACT); + Player player(film, Image::Alignment::COMPACT, false); player.Audio.connect(bind(&accumulate, _1, _2)); while (!player.pass()) {} BOOST_REQUIRE (accumulated->frames() >= 48000); @@ -154,7 +154,7 @@ BOOST_AUTO_TEST_CASE (player_subframe_test) /* Length should be rounded up from B's length to the next video frame */ BOOST_CHECK (film->length() == DCPTime::from_frames(3 * 24 + 1, 24)); - Player player(film, Image::Alignment::COMPACT); + Player player(film, Image::Alignment::COMPACT, false); player.setup_pieces(); BOOST_REQUIRE_EQUAL(player._black._periods.size(), 1U); BOOST_CHECK(player._black._periods.front() == DCPTimePeriod(DCPTime::from_frames(3 * 24, 24), DCPTime::from_frames(3 * 24 + 1, 24))); @@ -188,7 +188,7 @@ BOOST_AUTO_TEST_CASE (player_interleave_test) auto film = new_test_film("ffmpeg_transcoder_basic_test_subs", { c, s }); film->set_audio_channels (6); - Player player(film, Image::Alignment::COMPACT); + Player player(film, Image::Alignment::COMPACT, false); player.Video.connect(bind(&video, _1, _2)); player.Audio.connect(bind(&audio, _1, _2)); video_frames = audio_frames = 0; @@ -211,7 +211,7 @@ BOOST_AUTO_TEST_CASE (player_seek_test) BOOST_REQUIRE (!wait_for_jobs ()); dcp->only_text()->set_use (true); - Player player(film, Image::Alignment::COMPACT); + Player player(film, Image::Alignment::COMPACT, false); player.set_fast(); player.set_always_burn_open_subtitles(); player.set_play_referenced(); @@ -244,7 +244,7 @@ BOOST_AUTO_TEST_CASE (player_seek_test2) BOOST_REQUIRE (!wait_for_jobs ()); dcp->only_text()->set_use (true); - Player player(film, Image::Alignment::COMPACT); + Player player(film, Image::Alignment::COMPACT, false); player.set_fast(); player.set_always_burn_open_subtitles(); player.set_play_referenced(); @@ -319,7 +319,7 @@ BOOST_AUTO_TEST_CASE (player_ignore_video_and_audio_test) text->only_text()->set_type (TextType::CLOSED_CAPTION); text->only_text()->set_use (true); - Player player(film, Image::Alignment::COMPACT); + Player player(film, Image::Alignment::COMPACT, false); player.set_ignore_video(); player.set_ignore_audio(); @@ -339,7 +339,7 @@ BOOST_AUTO_TEST_CASE (player_trim_crash) film->examine_and_add_content (boon); BOOST_REQUIRE (!wait_for_jobs()); - Player player(film, Image::Alignment::COMPACT); + Player player(film, Image::Alignment::COMPACT, false); player.set_fast(); auto butler = std::make_shared<Butler>( film, player, AudioMapping(), 6, bind(&PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::COMPACT, true, false, Butler::Audio::ENABLED @@ -472,7 +472,7 @@ BOOST_AUTO_TEST_CASE (encrypted_dcp_with_no_kdm_gives_no_butler_error) auto content2 = std::make_shared<DCPContent>(film->dir(film->dcp_name())); auto film2 = new_test_film("encrypted_dcp_with_no_kdm_gives_no_butler_error2", { content2 }); - Player player(film, Image::Alignment::COMPACT); + Player player(film, Image::Alignment::COMPACT, false); Butler butler(film2, player, AudioMapping(), 2, bind(PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::PADDED, true, false, Butler::Audio::ENABLED); float buffer[2000 * 6]; @@ -510,7 +510,7 @@ BOOST_AUTO_TEST_CASE (interleaved_subtitle_are_emitted_correctly) subs1->set_position(film, DCPTime()); subs2->set_position(film, DCPTime()); - Player player(film, Image::Alignment::COMPACT); + Player player(film, Image::Alignment::COMPACT, false); dcp::Time last; player.Text.connect([&last](PlayerText text, TextType, optional<DCPTextTrack>, dcpomatic::DCPTimePeriod) { for (auto sub: text.string) { @@ -595,7 +595,7 @@ BOOST_AUTO_TEST_CASE(two_d_in_three_d_duplicates) B->set_position(film, DCPTime::from_seconds(10)); B->video->set_custom_size(dcp::Size(1998, 1080)); - auto player = std::make_shared<Player>(film, film->playlist()); + auto player = std::make_shared<Player>(film, film->playlist(), false); std::vector<uint8_t> red_line(1998 * 3); for (int i = 0; i < 1998; ++i) { @@ -651,7 +651,7 @@ BOOST_AUTO_TEST_CASE(three_d_in_two_d_chooses_left) mono->set_position(film, dcpomatic::DCPTime::from_seconds(10)); - auto player = std::make_shared<Player>(film, film->playlist()); + auto player = std::make_shared<Player>(film, film->playlist(), false); std::vector<uint8_t> red_line(1998 * 3); for (int i = 0; i < 1998; ++i) { @@ -690,7 +690,7 @@ BOOST_AUTO_TEST_CASE(check_seek_with_no_video) { auto content = content_factory(TestPaths::private_data() / "Fight.Club.1999.720p.BRRip.x264-x0r.srt")[0]; auto film = new_test_film("check_seek_with_no_video", { content }); - auto player = std::make_shared<Player>(film, film->playlist()); + auto player = std::make_shared<Player>(film, film->playlist(), false); boost::signals2::signal<void (std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime)> Video; @@ -721,7 +721,7 @@ BOOST_AUTO_TEST_CASE(unmapped_audio_does_not_raise_buffer_error) content->audio->set_mapping(AudioMapping(6 * 2, MAX_DCP_AUDIO_CHANNELS)); - Player player(film, Image::Alignment::COMPACT); + Player player(film, Image::Alignment::COMPACT, false); Butler butler(film, player, AudioMapping(), 2, bind(PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::PADDED, true, false, Butler::Audio::ENABLED); /* Wait for the butler thread to run for a while; in the case under test it will throw an exception because |
