From 36310b78f8fd84554f2c87dc513bd04efe0fd69a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 18 Jan 2021 13:05:11 +0100 Subject: Bv2.1 8.6.{1.2}: CompositionMetadataAsset must exist and it must have some . --- src/verify.cc | 13 +++++++++++++ src/verify.h | 4 ++++ 2 files changed, 17 insertions(+) (limited to 'src') diff --git a/src/verify.cc b/src/verify.cc index 1cea1a0c..d5b80b9f 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1231,6 +1231,15 @@ dcp::verify ( if (result.error_length_exceeded) { notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::CLOSED_CAPTION_LINE_TOO_LONG)); } + + if (!cpl->full_content_title_text()) { + /* Since FullContentTitleText is assumed always to exist if there's a CompositionMetadataAsset we + * can use it as a proxy for CompositionMetadataAsset's existence. + */ + notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_CPL_METADATA}); + } else if (!cpl->version_number()) { + notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_CPL_METADATA_VERSION_NUMBER}); + } } } @@ -1364,6 +1373,10 @@ dcp::note_to_string (dcp::VerificationNote note) return "The FFOC marker should bet set to 1"; case dcp::VerificationNote::INCORRECT_LFOC: return "The LFOC marker should be set to 1 less than the duration of the last reel"; + case dcp::VerificationNote::MISSING_CPL_METADATA: + return "There should be a tag"; + case dcp::VerificationNote::MISSING_CPL_METADATA_VERSION_NUMBER: + return "The CPL metadata must contain a "; } return ""; diff --git a/src/verify.h b/src/verify.h index 05a49417..65095a8f 100644 --- a/src/verify.h +++ b/src/verify.h @@ -165,6 +165,10 @@ public: INCORRECT_FFOC, /** The LFOC should be the last frame in the reel */ INCORRECT_LFOC, + /** There must be a */ + MISSING_CPL_METADATA, + /** CPL metadata should contain of 1, at least */ + MISSING_CPL_METADATA_VERSION_NUMBER, }; VerificationNote (Type type, Code code) -- cgit v1.2.3