From ecb9344aedd1beac90668cba46e0f22bd7c7bd9f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 14 Jan 2021 23:38:30 +0100 Subject: Bv2.1 8.2: all parts of a reel must have the same duration. --- src/verify.cc | 14 ++++++++++++++ src/verify.h | 2 ++ 2 files changed, 16 insertions(+) (limited to 'src') diff --git a/src/verify.cc b/src/verify.cc index dc435706..a7f3f1da 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1065,6 +1065,18 @@ dcp::verify ( } } + if (dcp->standard() == dcp::SMPTE) { + boost::optional duration; + for (auto i: reel->assets()) { + if (!duration) { + duration = i->actual_duration(); + } else if (*duration != i->actual_duration()) { + notes.push_back (VerificationNote(VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISMATCHED_ASSET_DURATION, i->id())); + break; + } + } + } + if (reel->main_picture()) { /* Check reel stuff */ auto const frame_rate = reel->main_picture()->frame_rate(); @@ -1242,6 +1254,8 @@ dcp::note_to_string (dcp::VerificationNote note) return "The CPL has no tag, which is required by Bv2.1"; case dcp::VerificationNote::CPL_ANNOTATION_TEXT_DIFFERS_FROM_CONTENT_TITLE_TEXT: return "The CPL's differs from its , which Bv2.1 advises against."; + case dcp::VerificationNote::MISMATCHED_ASSET_DURATION: + return "All assets in a reel do not have the same duration, which is required by Bv2.1"; } return ""; diff --git a/src/verify.h b/src/verify.h index cab8ba4f..3b2629f9 100644 --- a/src/verify.h +++ b/src/verify.h @@ -137,6 +137,8 @@ public: MISSING_ANNOTATION_TEXT_IN_CPL, /** The is not the same as the [Bv2.1_8.1] */ CPL_ANNOTATION_TEXT_DIFFERS_FROM_CONTENT_TITLE_TEXT, + /** At least one asset in a reel does not have the same duration as the others */ + MISMATCHED_ASSET_DURATION, }; VerificationNote (Type type, Code code) -- cgit v1.2.3