diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-03-20 19:32:32 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-15 17:13:06 +0100 |
| commit | efb0f58d6ba54d7af34493352ce2fc42be0daa50 (patch) | |
| tree | a6bd1f623f0612b305800bc56b844a2d8a29c6a5 | |
| parent | d2a71383bf9f47ac4277d8c353914cbfa6ab3a05 (diff) | |
Put reel index and asset id in context.
| -rw-r--r-- | src/verify.cc | 13 | ||||
| -rw-r--r-- | src/verify.h | 45 | ||||
| -rw-r--r-- | src/verify_internal.h | 8 | ||||
| -rw-r--r-- | test/verify_test.cc | 480 |
4 files changed, 302 insertions, 244 deletions
diff --git a/src/verify.cc b/src/verify.cc index 4a767de1..0d542de3 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -53,6 +53,7 @@ #include "reel_sound_asset.h" #include "reel_smpte_text_asset.h" #include "reel_text_asset.h" +#include "scope_guard.h" #include "smpte_text_asset.h" #include "stereo_j2k_picture_asset.h" #include "stereo_j2k_picture_frame.h" @@ -981,6 +982,9 @@ verify_text_details ( }; for (auto i = 0U; i < reels.size(); ++i) { + context.reel_index = i; + dcp::ScopeGuard sg = [&context]() { context.reel_index = boost::none; }; + if (!check(reels[i])) { continue; } @@ -1447,6 +1451,8 @@ verify_reel( /* Check asset */ if (reel->main_picture()->asset_ref().resolved()) { verify_main_picture_asset(context, reel->main_picture(), start_frame); + context.asset_id = reel->main_picture()->asset_ref().id(); + dcp::ScopeGuard sg = [&context]() { context.asset_id = boost::none; }; auto const asset_size = reel->main_picture()->asset()->size(); if (main_picture_active_area) { if (main_picture_active_area->width > asset_size.width) { @@ -1656,8 +1662,11 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl) } int64_t frame = 0; + int reel_index = 0; for (auto reel: cpl->reels()) { context.stage("Checking reel", optional<boost::filesystem::path>()); + context.reel_index = reel_index; + dcp::ScopeGuard sg = [&context]() { context.reel_index = boost::none; }; verify_reel( context, reel, @@ -1670,6 +1679,7 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl) &markers_seen ); frame += reel->duration(); + ++reel_index; } verify_text_details(context, cpl->reels()); @@ -2210,7 +2220,8 @@ dcp::operator== (dcp::VerificationNote const& a, dcp::VerificationNote const& b) a.frame_rate() == b.frame_rate() && a.cpl_id() == b.cpl_id() && a.reference_hash() == b.reference_hash() && - a.calculated_hash() == b.calculated_hash(); + a.calculated_hash() == b.calculated_hash() && + a.reel_index() == b.reel_index(); } diff --git a/src/verify.h b/src/verify.h index 6499f815..6867721b 100644 --- a/src/verify.h +++ b/src/verify.h @@ -370,49 +370,76 @@ public: INVALID_JPEG2000_CODESTREAM, /** Invalid number of guard bits in a 2K JPEG2000 stream (should be 1) [Bv2.1_10.2.1] * note contains the number of guard bits + * id contains the asset ID + * reel contains the reel index (starting from 0) */ INVALID_JPEG2000_GUARD_BITS_FOR_2K, /** Invalid number of guard bits in a 4K JPEG2000 stream (should be 2) [Bv2.1_10.2.1] * note contains the number of guard bits + * id contains the asset ID + * reel contains the reel index (starting from 0) */ INVALID_JPEG2000_GUARD_BITS_FOR_4K, - /** JPEG2000 tile size is not the same as the image size [Bv2.1_10.2.1] */ + /** JPEG2000 tile size is not the same as the image size [Bv2.1_10.2.1] + * id contains the asset ID + * reel contains the reel index (starting from 0) + */ INVALID_JPEG2000_TILE_SIZE, /** JPEG2000 code block width is not 32 [Bv2.1_10.2.1] * note contains the code block width + * id contains the asset ID + * reel contains the reel index (starting from 0) */ INVALID_JPEG2000_CODE_BLOCK_WIDTH, /** JPEG2000 code block height is not 32 [Bv2.1_10.2.1] * note contains the code block height + * id contains the asset ID + * reel contains the reel index (starting from 0) */ INVALID_JPEG2000_CODE_BLOCK_HEIGHT, /** There must be no POC markers in a 2K codestream [Bv2.1_10.2.1] * note contains the number of POC markers found + * id contains the asset ID + * reel contains the reel index (starting from 0) */ INCORRECT_JPEG2000_POC_MARKER_COUNT_FOR_2K, /** There must be exactly one POC marker in a 4K codestream [Bv2.1_10.2.1] * note contains the number of POC markers found + * id contains the asset ID + * reel contains the reel index (starting from 0) */ INCORRECT_JPEG2000_POC_MARKER_COUNT_FOR_4K, /** A POC marker has incorrect content [Bv2.1_10.2.1] * note contains details + * id contains the asset ID + * reel contains the reel index (starting from 0) */ INCORRECT_JPEG2000_POC_MARKER, - /** A POC marker was found outside the main head [Bv2.1_10.2.1] */ + /** A POC marker was found outside the main head [Bv2.1_10.2.1] + * id contains the asset ID + * reel contains the reel index (starting from 0) + */ INVALID_JPEG2000_POC_MARKER_LOCATION, /** Invalid number of tile parts for 2K JPEG2000 stream (should be 3) [Bv2.1_10.2.1] * note contains the number of tile parts + * id contains the asset ID + * reel contains the reel index (starting from 0) */ INVALID_JPEG2000_TILE_PARTS_FOR_2K, /** Invalid number of tile parts for 4K JPEG2000 stream (should be 6) [Bv2.1_10.2.1] * note contains the number of tile parts + * id contains the asset ID + * reel contains the reel index (starting from 0) */ INVALID_JPEG2000_TILE_PARTS_FOR_4K, /** Invalid Rsiz (capabilities) value in 2K JPEG2000 stream */ INVALID_JPEG2000_RSIZ_FOR_2K, /** Invalid Rsiz (capabilities) value in 4K JPEG2000 stream */ INVALID_JPEG2000_RSIZ_FOR_4K, - /** No TLM marker was found [Bv2.1_10.2.1] */ + /** No TLM marker was found [Bv2.1_10.2.1] + * id contains the asset ID + * reel contains the reel index (starting from 0) + */ MISSING_JPEG200_TLM_MARKER, /** The MXF _ResourceID_ of a timed text resource was not the same as that of the contained XML essence [Bv2.1_10.4.3] */ MISMATCHED_TIMED_TEXT_RESOURCE_ID, @@ -586,7 +613,8 @@ private: FRAME_RATE, CPL_ID, CALCULATED_HASH, - REFERENCE_HASH + REFERENCE_HASH, + REEL_INDEX ///< reel index, counting from 0 }; template <class T> @@ -693,6 +721,15 @@ public: return data<std::string>(Data::CPL_ID); } + VerificationNote& set_reel_index(int index) { + _data[Data::REEL_INDEX] = index; + return *this; + } + + boost::optional<int> reel_index() const { + return data<int>(Data::REEL_INDEX); + } + private: Type _type; Code _code; diff --git a/src/verify_internal.h b/src/verify_internal.h index d6e3c075..33ab873d 100644 --- a/src/verify_internal.h +++ b/src/verify_internal.h @@ -122,6 +122,12 @@ public: if (cpl) { note.set_cpl_id(cpl->id()); } + if (reel_index) { + note.set_reel_index(*reel_index); + } + if (asset_id) { + note.set_id(*asset_id); + } notes.push_back(std::move(note)); } @@ -142,6 +148,8 @@ public: std::vector<VerificationNote>& notes; std::shared_ptr<const DCP> dcp; std::shared_ptr<const CPL> cpl; + boost::optional<int> reel_index; + boost::optional<std::string> asset_id; boost::filesystem::path xsd_dtd_directory; std::function<void (std::string, boost::optional<boost::filesystem::path>)> stage; std::function<void (float)> progress; diff --git a/test/verify_test.cc b/test/verify_test.cc index 2cc08b10..eaf93cc3 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -252,12 +252,13 @@ to_string(dcp::VerificationNote const& note) ); s += dcp::String::compose( - "%1 %2 %3 %4 %5]\n", + "%1 %2 %3 %4 %5 %6]\n", note.id().get_value_or("<none>"), note.other_id().get_value_or("<none>"), note.cpl_id().get_value_or("<none>"), note.reference_hash().get_value_or("<none>"), - note.calculated_hash().get_value_or("<none>") + note.calculated_hash().get_value_or("<none>"), + note.reel_index().get_value_or(-1) ); return s; @@ -535,13 +536,13 @@ BOOST_AUTO_TEST_CASE (verify_incorrect_picture_sound_hash) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INCORRECT_PICTURE_HASH, canonical(video_path) - ).set_cpl_id(dcp_test1_cpl_id()).set_reference_hash(video_calc.old_hash()).set_calculated_hash(video_calc.new_hash()), + ).set_cpl_id(dcp_test1_cpl_id()).set_reference_hash(video_calc.old_hash()).set_calculated_hash(video_calc.new_hash()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INCORRECT_SOUND_HASH, canonical(audio_path) - ).set_cpl_id(dcp_test1_cpl_id()).set_reference_hash(audio_calc.old_hash()).set_calculated_hash(audio_calc.new_hash()), + ).set_cpl_id(dcp_test1_cpl_id()).set_reference_hash(audio_calc.old_hash()).set_calculated_hash(audio_calc.new_hash()).set_reel_index(0) }); } @@ -575,16 +576,16 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_picture_sound_hashes) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(dir / dcp_test1_cpl()) ).set_cpl_id(dcp_test1_cpl_id()).set_reference_hash("x" + calc.old_hash()).set_calculated_hash(calc.old_hash()), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_PICTURE_HASHES, canonical(dir / "video.mxf") - ).set_cpl_id(dcp_test1_cpl_id()), + ).set_cpl_id(dcp_test1_cpl_id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_SOUND_HASHES, canonical(dir / "audio.mxf") - ).set_cpl_id(dcp_test1_cpl_id()), + ).set_cpl_id(dcp_test1_cpl_id()).set_reel_index(0), { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'x3M7YTgvFKXXMEGLkIbV4miC90FE=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl()), 28 }, { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'xskI+5b/9LA/y6h0mcyxysJYanxI=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl()), 12 }, { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'xvsVjRV9vhTBPUWfE/TT1o2vdQsI=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl()), 20 }, @@ -609,7 +610,7 @@ BOOST_AUTO_TEST_CASE (verify_failed_read_content_kind) { dir }, {}, { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), dcp::VerificationNote( @@ -620,7 +621,7 @@ BOOST_AUTO_TEST_CASE (verify_failed_read_content_kind) ).set_cpl_id(cpl->id()), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(dir / dcp_test1_cpl()) ).set_cpl_id(dcp_test1_cpl_id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()), @@ -667,7 +668,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_picture_frame_rate) std::vector<dcp::VerificationNote> expected = { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::OK, @@ -679,13 +680,13 @@ BOOST_AUTO_TEST_CASE (verify_invalid_picture_frame_rate) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(cpl_path) ).set_cpl_id(cpl->id()).set_calculated_hash("7n7GQ2TbxQbmHYuAR8ml7XDOep8=").set_reference_hash("skI+5b/9LA/y6h0mcyxysJYanxI="), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE, string{"99/1"} - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }; check_verify_result(dcp::verify({dir}, {}, &stage, &progress, {}, xsd_test).notes, expected); @@ -761,8 +762,8 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_standard) auto cpl = std::make_shared<dcp::CPL>(cpl_path); std::vector<dcp::VerificationNote> expected = { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::OK, @@ -816,8 +817,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_id) auto cpl = std::make_shared<dcp::CPL>(cpl_path); std::vector<dcp::VerificationNote> expected = { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::OK, @@ -852,8 +853,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_issue_date) auto cpl = std::make_shared<dcp::CPL>(cpl_path); std::vector<dcp::VerificationNote> expected = { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::OK, @@ -891,8 +892,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_pkl_id) auto cpl = std::make_shared<dcp::CPL>(cpl_path); std::vector<dcp::VerificationNote> expected = { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::OK, @@ -929,8 +930,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_asset_map_id) auto cpl = std::make_shared<dcp::CPL>(cpl_path); std::vector<dcp::VerificationNote> expected = { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::OK, @@ -1011,15 +1012,15 @@ BOOST_AUTO_TEST_CASE (verify_invalid_standard) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "j2c_c6035f97-b07d-4e1c-944d-603fc2ddc242.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "j2c_c6035f97-b07d-4e1c-944d-603fc2ddc242.mxf"), cpl) + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "j2c_c6035f97-b07d-4e1c-944d-603fc2ddc242.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "j2c_c6035f97-b07d-4e1c-944d-603fc2ddc242.mxf"), cpl).set_reel_index(0) }; for (int j = 0; j < 24; ++j) { expected.push_back( dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_2K, string("2") - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) ); } @@ -1041,21 +1042,21 @@ BOOST_AUTO_TEST_CASE (verify_invalid_duration) ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"feature"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "j2c_d7576dcb-a361-4139-96b8-267f5f8d7f91.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "j2c_d7576dcb-a361-4139-96b8-267f5f8d7f91.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "j2c_d7576dcb-a361-4139-96b8-267f5f8d7f91.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "j2c_d7576dcb-a361-4139-96b8-267f5f8d7f91.mxf"), cpl).set_reel_index(0), { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD }, dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_DURATION, string("d7576dcb-a361-4139-96b8-267f5f8d7f91") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_INTRINSIC_DURATION, string("d7576dcb-a361-4139-96b8-267f5f8d7f91") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_DURATION, string("a2a87f5d-b749-4a7e-8d0c-9d48a4abf626") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_INTRINSIC_DURATION, string("a2a87f5d-b749-4a7e-8d0c-9d48a4abf626") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::EMPTY_CONTENT_VERSION_LABEL_TEXT, @@ -1067,7 +1068,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_duration) expected.push_back( dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_2K, string("2") - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) ); } @@ -1117,14 +1118,14 @@ BOOST_AUTO_TEST_CASE (verify_invalid_picture_frame_size_in_bytes) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "pic.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "pic.mxf"), cpl).set_reel_index(0), }; for (auto i = 0; i < 24; ++i) { expected.push_back( dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_JPEG2000_CODESTREAM, string("missing marker start byte") - ).set_frame(i).set_frame_rate(24).set_cpl_id(cpl->id()) + ).set_frame(i).set_frame_rate(24).set_cpl_id(cpl->id()).set_reel_index(0) ); } @@ -1132,7 +1133,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_picture_frame_size_in_bytes) expected.push_back( dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_SIZE_IN_BYTES, canonical(dir / "pic.mxf") - ).set_frame(i).set_frame_rate(24).set_cpl_id(cpl->id()) + ).set_frame(i).set_frame_rate(24).set_cpl_id(cpl->id()).set_reel_index(0) ); } @@ -1165,7 +1166,7 @@ BOOST_AUTO_TEST_CASE (verify_nearly_invalid_picture_frame_size_in_bytes) auto cpl = dcp_from_frame (oversized_frame, dir); vector<dcp::VerificationNote> expected = { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "pic.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "pic.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), @@ -1178,7 +1179,7 @@ BOOST_AUTO_TEST_CASE (verify_nearly_invalid_picture_frame_size_in_bytes) expected.push_back( dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_JPEG2000_CODESTREAM, string("missing marker start byte") - ).set_frame(i).set_frame_rate(24).set_cpl_id(cpl->id()) + ).set_frame(i).set_frame_rate(24).set_cpl_id(cpl->id()).set_reel_index(0) ); } @@ -1186,7 +1187,7 @@ BOOST_AUTO_TEST_CASE (verify_nearly_invalid_picture_frame_size_in_bytes) expected.push_back( dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::NEARLY_INVALID_PICTURE_FRAME_SIZE_IN_BYTES, canonical(dir / "pic.mxf") - ).set_frame(i).set_frame_rate(24).set_cpl_id(cpl->id()) + ).set_frame(i).set_frame_rate(24).set_cpl_id(cpl->id()).set_reel_index(0) ); } @@ -1215,14 +1216,14 @@ BOOST_AUTO_TEST_CASE (verify_valid_picture_frame_size_in_bytes) { dir }, {}, { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "pic.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "pic.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "pic.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "pic.mxf"), cpl).set_reel_index(0), dcp::VerificationNote(dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get()).set_cpl_id(cpl->id()) }); } @@ -1249,7 +1250,7 @@ BOOST_AUTO_TEST_CASE (verify_valid_interop_subtitles) { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD }, dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_FONT, string{"theFontId"} - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -1275,7 +1276,7 @@ BOOST_AUTO_TEST_CASE(verify_catch_missing_font_file_with_interop_ccap) { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD }, dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_FONT, string{"theFontId"} - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -1308,17 +1309,17 @@ BOOST_AUTO_TEST_CASE (verify_invalid_interop_subtitles) { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD }, dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'Foo'"), path(), 5 - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("element 'Foo' is not allowed for content model '(SubtitleID,MovieTitle,ReelNumber,Language,LoadFont*,Font*,Subtitle*)'"), path(), 29 - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_FONT, string{"theFontId"} - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -1344,10 +1345,10 @@ BOOST_AUTO_TEST_CASE(verify_interop_subtitle_asset_with_no_subtitles) { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD }, dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE, asset->id(), boost::filesystem::canonical(asset->file().get()) - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_FONT, string{"theFontId"} - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -1374,7 +1375,7 @@ BOOST_AUTO_TEST_CASE(verify_interop_subtitle_asset_with_single_space_subtitle) { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD }, dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_FONT, string{"Arial"} - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -1404,10 +1405,10 @@ BOOST_AUTO_TEST_CASE (verify_valid_smpte_subtitles) ).set_cpl_id(cpl->id()), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_ISSUE_DATE, string{"2021-04-14T13:19:14.000+02:00"} - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INCORRECT_SUBTITLE_NAMESPACE_COUNT, asset->id() - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), }); } @@ -1436,26 +1437,26 @@ BOOST_AUTO_TEST_CASE (verify_invalid_smpte_subtitles) ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'Foo'"), path(), 2 - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("element 'Foo' is not allowed for content model '(Id,ContentTitleText,AnnotationText?,IssueDate,ReelNumber?,Language?,EditRate,TimeCodeRate,StartTime?,DisplayType?,LoadFont*,SubtitleList)'"), path(), 2 - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(dir / "subs.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get() ).set_cpl_id(cpl->id()), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_ISSUE_DATE, string{"2020-05-09T00:29:21.000+02:00"} - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INCORRECT_SUBTITLE_NAMESPACE_COUNT, asset->id() - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -1487,16 +1488,16 @@ BOOST_AUTO_TEST_CASE (verify_empty_text_node_in_subtitles) ).set_cpl_id(cpl->id()), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE, canonical(dir / "subs.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get() ).set_cpl_id(cpl->id()), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_ISSUE_DATE, string{"2021-08-09T18:34:46.000+02:00"} - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INCORRECT_SUBTITLE_NAMESPACE_COUNT, asset->id() - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -1523,7 +1524,7 @@ BOOST_AUTO_TEST_CASE (verify_empty_text_node_in_subtitles_with_child_nodes) { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD }, dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_FONT, string{"font0"} - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -1549,14 +1550,14 @@ BOOST_AUTO_TEST_CASE (verify_empty_text_node_in_subtitles_with_empty_child_nodes ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE, asset->id(), boost::filesystem::canonical(asset->file().get()) - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD }, dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::EMPTY_TEXT ).set_cpl_id(cpl->id()), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_FONT, string{"font0"} - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -1664,7 +1665,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_cpl_metadata_bad_tag) { dir }, {}, { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "pic.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "pic.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), dcp::VerificationNote( @@ -1676,7 +1677,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_cpl_metadata_bad_tag) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "pic.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "pic.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, string("no declaration found for element 'meta:MainSoundXConfiguration'"), canonical(cpl->file().get()), 50 ).set_cpl_id(cpl->id()), @@ -1758,10 +1759,10 @@ BOOST_AUTO_TEST_CASE (verify_invalid_language1) ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_LANGUAGE, string("badlang") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_LANGUAGE, string("wrong-andbad") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get() ).set_cpl_id(cpl->id()) @@ -1794,10 +1795,10 @@ BOOST_AUTO_TEST_CASE (verify_invalid_language2) ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_LANGUAGE, string("badlang") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_LANGUAGE, string("wrong-andbad") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get() ).set_cpl_id(cpl->id()) @@ -1841,7 +1842,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_language3) { dir }, {}, { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "videofoo.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "videofoo.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), @@ -1854,7 +1855,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_language3) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "videofoo.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "videofoo.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_LANGUAGE, string("this-is-wrong") ).set_cpl_id(cpl->id()), @@ -1866,7 +1867,7 @@ BOOST_AUTO_TEST_CASE (verify_invalid_language3) ).set_cpl_id(cpl->id()), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_LANGUAGE, string("frobozz") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -1949,8 +1950,8 @@ check_picture_size_ok (int width, int height, int frame_rate, bool three_d) dcp::String::compose("%1x%2", width, height), cpl->file().get() ).set_cpl_id(cpl->id()), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl) + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0) }; check_verify_result(notes, expected); } @@ -1978,11 +1979,11 @@ check_picture_size_bad_frame_size (int width, int height, int frame_rate, bool t dcp::String::compose("%1x%2", width, height), cpl->file().get() ).set_cpl_id(cpl->id()), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_SIZE_IN_PIXELS, dcp::String::compose("%1x%2", width, height), canonical(dir / "video.mxf") - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }; check_verify_result(notes, expected); } @@ -2010,14 +2011,14 @@ check_picture_size_bad_2k_frame_rate (int width, int height, int frame_rate, boo dcp::String::compose("%1x%2", width, height), cpl->file().get() ).set_cpl_id(cpl->id()), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE, dcp::String::compose("%1/1", frame_rate * (three_d ? 2 : 1)) - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_2K, dcp::String::compose("%1/1", frame_rate), canonical(dir / "video.mxf") - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }; check_verify_result(notes, expected); @@ -2046,11 +2047,11 @@ check_picture_size_bad_4k_frame_rate (int width, int height, int frame_rate, boo dcp::String::compose("%1x%2", width, height), cpl->file().get() ).set_cpl_id(cpl->id()), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_4K, dcp::String::compose("%1/1", frame_rate), canonical(dir / "video.mxf") - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }; check_verify_result(notes, expected); @@ -2117,8 +2118,8 @@ BOOST_AUTO_TEST_CASE (verify_picture_size) string{"3996x2160"}, cpl->file().get() ).set_cpl_id(cpl->id()), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_ASSET_RESOLUTION_FOR_3D }, }; } @@ -2184,13 +2185,13 @@ BOOST_AUTO_TEST_CASE (verify_invalid_closed_caption_xml_size_in_bytes) ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(dir / "subs.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_CLOSED_CAPTION_XML_SIZE_IN_BYTES, string("419371"), canonical(dir / "subs.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME ).set_cpl_id(cpl->id()), @@ -2241,16 +2242,16 @@ verify_timed_text_asset_too_large (string name) ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_TIMED_TEXT_SIZE_IN_BYTES, string("121698284"), canonical(dir / "subs.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES, "121634816", canonical(dir / "subs.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(dir / "subs.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME ).set_cpl_id(cpl->id()), @@ -2323,11 +2324,11 @@ BOOST_AUTO_TEST_CASE (verify_missing_subtitle_language) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE, canonical(dir / "subs.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME ).set_cpl_id(cpl->id()) @@ -2368,8 +2369,8 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_subtitle_languages) { path }, {}, { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video0.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video1.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video0.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video1.mxf"), cpl).set_reel_index(1), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), @@ -2382,17 +2383,17 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_subtitle_languages) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video0.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video1.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video0.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video1.mxf"), cpl).set_reel_index(1), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(path / "subs1.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(path / "subs2.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(1), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_SUBTITLE_LANGUAGES - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(1) }); } @@ -2442,16 +2443,16 @@ BOOST_AUTO_TEST_CASE (verify_multiple_closed_caption_languages_allowed) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video0.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video0.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video1.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video0.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video1.mxf"), cpl).set_reel_index(1), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video0.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video1.mxf"), cpl).set_reel_index(1), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(path / "subs1.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(path / "subs2.mxf") - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(1), }); } @@ -2499,7 +2500,7 @@ BOOST_AUTO_TEST_CASE (verify_missing_subtitle_start_time) { dir }, {}, { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), @@ -2512,10 +2513,10 @@ BOOST_AUTO_TEST_CASE (verify_missing_subtitle_start_time) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_START_TIME, canonical(dir / "subs.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME ).set_cpl_id(cpl->id()) @@ -2573,17 +2574,17 @@ BOOST_AUTO_TEST_CASE (verify_invalid_subtitle_start_time) ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, string{"1998x1080"}, cpl->file().get() ).set_cpl_id(cpl->id()), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_SUBTITLE_START_TIME, canonical(dir / "subs.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME ).set_cpl_id(cpl->id()) @@ -2929,7 +2930,7 @@ BOOST_AUTO_TEST_CASE (verify_subtitle_overlapping_reel_boundary) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_TIMED_TEXT_DURATION , "72 96", boost::filesystem::canonical(asset->file().get()) - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME ).set_cpl_id(cpl->id()), @@ -3497,12 +3498,12 @@ BOOST_AUTO_TEST_CASE (verify_invalid_sound_frame_rate) ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "videofoo.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "videofoo.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "videofoo.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "videofoo.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_SOUND_FRAME_RATE, string("96000"), canonical(dir / "audiofoo.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get() ).set_cpl_id(cpl->id()) @@ -3533,7 +3534,7 @@ BOOST_AUTO_TEST_CASE (verify_missing_cpl_annotation_text) {}, { ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -3542,7 +3543,7 @@ BOOST_AUTO_TEST_CASE (verify_missing_cpl_annotation_text) ).set_cpl_id(cpl->id()), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_ANNOTATION_TEXT, canonical(cpl->file().get()) @@ -3578,8 +3579,8 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_cpl_annotation_text) ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -3627,13 +3628,13 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_asset_duration) ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_ASSET_DURATION - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, canonical(cpl->file().get()) ).set_cpl_id(cpl->id()) @@ -3712,11 +3713,11 @@ BOOST_AUTO_TEST_CASE (verify_missing_main_subtitle_from_some_reels) ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_MAIN_SUBTITLE_FROM_SOME_REELS ).set_cpl_id(cpl->id()), @@ -3739,11 +3740,11 @@ BOOST_AUTO_TEST_CASE (verify_missing_main_subtitle_from_some_reels) ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get() ).set_cpl_id(cpl->id()) @@ -3762,11 +3763,11 @@ BOOST_AUTO_TEST_CASE (verify_missing_main_subtitle_from_some_reels) ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get() ).set_cpl_id(cpl->id()) @@ -3840,12 +3841,12 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_closed_caption_asset_counts) {}, { ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), @@ -3866,14 +3867,14 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_closed_caption_asset_counts) {}, { ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get() @@ -3889,14 +3890,14 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_closed_caption_asset_counts) {}, { ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video2.mxf"), cpl).set_reel_index(1), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get() @@ -3946,15 +3947,15 @@ verify_text_entry_point_check(dcp::TextType type, path dir, dcp::VerificationNot { ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, code, subs->id() - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->file().get() ).set_cpl_id(cpl->id()) @@ -4038,15 +4039,15 @@ BOOST_AUTO_TEST_CASE (verify_missing_hash) ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, cpl->file().get() ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_HASH, asset_id - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -4073,7 +4074,7 @@ verify_markers_test ( note.set_cpl_id(cpl->id()); } - test_notes.push_back(ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl)); + test_notes.push_back(ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0)); test_notes.push_back(ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl)); test_notes.push_back(ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl)); test_notes.push_back(ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl)); @@ -4088,7 +4089,7 @@ verify_markers_test ( test_notes.push_back(ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"feature"}, cpl)); test_notes.push_back(ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl)); test_notes.push_back(ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl)); - test_notes.push_back(ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl)); + test_notes.push_back(ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0)); check_verify_result({dir}, {}, test_notes); } @@ -4190,7 +4191,7 @@ BOOST_AUTO_TEST_CASE (verify_missing_cpl_metadata_version_number) {dir}, {}, { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), @@ -4203,7 +4204,7 @@ BOOST_AUTO_TEST_CASE (verify_missing_cpl_metadata_version_number) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA_VERSION_NUMBER, cpl->file().get() ).set_cpl_id(cpl->id()) @@ -4235,8 +4236,8 @@ BOOST_AUTO_TEST_CASE (verify_missing_extension_metadata1) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -4277,8 +4278,8 @@ BOOST_AUTO_TEST_CASE (verify_missing_extension_metadata2) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -4320,8 +4321,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata3) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -4364,8 +4365,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_extension_metadata1) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -4406,8 +4407,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_extension_metadata2) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -4449,8 +4450,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata6) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -4497,8 +4498,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata7) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -4540,8 +4541,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata8) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -4588,8 +4589,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_xml_cpl_extension_metadata9) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -4636,11 +4637,11 @@ BOOST_AUTO_TEST_CASE (verify_unsigned_cpl_with_encrypted_content) {}, { ok(dcp::VerificationNote::Code::ALL_ENCRYPTED, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"feature"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(cpl_path) ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()), @@ -4691,11 +4692,11 @@ BOOST_AUTO_TEST_CASE (verify_unsigned_pkl_with_encrypted_content) {}, { ok(dcp::VerificationNote::Code::ALL_ENCRYPTED, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"feature"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_PKL_ANNOTATION_TEXT_WITH_CPL, encryption_test_pkl_id(), canonical(pkl) @@ -4741,7 +4742,7 @@ BOOST_AUTO_TEST_CASE (verify_unsigned_pkl_with_unencrypted_content) {dir}, {}, { - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), @@ -4754,7 +4755,7 @@ BOOST_AUTO_TEST_CASE (verify_unsigned_pkl_with_unencrypted_content) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0) }); } @@ -4833,8 +4834,8 @@ BOOST_AUTO_TEST_CASE (verify_partially_encrypted) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::PARTIALLY_ENCRYPTED ).set_cpl_id(cpl->id()) @@ -4945,10 +4946,10 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_subtitle_resource_id) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_TIMED_TEXT_DURATION , "240 0", boost::filesystem::canonical(subs_mxf) - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_TIMED_TEXT_RESOURCE_ID - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME ).set_cpl_id(cpl->id()), @@ -5025,10 +5026,10 @@ BOOST_AUTO_TEST_CASE (verify_incorrect_timed_text_id) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISMATCHED_TIMED_TEXT_DURATION , "240 0", boost::filesystem::canonical(subs_mxf) - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INCORRECT_TIMED_TEXT_ASSET_ID - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME ).set_cpl_id(cpl->id()), @@ -5037,7 +5038,7 @@ BOOST_AUTO_TEST_CASE (verify_incorrect_timed_text_id) ).set_cpl_id(cpl->id()), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_ISSUE_DATE, string{"2018-10-02T12:25:14+02:00"} - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0), }); } @@ -5055,8 +5056,8 @@ BOOST_AUTO_TEST_CASE (verify_threed_marked_as_twod) {}, { ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "0d6f57e6-adac-4e1d-bfbe-d162bf13e2cd_j2c.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "0d6f57e6-adac-4e1d-bfbe-d162bf13e2cd_j2c.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "0d6f57e6-adac-4e1d-bfbe-d162bf13e2cd_j2c.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "0d6f57e6-adac-4e1d-bfbe-d162bf13e2cd_j2c.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), @@ -5098,8 +5099,8 @@ BOOST_AUTO_TEST_CASE (verify_unexpected_things_in_main_markers) { ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -5114,10 +5115,10 @@ BOOST_AUTO_TEST_CASE (verify_unexpected_things_in_main_markers) ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::UNEXPECTED_ENTRY_POINT - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::UNEXPECTED_DURATION - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0), }); } @@ -5152,8 +5153,8 @@ BOOST_AUTO_TEST_CASE(verify_invalid_content_kind) ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(find_cpl(dir)) ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()), @@ -5189,8 +5190,8 @@ BOOST_AUTO_TEST_CASE(verify_valid_content_kind) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -5224,6 +5225,7 @@ BOOST_AUTO_TEST_CASE(verify_invalid_main_picture_active_area_1) dcp::PKL pkl(find_pkl(dir)); auto cpl = std::make_shared<dcp::CPL>(find_cpl(dir)); + auto const picture_id = cpl->reels()[0]->main_picture()->asset_ref().id(); check_verify_result( { dir }, @@ -5234,8 +5236,8 @@ BOOST_AUTO_TEST_CASE(verify_invalid_main_picture_active_area_1) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(find_cpl(dir)) ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()), @@ -5244,7 +5246,7 @@ BOOST_AUTO_TEST_CASE(verify_invalid_main_picture_active_area_1) ).set_cpl_id(cpl->id()), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, "height 4080 is bigger than the asset height 1080", canonical(find_cpl(dir)) - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_id(picture_id).set_reel_index(0), }); } @@ -5269,6 +5271,7 @@ BOOST_AUTO_TEST_CASE(verify_invalid_main_picture_active_area_2) dcp::PKL pkl(find_pkl(dir)); auto cpl = std::make_shared<dcp::CPL>(find_cpl(dir)); + auto const picture_id = cpl->reels()[0]->main_picture()->asset_ref().id(); check_verify_result( { dir }, @@ -5279,8 +5282,8 @@ BOOST_AUTO_TEST_CASE(verify_invalid_main_picture_active_area_2) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, canonical(find_cpl(dir)) ).set_cpl_id(cpl->id()).set_reference_hash(calc.old_hash()).set_calculated_hash(calc.new_hash()), @@ -5289,10 +5292,10 @@ BOOST_AUTO_TEST_CASE(verify_invalid_main_picture_active_area_2) ).set_cpl_id(cpl->id()), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, "width 9900 is bigger than the asset width 1998", canonical(find_cpl(dir)) - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_id(picture_id).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, "height 5125 is bigger than the asset height 1080", canonical(find_cpl(dir)) - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_id(picture_id).set_reel_index(0), }); } @@ -5458,14 +5461,14 @@ BOOST_AUTO_TEST_CASE(verify_mismatched_sound_channel_counts) ).set_cpl_id(cpl->id()), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video2.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video2.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video2.mxf"), cpl).set_reel_index(1), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video2.mxf"), cpl).set_reel_index(1), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_SOUND_CHANNEL_COUNTS, canonical(find_file(path, "audio2")) - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(1), }); } @@ -5521,8 +5524,8 @@ BOOST_AUTO_TEST_CASE(verify_invalid_main_sound_configuration) ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video1.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video1.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(path / "video1.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::OK, dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, @@ -5598,7 +5601,7 @@ BOOST_AUTO_TEST_CASE(verify_invalid_tile_part_size) string{"1998x1080"}, cpl->file().get() ).set_cpl_id(cpl->id()), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(path / "video.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), @@ -5616,7 +5619,7 @@ BOOST_AUTO_TEST_CASE(verify_invalid_tile_part_size) expected.push_back( dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_PICTURE_FRAME_SIZE_IN_BYTES, canonical(path / "video.mxf") - ).set_frame(frame).set_frame_rate(24).set_cpl_id(cpl->id()) + ).set_frame(frame).set_frame_rate(24).set_cpl_id(cpl->id()).set_reel_index(0) ); } @@ -5631,7 +5634,7 @@ BOOST_AUTO_TEST_CASE(verify_invalid_tile_part_size) expected.push_back( dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_JPEG2000_TILE_PART_SIZE - ).set_frame(frame).set_frame_rate(24).set_component(component).set_size(component_sizes[component]).set_cpl_id(cpl->id()) + ).set_frame(frame).set_frame_rate(24).set_component(component).set_size(component_sizes[component]).set_cpl_id(cpl->id()).set_reel_index(0) ); } } @@ -5657,8 +5660,8 @@ BOOST_AUTO_TEST_CASE(verify_too_many_subtitle_namespaces) ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"feature"}, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"Dcp_FTR-1_F_XX-XX_MOS_2K_20230407_SMPTE_OV"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "j2c_42b34dcd-caa5-4c7b-aa0f-66a590947ba1.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "j2c_42b34dcd-caa5-4c7b-aa0f-66a590947ba1.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "j2c_42b34dcd-caa5-4c7b-aa0f-66a590947ba1.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "j2c_42b34dcd-caa5-4c7b-aa0f-66a590947ba1.mxf"), cpl).set_reel_index(0), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_FFEC_IN_FEATURE @@ -5670,14 +5673,13 @@ BOOST_AUTO_TEST_CASE(verify_too_many_subtitle_namespaces) dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME ).set_cpl_id(cpl->id()), dcp::VerificationNote( - dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE, canonical(find_file(dir, "sub_")) - ).set_cpl_id(cpl->id()), + dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE, canonical(find_file(dir, "sub_"))).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, canonical(find_file(dir, "cpl_")) ).set_cpl_id(cpl->id()), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INCORRECT_SUBTITLE_NAMESPACE_COUNT, std::string{"315de731-1173-484c-9a35-bdacf5a9d99d"} - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), }); } @@ -5766,9 +5768,9 @@ BOOST_AUTO_TEST_CASE(verify_missing_load_font) ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), - dcp::VerificationNote(dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_LOAD_FONT).set_id(reel_subs->id()).set_cpl_id(cpl->id()) + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + dcp::VerificationNote(dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_LOAD_FONT).set_id(reel_subs->id()).set_cpl_id(cpl->id()).set_reel_index(0) }); } @@ -5828,18 +5830,18 @@ BOOST_AUTO_TEST_CASE(verify_cpl_content_version_label_text_empty) {}, { dcp::VerificationNote( - dcp::VerificationNote::Type::OK, - dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, - string{"1998x1080"}, - cpl->file().get() - ).set_cpl_id(cpl->id()), + dcp::VerificationNote::Type::OK, + dcp::VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, + string{"1998x1080"}, + cpl->file().get() + ).set_cpl_id(cpl->id()), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), ok(dcp::VerificationNote::Code::MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL, cpl), ok(dcp::VerificationNote::Code::MATCHING_CPL_HASHES, cpl), ok(dcp::VerificationNote::Code::VALID_CONTENT_KIND, string{"trailer"}, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"A Test DCP"}, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote(dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::EMPTY_CONTENT_VERSION_LABEL_TEXT, cpl->file().get()).set_cpl_id(cpl->id()) }); } @@ -5899,13 +5901,13 @@ BOOST_AUTO_TEST_CASE(verify_encrypted_smpte_dcp_without_kdm) ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISSED_CHECK_OF_ENCRYPTED - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISSED_CHECK_OF_ENCRYPTED - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::MISSED_CHECK_OF_ENCRYPTED - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, canonical(cpl_file) ).set_cpl_id(cpl->id()), @@ -5926,17 +5928,17 @@ BOOST_AUTO_TEST_CASE(verify_invalid_sound_bit_depth) ok(dcp::VerificationNote::Code::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl), ok(dcp::VerificationNote::Code::VALID_CPL_ANNOTATION_TEXT, string{"204794_Kitex_Scoobee_Day_Bags_30_Sec_Malayalam_220524_RADQR"}, cpl), ok(dcp::VerificationNote::Code::NONE_ENCRYPTED, cpl), - ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "Video.mxf"), cpl), - ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "Video.mxf"), cpl), + ok(dcp::VerificationNote::Code::CORRECT_PICTURE_HASH, canonical(dir / "Video.mxf"), cpl).set_reel_index(0), + ok(dcp::VerificationNote::Code::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "Video.mxf"), cpl).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_SOUND_BIT_DEPTH, "16", canonical(dir / "Audio.mxf") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_HASH, string("fd4796c2-9c84-454c-91f4-13ad127cea8a") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_HASH, string("9d5e8bc4-676b-4306-a86d-03f70c73b457") - ).set_cpl_id(cpl->id()), + ).set_cpl_id(cpl->id()).set_reel_index(0), dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, canonical(cpl->file().get()) ).set_cpl_id(cpl->id()), @@ -5952,7 +5954,7 @@ BOOST_AUTO_TEST_CASE(verify_invalid_sound_bit_depth) notes.push_back( dcp::VerificationNote( dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_JPEG2000_GUARD_BITS_FOR_2K, string("2") - ).set_cpl_id(cpl->id()) + ).set_cpl_id(cpl->id()).set_reel_index(0) ); } |
