diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-12-19 14:27:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-19 14:27:11 +0100 |
| commit | 127ba4071318ed2bee545bf983792ece369b5111 (patch) | |
| tree | 4077b00c773972a7401e2864b198597f33db5491 /test | |
| parent | d36d580b7e38cfc2f3189c178ca6553aea921b28 (diff) | |
White space: dcpomatic_disk.cc, upmixer_a_test.cc, vf_test.cc
Diffstat (limited to 'test')
| -rw-r--r-- | test/upmixer_a_test.cc | 58 | ||||
| -rw-r--r-- | test/vf_test.cc | 252 |
2 files changed, 155 insertions, 155 deletions
diff --git a/test/upmixer_a_test.cc b/test/upmixer_a_test.cc index 4ab40563a..b24666d9d 100644 --- a/test/upmixer_a_test.cc +++ b/test/upmixer_a_test.cc @@ -54,50 +54,50 @@ static SNDFILE* Rs; static void -write (shared_ptr<AudioBuffers> b, DCPTime) +write(shared_ptr<AudioBuffers> b, DCPTime) { - sf_write_float (L, b->data(0), b->frames()); - sf_write_float (R, b->data(1), b->frames()); - sf_write_float (C, b->data(2), b->frames()); - sf_write_float (Lfe, b->data(3), b->frames()); - sf_write_float (Ls, b->data(4), b->frames()); - sf_write_float (Rs, b->data(5), b->frames()); + sf_write_float(L, b->data(0), b->frames()); + sf_write_float(R, b->data(1), b->frames()); + sf_write_float(C, b->data(2), b->frames()); + sf_write_float(Lfe, b->data(3), b->frames()); + sf_write_float(Ls, b->data(4), b->frames()); + sf_write_float(Rs, b->data(5), b->frames()); } -BOOST_AUTO_TEST_CASE (upmixer_a_test) +BOOST_AUTO_TEST_CASE(upmixer_a_test) { auto content = make_shared<FFmpegContent>("test/data/white.wav"); auto film = new_test_film("upmixer_a_test", { content }); - film->set_audio_processor (AudioProcessor::from_id("stereo-5.1-upmix-a")); + film->set_audio_processor(AudioProcessor::from_id("stereo-5.1-upmix-a")); SF_INFO info; info.samplerate = 48000; info.channels = 1; info.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16; - L = sf_open ("build/test/upmixer_a_test/L.wav", SFM_WRITE, &info); - R = sf_open ("build/test/upmixer_a_test/R.wav", SFM_WRITE, &info); - C = sf_open ("build/test/upmixer_a_test/C.wav", SFM_WRITE, &info); - Lfe = sf_open ("build/test/upmixer_a_test/Lfe.wav", SFM_WRITE, &info); - Ls = sf_open ("build/test/upmixer_a_test/Ls.wav", SFM_WRITE, &info); - Rs = sf_open ("build/test/upmixer_a_test/Rs.wav", SFM_WRITE, &info); + L = sf_open("build/test/upmixer_a_test/L.wav", SFM_WRITE, &info); + R = sf_open("build/test/upmixer_a_test/R.wav", SFM_WRITE, &info); + C = sf_open("build/test/upmixer_a_test/C.wav", SFM_WRITE, &info); + Lfe = sf_open("build/test/upmixer_a_test/Lfe.wav", SFM_WRITE, &info); + Ls = sf_open("build/test/upmixer_a_test/Ls.wav", SFM_WRITE, &info); + Rs = sf_open("build/test/upmixer_a_test/Rs.wav", SFM_WRITE, &info); auto player = make_shared<Player>(film, Image::Alignment::COMPACT, false); - player->Audio.connect (bind (&write, _1, _2)); + player->Audio.connect(bind(&write, _1, _2)); while (!player->pass()) {} - sf_close (L); - sf_close (R); - sf_close (C); - sf_close (Lfe); - sf_close (Ls); - sf_close (Rs); - - check_wav_file ("test/data/upmixer_a_test/L.wav", "build/test/upmixer_a_test/L.wav"); - check_wav_file ("test/data/upmixer_a_test/R.wav", "build/test/upmixer_a_test/R.wav"); - check_wav_file ("test/data/upmixer_a_test/C.wav", "build/test/upmixer_a_test/C.wav"); - check_wav_file ("test/data/upmixer_a_test/Lfe.wav", "build/test/upmixer_a_test/Lfe.wav"); - check_wav_file ("test/data/upmixer_a_test/Ls.wav", "build/test/upmixer_a_test/Ls.wav"); - check_wav_file ("test/data/upmixer_a_test/Rs.wav", "build/test/upmixer_a_test/Rs.wav"); + sf_close(L); + sf_close(R); + sf_close(C); + sf_close(Lfe); + sf_close(Ls); + sf_close(Rs); + + check_wav_file("test/data/upmixer_a_test/L.wav", "build/test/upmixer_a_test/L.wav"); + check_wav_file("test/data/upmixer_a_test/R.wav", "build/test/upmixer_a_test/R.wav"); + check_wav_file("test/data/upmixer_a_test/C.wav", "build/test/upmixer_a_test/C.wav"); + check_wav_file("test/data/upmixer_a_test/Lfe.wav", "build/test/upmixer_a_test/Lfe.wav"); + check_wav_file("test/data/upmixer_a_test/Ls.wav", "build/test/upmixer_a_test/Ls.wav"); + check_wav_file("test/data/upmixer_a_test/Rs.wav", "build/test/upmixer_a_test/Rs.wav"); } diff --git a/test/vf_test.cc b/test/vf_test.cc index b362e59b8..9c7ff65be 100644 --- a/test/vf_test.cc +++ b/test/vf_test.cc @@ -64,65 +64,65 @@ using namespace dcpomatic; /** Test the logic which decides whether a DCP can be referenced or not */ -BOOST_AUTO_TEST_CASE (vf_test1) +BOOST_AUTO_TEST_CASE(vf_test1) { auto dcp = make_shared<DCPContent>("test/data/reels_test2"); auto film = new_test_film("vf_test1", { dcp }); /* Multi-reel DCP can't be referenced if we are using a single reel for the project */ - film->set_reel_type (ReelType::SINGLE); + film->set_reel_type(ReelType::SINGLE); film->set_audio_channels(16); string why_not; - BOOST_CHECK (!dcp->can_reference_video(film, why_not)); - BOOST_CHECK (!dcp->can_reference_audio(film, why_not)); - BOOST_CHECK (!dcp->can_reference_text(film, TextType::OPEN_SUBTITLE, why_not)); - BOOST_CHECK (!dcp->can_reference_text(film, TextType::CLOSED_CAPTION, why_not)); + BOOST_CHECK(!dcp->can_reference_video(film, why_not)); + BOOST_CHECK(!dcp->can_reference_audio(film, why_not)); + BOOST_CHECK(!dcp->can_reference_text(film, TextType::OPEN_SUBTITLE, why_not)); + BOOST_CHECK(!dcp->can_reference_text(film, TextType::CLOSED_CAPTION, why_not)); /* Multi-reel DCP can be referenced if we are using by-video-content */ - film->set_reel_type (ReelType::BY_VIDEO_CONTENT); - BOOST_CHECK (dcp->can_reference_video(film, why_not)); - BOOST_CHECK (dcp->can_reference_audio(film, why_not)); + film->set_reel_type(ReelType::BY_VIDEO_CONTENT); + BOOST_CHECK(dcp->can_reference_video(film, why_not)); + BOOST_CHECK(dcp->can_reference_audio(film, why_not)); /* (but reels_test2 has no texts to reference) */ - BOOST_CHECK (!dcp->can_reference_text(film, TextType::OPEN_SUBTITLE, why_not)); - BOOST_CHECK (!dcp->can_reference_text(film, TextType::CLOSED_CAPTION, why_not)); + BOOST_CHECK(!dcp->can_reference_text(film, TextType::OPEN_SUBTITLE, why_not)); + BOOST_CHECK(!dcp->can_reference_text(film, TextType::CLOSED_CAPTION, why_not)); auto other = make_shared<FFmpegContent>("test/data/test.mp4"); film->examine_and_add_content({other}); - BOOST_REQUIRE (!wait_for_jobs()); - BOOST_CHECK (!other->audio); + BOOST_REQUIRE(!wait_for_jobs()); + BOOST_CHECK(!other->audio); /* Not possible if there is overlap; we only check video here as that's all test.mp4 has */ - other->set_position (film, DCPTime()); - BOOST_CHECK (!dcp->can_reference_video(film, why_not)); + other->set_position(film, DCPTime()); + BOOST_CHECK(!dcp->can_reference_video(film, why_not)); /* This should not be considered an overlap */ - other->set_position (film, dcp->end(film)); - BOOST_CHECK (dcp->can_reference_video(film, why_not)); - BOOST_CHECK (dcp->can_reference_audio(film, why_not)); + other->set_position(film, dcp->end(film)); + BOOST_CHECK(dcp->can_reference_video(film, why_not)); + BOOST_CHECK(dcp->can_reference_audio(film, why_not)); /* (reels_test2 has no texts to reference) */ - BOOST_CHECK (!dcp->can_reference_text(film, TextType::OPEN_SUBTITLE, why_not)); - BOOST_CHECK (!dcp->can_reference_text(film, TextType::CLOSED_CAPTION, why_not)); + BOOST_CHECK(!dcp->can_reference_text(film, TextType::OPEN_SUBTITLE, why_not)); + BOOST_CHECK(!dcp->can_reference_text(film, TextType::CLOSED_CAPTION, why_not)); } /** Make a OV with video and audio and a VF referencing the OV and adding subs */ -BOOST_AUTO_TEST_CASE (vf_test2) +BOOST_AUTO_TEST_CASE(vf_test2) { /* Make the OV */ auto video = content_factory("test/data/flat_red.png")[0]; auto audio = content_factory("test/data/white.wav")[0]; auto ov = new_test_film("vf_test2_ov", { video, audio }); - video->video->set_length (24 * 5); - make_and_verify_dcp (ov); + video->video->set_length(24 * 5); + make_and_verify_dcp(ov); /* Make the VF */ auto dcp = make_shared<DCPContent>(ov->dir(ov->dcp_name())); auto sub = content_factory("test/data/subrip4.srt")[0]; auto vf = new_test_film("vf_test2_vf", { dcp, sub }); - vf->set_reel_type (ReelType::BY_VIDEO_CONTENT); - dcp->set_reference_video (true); - dcp->set_reference_audio (true); - make_and_verify_dcp ( + vf->set_reel_type(ReelType::BY_VIDEO_CONTENT); + dcp->set_reference_video(true); + dcp->set_reference_audio(true); + make_and_verify_dcp( vf, { dcp::VerificationNote::Code::EXTERNAL_ASSET, @@ -133,27 +133,27 @@ BOOST_AUTO_TEST_CASE (vf_test2) false ); - dcp::DCP ov_c (ov->dir(ov->dcp_name())); - ov_c.read (); - BOOST_REQUIRE_EQUAL (ov_c.cpls().size(), 1U); - BOOST_REQUIRE_EQUAL (ov_c.cpls()[0]->reels().size(), 1U); - BOOST_REQUIRE (ov_c.cpls()[0]->reels()[0]->main_picture()); + dcp::DCP ov_c(ov->dir(ov->dcp_name())); + ov_c.read(); + BOOST_REQUIRE_EQUAL(ov_c.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL(ov_c.cpls()[0]->reels().size(), 1U); + BOOST_REQUIRE(ov_c.cpls()[0]->reels()[0]->main_picture()); string const pic_id = ov_c.cpls()[0]->reels()[0]->main_picture()->id(); - BOOST_REQUIRE (ov_c.cpls()[0]->reels()[0]->main_sound()); + BOOST_REQUIRE(ov_c.cpls()[0]->reels()[0]->main_sound()); string const sound_id = ov_c.cpls()[0]->reels()[0]->main_sound()->id(); - BOOST_REQUIRE (!ov_c.cpls()[0]->reels()[0]->main_subtitle()); + BOOST_REQUIRE(!ov_c.cpls()[0]->reels()[0]->main_subtitle()); BOOST_REQUIRE(!ov_c.pkls().empty()); BOOST_CHECK(!static_cast<bool>(ov_c.pkls()[0]->group_id())); - dcp::DCP vf_c (vf->dir(vf->dcp_name())); - vf_c.read (); - BOOST_REQUIRE_EQUAL (vf_c.cpls().size(), 1U); - BOOST_REQUIRE_EQUAL (vf_c.cpls()[0]->reels().size(), 1U); - BOOST_REQUIRE (vf_c.cpls()[0]->reels()[0]->main_picture()); - BOOST_CHECK_EQUAL (vf_c.cpls()[0]->reels()[0]->main_picture()->id(), pic_id); - BOOST_REQUIRE (vf_c.cpls()[0]->reels()[0]->main_sound()); - BOOST_CHECK_EQUAL (vf_c.cpls()[0]->reels()[0]->main_sound()->id(), sound_id); - BOOST_REQUIRE (vf_c.cpls()[0]->reels()[0]->main_subtitle()); + dcp::DCP vf_c(vf->dir(vf->dcp_name())); + vf_c.read(); + BOOST_REQUIRE_EQUAL(vf_c.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL(vf_c.cpls()[0]->reels().size(), 1U); + BOOST_REQUIRE(vf_c.cpls()[0]->reels()[0]->main_picture()); + BOOST_CHECK_EQUAL(vf_c.cpls()[0]->reels()[0]->main_picture()->id(), pic_id); + BOOST_REQUIRE(vf_c.cpls()[0]->reels()[0]->main_sound()); + BOOST_CHECK_EQUAL(vf_c.cpls()[0]->reels()[0]->main_sound()->id(), sound_id); + BOOST_REQUIRE(vf_c.cpls()[0]->reels()[0]->main_subtitle()); BOOST_REQUIRE(!vf_c.pkls().empty()); BOOST_CHECK(static_cast<bool>(vf_c.pkls()[0]->group_id())); } @@ -162,148 +162,148 @@ BOOST_AUTO_TEST_CASE (vf_test2) /** Test creation of a VF using a trimmed OV; the output should have entry point / * duration altered to effect the trimming. */ -BOOST_AUTO_TEST_CASE (vf_test3) +BOOST_AUTO_TEST_CASE(vf_test3) { /* Make the OV */ auto video = content_factory("test/data/flat_red.png")[0]; auto audio = content_factory("test/data/white.wav")[0]; auto ov = new_test_film("vf_test3_ov", { video, audio }); - video->video->set_length (24 * 5); - make_and_verify_dcp (ov); + video->video->set_length(24 * 5); + make_and_verify_dcp(ov); /* Make the VF */ auto dcp = make_shared<DCPContent>(ov->dir(ov->dcp_name())); auto vf = new_test_film("vf_test3_vf", { dcp }); - vf->set_reel_type (ReelType::BY_VIDEO_CONTENT); - dcp->set_trim_start(vf, ContentTime::from_seconds (1)); - dcp->set_trim_end (ContentTime::from_seconds (1)); - dcp->set_reference_video (true); - dcp->set_reference_audio (true); + vf->set_reel_type(ReelType::BY_VIDEO_CONTENT); + dcp->set_trim_start(vf, ContentTime::from_seconds(1)); + dcp->set_trim_end(ContentTime::from_seconds(1)); + dcp->set_reference_video(true); + dcp->set_reference_audio(true); make_and_verify_dcp(vf, {dcp::VerificationNote::Code::EXTERNAL_ASSET}, false); - dcp::DCP vf_c (vf->dir(vf->dcp_name())); - vf_c.read (); - BOOST_REQUIRE_EQUAL (vf_c.cpls().size(), 1U); - BOOST_REQUIRE_EQUAL (vf_c.cpls()[0]->reels().size(), 1U); - BOOST_REQUIRE (vf_c.cpls()[0]->reels()[0]->main_picture()); - BOOST_CHECK_EQUAL (vf_c.cpls()[0]->reels()[0]->main_picture()->entry_point().get_value_or(0), 24); - BOOST_CHECK_EQUAL (vf_c.cpls()[0]->reels()[0]->main_picture()->actual_duration(), 72); - BOOST_REQUIRE (vf_c.cpls()[0]->reels()[0]->main_sound()); - BOOST_CHECK_EQUAL (vf_c.cpls()[0]->reels()[0]->main_sound()->entry_point().get_value_or(0), 24); - BOOST_CHECK_EQUAL (vf_c.cpls()[0]->reels()[0]->main_sound()->actual_duration(), 72); + dcp::DCP vf_c(vf->dir(vf->dcp_name())); + vf_c.read(); + BOOST_REQUIRE_EQUAL(vf_c.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL(vf_c.cpls()[0]->reels().size(), 1U); + BOOST_REQUIRE(vf_c.cpls()[0]->reels()[0]->main_picture()); + BOOST_CHECK_EQUAL(vf_c.cpls()[0]->reels()[0]->main_picture()->entry_point().get_value_or(0), 24); + BOOST_CHECK_EQUAL(vf_c.cpls()[0]->reels()[0]->main_picture()->actual_duration(), 72); + BOOST_REQUIRE(vf_c.cpls()[0]->reels()[0]->main_sound()); + BOOST_CHECK_EQUAL(vf_c.cpls()[0]->reels()[0]->main_sound()->entry_point().get_value_or(0), 24); + BOOST_CHECK_EQUAL(vf_c.cpls()[0]->reels()[0]->main_sound()->actual_duration(), 72); } /** Make a OV with video and audio and a VF referencing the OV and adding some more video */ -BOOST_AUTO_TEST_CASE (vf_test4) +BOOST_AUTO_TEST_CASE(vf_test4) { /* Make the OV */ auto video = content_factory("test/data/flat_red.png")[0]; auto audio = content_factory("test/data/white.wav")[0]; auto ov = new_test_film("vf_test4_ov", { video, audio }); - video->video->set_length (24 * 5); - make_and_verify_dcp (ov); + video->video->set_length(24 * 5); + make_and_verify_dcp(ov); /* Make the VF */ auto dcp = make_shared<DCPContent>(ov->dir(ov->dcp_name())); auto vf = new_test_film("vf_test4_vf", { dcp }); - vf->set_reel_type (ReelType::BY_VIDEO_CONTENT); - vf->set_sequence (false); + vf->set_reel_type(ReelType::BY_VIDEO_CONTENT); + vf->set_sequence(false); dcp->set_position(vf, DCPTime::from_seconds(10)); - dcp->set_reference_video (true); - dcp->set_reference_audio (true); + dcp->set_reference_video(true); + dcp->set_reference_audio(true); auto more_video = content_factory("test/data/flat_red.png")[0]; vf->examine_and_add_content({more_video}); - BOOST_REQUIRE (!wait_for_jobs()); - more_video->set_position (vf, DCPTime()); + BOOST_REQUIRE(!wait_for_jobs()); + more_video->set_position(vf, DCPTime()); make_and_verify_dcp(vf, {dcp::VerificationNote::Code::EXTERNAL_ASSET}, false); - dcp::DCP ov_c (ov->dir(ov->dcp_name())); - ov_c.read (); - BOOST_REQUIRE_EQUAL (ov_c.cpls().size(), 1U); - BOOST_REQUIRE_EQUAL (ov_c.cpls()[0]->reels().size(), 1U); - BOOST_REQUIRE (ov_c.cpls()[0]->reels()[0]->main_picture()); + dcp::DCP ov_c(ov->dir(ov->dcp_name())); + ov_c.read(); + BOOST_REQUIRE_EQUAL(ov_c.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL(ov_c.cpls()[0]->reels().size(), 1U); + BOOST_REQUIRE(ov_c.cpls()[0]->reels()[0]->main_picture()); string const pic_id = ov_c.cpls()[0]->reels()[0]->main_picture()->id(); - BOOST_REQUIRE (ov_c.cpls()[0]->reels()[0]->main_sound()); + BOOST_REQUIRE(ov_c.cpls()[0]->reels()[0]->main_sound()); string const sound_id = ov_c.cpls()[0]->reels()[0]->main_sound()->id(); - BOOST_REQUIRE (!ov_c.cpls()[0]->reels()[0]->main_subtitle()); - - dcp::DCP vf_c (vf->dir (vf->dcp_name ())); - vf_c.read (); - BOOST_REQUIRE_EQUAL (vf_c.cpls().size(), 1U); - BOOST_REQUIRE_EQUAL (vf_c.cpls()[0]->reels().size(), 2U); - BOOST_REQUIRE (vf_c.cpls()[0]->reels().back()->main_picture()); - BOOST_CHECK_EQUAL (vf_c.cpls()[0]->reels().back()->main_picture()->id(), pic_id); - BOOST_REQUIRE (vf_c.cpls()[0]->reels().back()->main_sound()); - BOOST_CHECK_EQUAL (vf_c.cpls()[0]->reels().back()->main_sound()->id(), sound_id); + BOOST_REQUIRE(!ov_c.cpls()[0]->reels()[0]->main_subtitle()); + + dcp::DCP vf_c(vf->dir(vf->dcp_name())); + vf_c.read(); + BOOST_REQUIRE_EQUAL(vf_c.cpls().size(), 1U); + BOOST_REQUIRE_EQUAL(vf_c.cpls()[0]->reels().size(), 2U); + BOOST_REQUIRE(vf_c.cpls()[0]->reels().back()->main_picture()); + BOOST_CHECK_EQUAL(vf_c.cpls()[0]->reels().back()->main_picture()->id(), pic_id); + BOOST_REQUIRE(vf_c.cpls()[0]->reels().back()->main_sound()); + BOOST_CHECK_EQUAL(vf_c.cpls()[0]->reels().back()->main_sound()->id(), sound_id); } /** Test bug #1495 */ -BOOST_AUTO_TEST_CASE (vf_test5) +BOOST_AUTO_TEST_CASE(vf_test5) { /* Make the OV */ auto ov = new_test_film("vf_test5_ov"); - ov->set_reel_type (ReelType::BY_VIDEO_CONTENT); + ov->set_reel_type(ReelType::BY_VIDEO_CONTENT); for (int i = 0; i < 3; ++i) { auto video = content_factory("test/data/flat_red.png")[0]; ov->examine_and_add_content({video}); - BOOST_REQUIRE (!wait_for_jobs()); - video->video->set_length (24 * 10); + BOOST_REQUIRE(!wait_for_jobs()); + video->video->set_length(24 * 10); } - BOOST_REQUIRE (!wait_for_jobs()); - make_and_verify_dcp (ov); + BOOST_REQUIRE(!wait_for_jobs()); + make_and_verify_dcp(ov); /* Make the VF */ auto dcp = make_shared<DCPContent>(ov->dir(ov->dcp_name())); auto vf = new_test_film("vf_test5_vf", { dcp }); - vf->set_reel_type (ReelType::BY_VIDEO_CONTENT); - vf->set_sequence (false); - dcp->set_reference_video (true); - dcp->set_reference_audio (true); - dcp->set_trim_end (ContentTime::from_seconds(15)); + vf->set_reel_type(ReelType::BY_VIDEO_CONTENT); + vf->set_sequence(false); + dcp->set_reference_video(true); + dcp->set_reference_audio(true); + dcp->set_trim_end(ContentTime::from_seconds(15)); make_and_verify_dcp(vf, {dcp::VerificationNote::Code::EXTERNAL_ASSET}, false); /* Check that the selected reel assets are right */ auto a = get_referenced_reel_assets(vf, vf->playlist()); - BOOST_REQUIRE_EQUAL (a.size(), 4U); + BOOST_REQUIRE_EQUAL(a.size(), 4U); auto i = a.begin(); - BOOST_CHECK (i->period == DCPTimePeriod(DCPTime(0), DCPTime(960000))); + BOOST_CHECK(i->period == DCPTimePeriod(DCPTime(0), DCPTime(960000))); ++i; - BOOST_CHECK (i->period == DCPTimePeriod(DCPTime(0), DCPTime(960000))); + BOOST_CHECK(i->period == DCPTimePeriod(DCPTime(0), DCPTime(960000))); ++i; - BOOST_CHECK (i->period == DCPTimePeriod(DCPTime(960000), DCPTime(1440000))); + BOOST_CHECK(i->period == DCPTimePeriod(DCPTime(960000), DCPTime(1440000))); ++i; - BOOST_CHECK (i->period == DCPTimePeriod(DCPTime(960000), DCPTime(1440000))); + BOOST_CHECK(i->period == DCPTimePeriod(DCPTime(960000), DCPTime(1440000))); ++i; } /** Test bug #1528 */ -BOOST_AUTO_TEST_CASE (vf_test6) +BOOST_AUTO_TEST_CASE(vf_test6) { /* Make the OV */ auto video = content_factory("test/data/flat_red.png")[0]; auto ov = new_test_film("vf_test6_ov", { video }); - ov->set_reel_type (ReelType::BY_VIDEO_CONTENT); - video->video->set_length (24 * 10); - make_and_verify_dcp (ov); + ov->set_reel_type(ReelType::BY_VIDEO_CONTENT); + video->video->set_length(24 * 10); + make_and_verify_dcp(ov); /* Make the VF */ auto dcp = make_shared<DCPContent>(ov->dir(ov->dcp_name())); auto vf = new_test_film("vf_test6_vf", { dcp }); - vf->set_reel_type (ReelType::BY_VIDEO_CONTENT); - vf->set_sequence (false); - dcp->set_reference_video (true); - dcp->set_reference_audio (true); + vf->set_reel_type(ReelType::BY_VIDEO_CONTENT); + vf->set_sequence(false); + dcp->set_reference_video(true); + dcp->set_reference_audio(true); auto sub = content_factory("test/data/15s.srt")[0]; vf->examine_and_add_content({sub}); - BOOST_REQUIRE (!wait_for_jobs()); + BOOST_REQUIRE(!wait_for_jobs()); - make_and_verify_dcp ( + make_and_verify_dcp( vf, { dcp::VerificationNote::Code::EXTERNAL_ASSET, @@ -316,34 +316,34 @@ BOOST_AUTO_TEST_CASE (vf_test6) /** Test bug #1643 (the second part; referring fails if there are gaps) */ -BOOST_AUTO_TEST_CASE (vf_test7) +BOOST_AUTO_TEST_CASE(vf_test7) { /* First OV */ auto ov1 = new_test_film("vf_test7_ov1", {content_factory("test/data/flat_red.png")[0]}); - ov1->set_video_frame_rate (24); - make_and_verify_dcp (ov1); + ov1->set_video_frame_rate(24); + make_and_verify_dcp(ov1); /* Second OV */ auto ov2 = new_test_film("vf_test7_ov2", {content_factory("test/data/flat_red.png")[0]}); - ov2->set_video_frame_rate (24); - make_and_verify_dcp (ov2); + ov2->set_video_frame_rate(24); + make_and_verify_dcp(ov2); /* VF */ auto ov1_dcp = make_shared<DCPContent>(ov1->dir(ov1->dcp_name())); auto ov2_dcp = make_shared<DCPContent>(ov2->dir(ov2->dcp_name())); auto vf = new_test_film("vf_test7_vf", {ov1_dcp, ov2_dcp}); - vf->set_reel_type (ReelType::BY_VIDEO_CONTENT); - ov1_dcp->set_reference_video (true); - ov2_dcp->set_reference_video (true); - ov1_dcp->set_position (vf, DCPTime::from_seconds(1)); - ov2_dcp->set_position (vf, DCPTime::from_seconds(20)); - vf->write_metadata (); - make_and_verify_dcp (vf); + vf->set_reel_type(ReelType::BY_VIDEO_CONTENT); + ov1_dcp->set_reference_video(true); + ov2_dcp->set_reference_video(true); + ov1_dcp->set_position(vf, DCPTime::from_seconds(1)); + ov2_dcp->set_position(vf, DCPTime::from_seconds(20)); + vf->write_metadata(); + make_and_verify_dcp(vf); } /** Test bug #2116 */ -BOOST_AUTO_TEST_CASE (test_vf_with_trimmed_multi_reel_dcp) +BOOST_AUTO_TEST_CASE(test_vf_with_trimmed_multi_reel_dcp) { /* Make an OV with 3 reels */ std::vector<std::shared_ptr<Content>> ov_content; @@ -354,7 +354,7 @@ BOOST_AUTO_TEST_CASE (test_vf_with_trimmed_multi_reel_dcp) } auto ov = new_test_film("test_vf_with_trimmed_multi_reel_dcp_ov", ov_content); ov->set_reel_type(ReelType::BY_VIDEO_CONTENT); - make_and_verify_dcp (ov); + make_and_verify_dcp(ov); /* Make a VF with a specific arrangement */ auto vf_image = content_factory("test/data/flat_red.png")[0]; |
