X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fdcp_metadata_test.cc;h=dd81a41613711a76b940ed0aa2402c092bc621d1;hb=395d753b81bce0c5ca32f5662eb959d915ebdcdc;hp=67d170020c33b184b0284298997fe0c44999d7d2;hpb=9db56a75e50701bb27ac0b3134a70d2be373ac52;p=dcpomatic.git diff --git a/test/dcp_metadata_test.cc b/test/dcp_metadata_test.cc index 67d170020..dd81a4161 100644 --- a/test/dcp_metadata_test.cc +++ b/test/dcp_metadata_test.cc @@ -30,8 +30,8 @@ BOOST_AUTO_TEST_CASE (dcp_metadata_test) { - auto content = content_factory("test/data/flat_red.png").front(); - auto film = new_test_film2 ("dcp_metadata_test", { content }); + auto content = content_factory("test/data/flat_red.png"); + auto film = new_test_film2 ("dcp_metadata_test", content); Config::instance()->set_dcp_creator ("this is the creator"); Config::instance()->set_dcp_issuer ("this is the issuer"); @@ -50,3 +50,22 @@ BOOST_AUTO_TEST_CASE (dcp_metadata_test) BOOST_CHECK_EQUAL (cpls[0]->issuer(), "this is the issuer"); } + +BOOST_AUTO_TEST_CASE(main_picture_active_area_test) +{ + auto content = content_factory(TestPaths::private_data() / "bbc405.png"); + auto film = new_test_film2("main_picture_active_area_test", content); + film->set_resolution(Resolution::FOUR_K); + film->set_interop(false); + + make_and_verify_dcp(film, { dcp::VerificationNote::Code::MISSING_CPL_METADATA }); + + dcp::DCP dcp(film->dir(film->dcp_name())); + dcp.read(); + auto cpls = dcp.cpls(); + BOOST_REQUIRE_EQUAL(cpls.size(), 1U); + + BOOST_REQUIRE(static_cast(cpls[0]->main_picture_active_area())); + BOOST_REQUIRE(cpls[0]->main_picture_active_area() == dcp::Size(2866, 2160)); +} +