summaryrefslogtreecommitdiff
path: root/test/vf_kdm_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-05-20 16:54:37 +0200
committerCarl Hetherington <cth@carlh.net>2024-05-21 23:52:46 +0200
commite3dba6242aed7415eddbbfb1e5d56ce6680603c1 (patch)
tree8628ae20b900cd03638648ef34711a56bf7ef3a6 /test/vf_kdm_test.cc
parent19b6cd41712d38cb5b1c97659c8a1cc86e784812 (diff)
Replace all new_test_film with new_test_film2.
Diffstat (limited to 'test/vf_kdm_test.cc')
-rw-r--r--test/vf_kdm_test.cc40
1 files changed, 14 insertions, 26 deletions
diff --git a/test/vf_kdm_test.cc b/test/vf_kdm_test.cc
index d8efa7ab7..5ab1761d3 100644
--- a/test/vf_kdm_test.cc
+++ b/test/vf_kdm_test.cc
@@ -51,16 +51,11 @@ BOOST_AUTO_TEST_CASE (vf_kdm_test)
/* Make an encrypted DCP from test.mp4 */
- auto A = new_test_film ("vf_kdm_test_ov");
- A->set_container (Ratio::from_id ("185"));
- A->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
- A->set_name ("frobozz");
- A->set_interop (true);
-
auto c = make_shared<FFmpegContent>("test/data/test.mp4");
- A->examine_and_add_content (c);
+ auto A = new_test_film2("vf_kdm_test_ov", { c });
+ A->set_interop (true);
+ A->set_dcp_content_type(DCPContentType::from_isdcf_name("TLR"));
A->set_encrypted (true);
- BOOST_REQUIRE (!wait_for_jobs());
make_and_verify_dcp (A, {dcp::VerificationNote::Code::INVALID_STANDARD});
dcp::DCP A_dcp ("build/test/vf_kdm_test_ov/" + A->dcp_name());
@@ -76,18 +71,15 @@ BOOST_AUTO_TEST_CASE (vf_kdm_test)
/* Import A into a new project, with the required KDM, and make a VF that refers to it */
- auto B = new_test_film ("vf_kdm_test_vf");
- B->set_container (Ratio::from_id("185"));
- B->set_dcp_content_type (DCPContentType::from_isdcf_name("TLR"));
- B->set_name ("frobozz");
- B->set_interop (true);
-
auto d = make_shared<DCPContent>("build/test/vf_kdm_test_ov/" + A->dcp_name());
- d->add_kdm (A_kdm);
+ d->add_kdm(A_kdm);
+
+ auto B = new_test_film2("vf_kdm_test_vf", { d });
+ B->set_dcp_content_type(DCPContentType::from_isdcf_name("TLR"));
+ B->set_interop(true);
+
d->set_reference_video (true);
- B->examine_and_add_content (d);
B->set_encrypted (true);
- BOOST_REQUIRE (!wait_for_jobs());
make_and_verify_dcp (B, {dcp::VerificationNote::Code::INVALID_STANDARD, dcp::VerificationNote::Code::EXTERNAL_ASSET});
dcp::DCP B_dcp ("build/test/vf_kdm_test_vf/" + B->dcp_name());
@@ -100,18 +92,14 @@ BOOST_AUTO_TEST_CASE (vf_kdm_test)
This KDM should decrypt assets from the OV too.
*/
- auto C = new_test_film ("vf_kdm_test_check");
- C->set_container (Ratio::from_id ("185"));
- C->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
- C->set_name ("frobozz");
- C->set_interop (true);
-
auto e = make_shared<DCPContent>("build/test/vf_kdm_test_vf/" + B->dcp_name());
- e->add_kdm (B_kdm);
e->add_ov ("build/test/vf_kdm_test_ov/" + A->dcp_name());
- C->examine_and_add_content (e);
+ e->add_kdm(B_kdm);
+ auto C = new_test_film2("vf_kdm_test_check", { e });
+ C->set_interop (true);
C->set_audio_channels(6);
- BOOST_REQUIRE (!wait_for_jobs());
+ C->set_dcp_content_type(DCPContentType::from_isdcf_name("TLR"));
+
make_and_verify_dcp (C, {dcp::VerificationNote::Code::INVALID_STANDARD});
/* Should be 1s red, 1s green, 1s blue */