diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-11-22 02:16:16 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-11-26 00:09:27 +0100 |
| commit | 5799460dc38bafa1da1ce9f7bf43621d3fadf442 (patch) | |
| tree | a4666f4bf8f99f29716e8d68113320426b0a1c95 /test | |
| parent | aaf6845e130ac208cee524536b67c54bd1ce8ed9 (diff) | |
Noisy change to get film into AudioContent::modify_trim_start().
Diffstat (limited to 'test')
| -rw-r--r-- | test/atmos_test.cc | 2 | ||||
| -rw-r--r-- | test/audio_content_test.cc | 4 | ||||
| -rw-r--r-- | test/content_test.cc | 10 | ||||
| -rw-r--r-- | test/ffmpeg_decoder_error_test.cc | 2 | ||||
| -rw-r--r-- | test/file_naming_test.cc | 12 | ||||
| -rw-r--r-- | test/player_test.cc | 14 | ||||
| -rw-r--r-- | test/reels_test.cc | 12 | ||||
| -rw-r--r-- | test/silence_padding_test.cc | 2 | ||||
| -rw-r--r-- | test/subtitle_timing_test.cc | 2 | ||||
| -rw-r--r-- | test/time_calculation_test.cc | 168 | ||||
| -rw-r--r-- | test/torture_test.cc | 4 | ||||
| -rw-r--r-- | test/vf_test.cc | 4 |
12 files changed, 118 insertions, 118 deletions
diff --git a/test/atmos_test.cc b/test/atmos_test.cc index 661eca5b9..ec7e9e85d 100644 --- a/test/atmos_test.cc +++ b/test/atmos_test.cc @@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE (atmos_trim_test) auto content = content_factory(TestPaths::private_data() / "atmos_asset.mxf"); auto film = new_test_film2 ("atmos_trim_test", content, &cl); - content[0]->set_trim_start (dcpomatic::ContentTime::from_seconds(1)); + content[0]->set_trim_start(film, dcpomatic::ContentTime::from_seconds(1)); /* Just check that the encode runs; I'm not sure how to test the MXF */ make_and_verify_dcp (film, { dcp::VerificationNote::Code::MISSING_CPL_METADATA }); diff --git a/test/audio_content_test.cc b/test/audio_content_test.cc index 6114c6b2c..f2c095fab 100644 --- a/test/audio_content_test.cc +++ b/test/audio_content_test.cc @@ -166,7 +166,7 @@ BOOST_AUTO_TEST_CASE (audio_content_fade_in_with_trim) content->audio->set_fade_in(dcpomatic::ContentTime::from_frames(2000, 48000)); content->audio->set_fade_out(dcpomatic::ContentTime::from_frames(1000, 48000)); - content->set_trim_start(dcpomatic::ContentTime::from_frames(5200, 48000)); + content->set_trim_start(film, dcpomatic::ContentTime::from_frames(5200, 48000)); /* In the trim */ auto const f1 = content->audio->fade(stream, 0, 2000, 48000); @@ -194,7 +194,7 @@ BOOST_AUTO_TEST_CASE (audio_content_fade_out_with_trim) content->audio->set_fade_in(dcpomatic::ContentTime::from_frames(2000, 48000)); content->audio->set_fade_out(dcpomatic::ContentTime::from_frames(1000, 48000)); - content->set_trim_start(dcpomatic::ContentTime::from_frames(5200, 48000)); + content->set_trim_start(film, dcpomatic::ContentTime::from_frames(5200, 48000)); content->set_trim_end(dcpomatic::ContentTime::from_frames(9000, 48000)); /* In the trim */ diff --git a/test/content_test.cc b/test/content_test.cc index 9e33225f0..12e653875 100644 --- a/test/content_test.cc +++ b/test/content_test.cc @@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE (content_test2) { auto content = content_factory("test/data/red_23976.mp4")[0]; auto film = new_test_film2 ("content_test2", {content}); - content->set_trim_start(ContentTime::from_seconds(0.5)); + content->set_trim_start(film, ContentTime::from_seconds(0.5)); make_and_verify_dcp (film); } @@ -81,15 +81,15 @@ BOOST_AUTO_TEST_CASE (content_test3) /* Trim */ /* 12 frames */ - content->set_trim_start (ContentTime::from_seconds (12.0 / 24.0)); + content->set_trim_start(film, ContentTime::from_seconds (12.0 / 24.0)); BOOST_CHECK (content->trim_start() == ContentTime::from_seconds (12.0 / 24.0)); /* 11.2 frames */ - content->set_trim_start (ContentTime::from_seconds (11.2 / 24.0)); + content->set_trim_start(film, ContentTime::from_seconds (11.2 / 24.0)); BOOST_CHECK (content->trim_start() == ContentTime::from_seconds (11.0 / 24.0)); /* 13.9 frames */ - content->set_trim_start (ContentTime::from_seconds (13.9 / 24.0)); + content->set_trim_start(film, ContentTime::from_seconds (13.9 / 24.0)); BOOST_CHECK (content->trim_start() == ContentTime::from_seconds (14.0 / 24.0)); /* Position */ @@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE (content_test3) content->set_position (film, DCPTime::from_seconds(13.9 / 24.0)); BOOST_CHECK (content->position() == DCPTime::from_seconds (14.0 / 24.0)); - content->set_video_frame_rate (25); + content->set_video_frame_rate(film, 25); /* Check that trim is fixed when the content's video frame rate is `forced' */ diff --git a/test/ffmpeg_decoder_error_test.cc b/test/ffmpeg_decoder_error_test.cc index 3c9b3457d..2774d0ef4 100644 --- a/test/ffmpeg_decoder_error_test.cc +++ b/test/ffmpeg_decoder_error_test.cc @@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE (check_exception_during_flush) auto content = content_factory(TestPaths::private_data() / "3d_thx_broadway_2010_lossless.m2ts"); auto film = new_test_film2 ("check_exception_during_flush", content); - content[0]->set_trim_start(dcpomatic::ContentTime(2310308)); + content[0]->set_trim_start(film, dcpomatic::ContentTime(2310308)); content[0]->set_trim_end(dcpomatic::ContentTime(116020)); make_and_verify_dcp (film); diff --git a/test/file_naming_test.cc b/test/file_naming_test.cc index 069b1d825..be4856cd1 100644 --- a/test/file_naming_test.cc +++ b/test/file_naming_test.cc @@ -80,13 +80,13 @@ BOOST_AUTO_TEST_CASE (file_naming_test) BOOST_REQUIRE (!wait_for_jobs()); r->set_position (film, dcpomatic::DCPTime::from_seconds(0)); - r->set_video_frame_rate (24); + r->set_video_frame_rate(film, 24); r->video->set_length (24); g->set_position (film, dcpomatic::DCPTime::from_seconds(1)); - g->set_video_frame_rate (24); + g->set_video_frame_rate(film, 24); g->video->set_length (24); b->set_position (film, dcpomatic::DCPTime::from_seconds(2)); - b->set_video_frame_rate (24); + b->set_video_frame_rate(film, 24); b->video->set_length (24); film->set_reel_type (ReelType::BY_VIDEO_CONTENT); @@ -139,13 +139,13 @@ BOOST_AUTO_TEST_CASE (file_naming_test2) BOOST_REQUIRE (!wait_for_jobs()); r->set_position (film, dcpomatic::DCPTime::from_seconds(0)); - r->set_video_frame_rate (24); + r->set_video_frame_rate(film, 24); r->video->set_length (24); g->set_position (film, dcpomatic::DCPTime::from_seconds(1)); - g->set_video_frame_rate (24); + g->set_video_frame_rate(film, 24); g->video->set_length (24); b->set_position (film, dcpomatic::DCPTime::from_seconds(2)); - b->set_video_frame_rate (24); + b->set_video_frame_rate(film, 24); b->video->set_length (24); film->set_reel_type (ReelType::BY_VIDEO_CONTENT); diff --git a/test/player_test.cc b/test/player_test.cc index d0460d88d..733883b5a 100644 --- a/test/player_test.cc +++ b/test/player_test.cc @@ -301,7 +301,7 @@ BOOST_AUTO_TEST_CASE (player_trim_test) BOOST_REQUIRE (!wait_for_jobs ()); B->video->set_length (10 * 24); B->set_position (film, DCPTime::from_seconds(10)); - B->set_trim_start (ContentTime::from_seconds (2)); + B->set_trim_start(film, ContentTime::from_seconds(2)); make_and_verify_dcp (film); } @@ -368,7 +368,7 @@ BOOST_AUTO_TEST_CASE (player_trim_crash) /* Wait for the butler to fill */ dcpomatic_sleep_seconds (5); - boon->set_trim_start (ContentTime::from_seconds(5)); + boon->set_trim_start(film, ContentTime::from_seconds(5)); butler->seek (DCPTime(), true); @@ -387,7 +387,7 @@ BOOST_AUTO_TEST_CASE (player_silence_crash) film->examine_and_add_content (sine); BOOST_REQUIRE (!wait_for_jobs()); - sine->set_video_frame_rate (23.976); + sine->set_video_frame_rate(film, 23.976); film->write_metadata (); make_and_verify_dcp (film, {dcp::VerificationNote::Code::MISSING_CPL_METADATA}); } @@ -569,7 +569,7 @@ BOOST_AUTO_TEST_CASE(trimmed_sound_mix_bug_13) A->audio->set_gain(-12); B->set_position(film, DCPTime()); B->audio->set_gain(-12); - B->set_trim_start(ContentTime(13)); + B->set_trim_start(film, ContentTime(13)); make_and_verify_dcp(film, { dcp::VerificationNote::Code::MISSING_CPL_METADATA }); check_mxf_audio_file("test/data/trimmed_sound_mix_bug_13.mxf", dcp_file(film, "pcm_")); @@ -586,10 +586,10 @@ BOOST_AUTO_TEST_CASE(trimmed_sound_mix_bug_13_frame_rate_change) A->audio->set_gain(-12); B->set_position(film, DCPTime()); B->audio->set_gain(-12); - B->set_trim_start(ContentTime(13)); + B->set_trim_start(film, ContentTime(13)); - A->set_video_frame_rate(24); - B->set_video_frame_rate(24); + A->set_video_frame_rate(film, 24); + B->set_video_frame_rate(film, 24); film->set_video_frame_rate(25); make_and_verify_dcp(film, { dcp::VerificationNote::Code::MISSING_CPL_METADATA }); diff --git a/test/reels_test.cc b/test/reels_test.cc index 8dbfcd5ba..092c206f0 100644 --- a/test/reels_test.cc +++ b/test/reels_test.cc @@ -258,7 +258,7 @@ BOOST_AUTO_TEST_CASE (reels_test5) } { - dcp->set_trim_start (ContentTime::from_seconds (0.5)); + dcp->set_trim_start(film, ContentTime::from_seconds(0.5)); auto p = dcp->reels (film); BOOST_REQUIRE_EQUAL (p.size(), 4U); auto i = p.begin(); @@ -280,7 +280,7 @@ BOOST_AUTO_TEST_CASE (reels_test5) } { - dcp->set_trim_start (ContentTime::from_seconds (1.5)); + dcp->set_trim_start(film, ContentTime::from_seconds(1.5)); auto p = dcp->reels (film); BOOST_REQUIRE_EQUAL (p.size(), 3U); auto i = p.begin(); @@ -411,7 +411,7 @@ BOOST_AUTO_TEST_CASE (reels_test11) auto film = new_test_film2 ("reels_test11", {A}); film->set_video_frame_rate (24); A->video->set_length (240); - A->set_video_frame_rate (24); + A->set_video_frame_rate(film, 24); A->set_position (film, DCPTime::from_seconds(1)); film->set_reel_type (ReelType::BY_VIDEO_CONTENT); make_and_verify_dcp (film); @@ -440,11 +440,11 @@ BOOST_AUTO_TEST_CASE (reels_test12) film->set_sequence (false); A->video->set_length (240); - A->set_video_frame_rate (24); + A->set_video_frame_rate(film, 24); A->set_position (film, DCPTime::from_seconds(1)); B->video->set_length (120); - B->set_video_frame_rate (24); + B->set_video_frame_rate(film, 24); B->set_position (film, DCPTime::from_seconds(14)); auto r = film->reels (); @@ -617,7 +617,7 @@ BOOST_AUTO_TEST_CASE (repeated_dcp_into_reels) for (int i = 0; i < 4; ++i) { original_dcp[i]->set_position(film2, DCPTime::from_frames(total_frames * i / 4, frame_rate)); - original_dcp[i]->set_trim_start(ContentTime::from_frames(total_frames * i / 4, frame_rate)); + original_dcp[i]->set_trim_start(film2, ContentTime::from_frames(total_frames * i / 4, frame_rate)); original_dcp[i]->set_trim_end (ContentTime::from_frames(total_frames * (4 - i - 1) / 4, frame_rate)); original_dcp[i]->set_reference_video(true); original_dcp[i]->set_reference_audio(true); diff --git a/test/silence_padding_test.cc b/test/silence_padding_test.cc index e4c640792..6bcb82d05 100644 --- a/test/silence_padding_test.cc +++ b/test/silence_padding_test.cc @@ -145,7 +145,7 @@ BOOST_AUTO_TEST_CASE (silence_padding_test2) auto film = new_test_film2 ("silence_padding_test2", { content }, &cl); film->set_video_frame_rate (24); - content->set_trim_start (dcpomatic::ContentTime(4003)); + content->set_trim_start(film, dcpomatic::ContentTime(4003)); make_and_verify_dcp (film); diff --git a/test/subtitle_timing_test.cc b/test/subtitle_timing_test.cc index 68881aea8..eec4c0639 100644 --- a/test/subtitle_timing_test.cc +++ b/test/subtitle_timing_test.cc @@ -43,9 +43,9 @@ BOOST_AUTO_TEST_CASE (test_subtitle_timing_with_frame_rate_change) auto picture = content_factory("test/data/flat_red.png")[0]; auto sub = content_factory("test/data/hour.srt")[0]; sub->text.front()->set_language(dcp::LanguageTag("en-GB")); - picture->set_video_frame_rate (content_frame_rate); auto film = new_test_film2 (name, { picture, sub }); + picture->set_video_frame_rate(film, content_frame_rate); auto const dcp_frame_rate = film->video_frame_rate(); make_and_verify_dcp (film, {dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME, dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_2K }); diff --git a/test/time_calculation_test.cc b/test/time_calculation_test.cc index 4ab5d0942..7ace7f8c2 100644 --- a/test/time_calculation_test.cc +++ b/test/time_calculation_test.cc @@ -161,11 +161,11 @@ BOOST_AUTO_TEST_CASE (ffmpeg_time_calculation_test) /* 24fps content, 24fps DCP */ film->set_video_frame_rate (24); - content->set_video_frame_rate (24); + content->set_video_frame_rate(film, 24); BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(1).get()); /* 25fps content, 25fps DCP */ film->set_video_frame_rate (25); - content->set_video_frame_rate (25); + content->set_video_frame_rate(film, 25); BOOST_CHECK_EQUAL (content->full_length(film).get(), DCPTime::from_seconds(1).get()); /* 25fps content, 24fps DCP; length should be increased */ film->set_video_frame_rate (24); @@ -200,8 +200,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 0, no trim, content rate = DCP rate */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -212,8 +212,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, no trim, content rate = DCP rate */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -226,8 +226,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, 1.5s trim, content rate = DCP rate */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.5)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(1.5)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -243,8 +243,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) fast (at 25fps) in this case, this means 75 frames of content video will be used. */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -255,8 +255,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, no trim, content rate 24, DCP rate 25 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -272,8 +272,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) some of these results are not quite what you'd perhaps expect. */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.6)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(1.6)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -291,8 +291,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) content rate = DCP rate case. */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -303,8 +303,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -317,8 +317,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.5)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(1.5)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -335,8 +335,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) be used to make 3 * 24 frames of DCP video. */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (48); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -347,8 +347,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (48); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -361,8 +361,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.5)); - content->set_video_frame_rate (48); + content->set_trim_start(film, ContentTime::from_seconds(1.5)); + content->set_video_frame_rate(film, 48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -375,8 +375,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1) /* Position 0s, no trim, content rate 29.9978733, DCP rate 30 */ content->set_position (film, DCPTime::from_seconds(0)); - content->set_trim_start (ContentTime::from_seconds (0)); - content->set_video_frame_rate (29.9978733); + content->set_trim_start(film, ContentTime::from_seconds (0)); + content->set_video_frame_rate(film, 29.9978733); film->set_video_frame_rate (30); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -406,8 +406,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 0, no trim, content rate = DCP rate */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -418,8 +418,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, no trim, content rate = DCP rate */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -430,8 +430,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, 1.5s trim, content rate = DCP rate */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.5)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(1.5)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -446,8 +446,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) fast (at 25fps) in this case, this means 75 frames of content video will be used. */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -458,8 +458,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, no trim, content rate 24, DCP rate 25 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -470,8 +470,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, 1.6s trim, content rate 24, DCP rate 25, so the 1.6s trim is at 24fps */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.6)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(1.6)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (25); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -488,8 +488,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) content rate = DCP rate case. */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -500,8 +500,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -512,8 +512,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.5)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(1.5)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (48); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -529,8 +529,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) be used to make 3 * 24 frames of DCP video. */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (48); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -541,8 +541,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (48); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -553,8 +553,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.5)); - content->set_video_frame_rate (48); + content->set_trim_start(film, ContentTime::from_seconds(1.5)); + content->set_video_frame_rate(film, 48); film->set_video_frame_rate (24); player->setup_pieces (); BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1U); @@ -583,8 +583,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 0, no trim, video/audio content rate = video/audio DCP rate */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -596,8 +596,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, no trim, video/audio content rate = video/audio DCP rate */ content->set_position (film, DCPTime::from_seconds (3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -611,8 +611,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, 1.5s trim, video/audio content rate = video/audio DCP rate */ content->set_position (film, DCPTime::from_seconds (3)); - content->set_trim_start (ContentTime::from_seconds (1.5)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(1.5)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -626,8 +626,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 0, no trim, content video rate 24, DCP video rate 25, both audio rates still 48k */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (25); stream->_frame_rate = 48000; player->setup_pieces (); @@ -639,8 +639,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, no trim, content video rate 24, DCP rate 25, both audio rates still 48k. */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (25); stream->_frame_rate = 48000; player->setup_pieces (); @@ -656,8 +656,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) 1s of content is 46080 samples after resampling. */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.6)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(1.6)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (25); stream->_frame_rate = 48000; player->setup_pieces (); @@ -675,8 +675,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) The results should be the same as the content rate = DCP rate case. */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (48); stream->_frame_rate = 48000; player->setup_pieces (); @@ -688,8 +688,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -703,8 +703,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.5)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(1.5)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -721,8 +721,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) with skipped frames in this case, audio samples should map straight through. */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (48); stream->_frame_rate = 48000; player->setup_pieces (); @@ -734,8 +734,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, no trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -749,8 +749,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.5)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(1.5)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); @@ -764,8 +764,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 0, no trim, video content rate = video DCP rate, content audio rate = 44.1k */ content->set_position (film, DCPTime()); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); stream->_frame_rate = 44100; player->setup_pieces (); @@ -777,8 +777,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, no trim, video content rate = video DCP rate, content audio rate = 44.1k */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime ()); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime()); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); stream->_frame_rate = 44100; player->setup_pieces (); @@ -792,8 +792,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Position 3s, 1.5s trim, video content rate = video DCP rate, content audio rate = 44.1k */ content->set_position (film, DCPTime::from_seconds(3)); - content->set_trim_start (ContentTime::from_seconds (1.5)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(1.5)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); stream->_frame_rate = 44100; player->setup_pieces (); @@ -807,8 +807,8 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3) /* Check with a large start trim */ content->set_position (film, DCPTime::from_seconds(0)); - content->set_trim_start (ContentTime::from_seconds (54143)); - content->set_video_frame_rate (24); + content->set_trim_start(film, ContentTime::from_seconds(54143)); + content->set_video_frame_rate(film, 24); film->set_video_frame_rate (24); stream->_frame_rate = 48000; player->setup_pieces (); diff --git a/test/torture_test.cc b/test/torture_test.cc index f8951932b..851a26a31 100644 --- a/test/torture_test.cc +++ b/test/torture_test.cc @@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE (torture_test1) film->examine_and_add_content (staircase); BOOST_REQUIRE (!wait_for_jobs()); staircase->set_position (film, DCPTime::from_frames(2000, film->audio_frame_rate())); - staircase->set_trim_start (ContentTime::from_frames(12, 48000)); + staircase->set_trim_start(film, ContentTime::from_frames(12, 48000)); staircase->set_trim_end (ContentTime::from_frames (35, 48000)); staircase->audio->set_gain (20 * log10(2)); @@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE (torture_test1) film->examine_and_add_content (staircase); BOOST_REQUIRE (!wait_for_jobs()); staircase->set_position (film, DCPTime::from_frames(50000, film->audio_frame_rate())); - staircase->set_trim_start (ContentTime::from_frames(12, 48000)); + staircase->set_trim_start(film, ContentTime::from_frames(12, 48000)); staircase->set_trim_end (ContentTime::from_frames(35, 48000)); staircase->audio->set_gain (20 * log10(2)); diff --git a/test/vf_test.cc b/test/vf_test.cc index 32e7ae431..3705635c2 100644 --- a/test/vf_test.cc +++ b/test/vf_test.cc @@ -180,7 +180,7 @@ BOOST_AUTO_TEST_CASE (vf_test3) vf->set_reel_type (ReelType::BY_VIDEO_CONTENT); auto dcp = make_shared<DCPContent>(ov->dir(ov->dcp_name())); BOOST_REQUIRE (dcp); - dcp->set_trim_start (ContentTime::from_seconds (1)); + dcp->set_trim_start(vf, ContentTime::from_seconds (1)); dcp->set_trim_end (ContentTime::from_seconds (1)); vf->examine_and_add_content (dcp); BOOST_REQUIRE (!wait_for_jobs()); @@ -392,7 +392,7 @@ BOOST_AUTO_TEST_CASE (test_vf_with_trimmed_multi_reel_dcp) vf->set_reel_type(ReelType::BY_VIDEO_CONTENT); vf_dcp->set_reference_video(true); vf_dcp->set_reference_audio(true); - vf_dcp->set_trim_start(ContentTime::from_seconds(10)); + vf_dcp->set_trim_start(vf, ContentTime::from_seconds(10)); vf_dcp->set_position(vf, DCPTime::from_seconds(10)); make_and_verify_dcp (vf, { dcp::VerificationNote::Code::EXTERNAL_ASSET }); } |
