Note that newer libsub version is required.
[dcpomatic.git] / test / atmos_test.cc
index c2b0cb6d8e03b48a65b6fc7c38bd44a26596b47d..9fdddc979306c79bb451437abe0bcf5490547ad0 100644 (file)
@@ -74,16 +74,11 @@ BOOST_AUTO_TEST_CASE (atmos_encrypted_passthrough_test)
 
        BOOST_REQUIRE (!mxf_atmos_files_same(ref, dcp_file(film, "atmos")));
 
-       auto kdm = film->make_kdm (
-               Config::instance()->decryption_chain()->leaf(),
-               vector<string>(),
-               dcp_file(film, "cpl"),
-               dcp::LocalTime(),
-               dcp::LocalTime(),
-               dcp::Formulation::MODIFIED_TRANSITIONAL_1,
-               false,
-               optional<int>()
-               );
+       auto signer = Config::instance()->signer_chain();
+       BOOST_REQUIRE(signer->valid());
+
+       auto const decrypted_kdm = film->make_kdm(dcp_file(film, "cpl"), dcp::LocalTime(), dcp::LocalTime());
+       auto const kdm = decrypted_kdm.encrypt(signer, Config::instance()->decryption_chain()->leaf(), {}, dcp::Formulation::MODIFIED_TRANSITIONAL_1, false, {});
 
        auto content2 = make_shared<DCPContent>(film->dir(film->dcp_name()));
        content2->add_kdm (kdm);
@@ -144,7 +139,7 @@ BOOST_AUTO_TEST_CASE(atmos_replace_test)
        auto vf = new_test_film2("atmos_merge_test_vf", { ov_content, atmos_1.front() });
        ov_content->set_reference_video(true);
        atmos_1.front()->set_position(vf, dcpomatic::DCPTime());
-       make_and_verify_dcp(vf, { dcp::VerificationNote::Code::MISSING_CPL_METADATA, dcp::VerificationNote::Code::EXTERNAL_ASSET });
+       make_and_verify_dcp(vf, { dcp::VerificationNote::Code::MISSING_CPL_METADATA, dcp::VerificationNote::Code::EXTERNAL_ASSET }, false);
        // atmos_1.mxf should contain all ones for its data, and it should have replaced atmos_0 in this DCP
        check(vf, 1);
 }