summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-14 23:38:30 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:23 +0100
commitecb9344aedd1beac90668cba46e0f22bd7c7bd9f (patch)
tree28464363a659a61e266eacbca3daa0467c251623 /src
parent6e1558f51d4f90c0adf6b18dc8143274167e4d89 (diff)
Bv2.1 8.2: all parts of a reel must have the same duration.
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc14
-rw-r--r--src/verify.h2
2 files changed, 16 insertions, 0 deletions
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<int64_t> 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 <AnnotationText> tag, which is required by Bv2.1";
case dcp::VerificationNote::CPL_ANNOTATION_TEXT_DIFFERS_FROM_CONTENT_TITLE_TEXT:
return "The CPL's <AnnotationText> differs from its <ContentTitleText>, 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 <AnnotationText> is not the same as the <ContentTitleText> [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)