summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-15 22:56:38 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:23 +0100
commit2fecea3b47ab64a8b8580b9d186d05c18ae0e29c (patch)
treeacf1969ba8f7c6be14e09aafa0801f00bc395bc7 /src
parent9a6cf0df676175022f7d0cade7919153207b7910 (diff)
Bv2.1 8.4 We must have <Hash>es
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc6
-rw-r--r--src/verify.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 01d2e786..e02c573b 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -1084,6 +1084,10 @@ dcp::verify (
if ((i->intrinsic_duration() * i->edit_rate().denominator / i->edit_rate().numerator) < 1) {
notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::INTRINSIC_DURATION_TOO_SMALL, i->id()));
}
+ auto mxf = dynamic_pointer_cast<ReelMXF>(i);
+ if (mxf && !mxf->hash()) {
+ notes.push_back ({VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_HASH, i->id()});
+ }
}
if (dcp->standard() == dcp::SMPTE) {
@@ -1304,6 +1308,8 @@ dcp::note_to_string (dcp::VerificationNote note)
return "Closed caption assets must have an <EntryPoint> tag.";
case dcp::VerificationNote::CLOSED_CAPTION_ENTRY_POINT_NON_ZERO:
return "Closed caption assets must have an <EntryPoint> of 0.";
+ case dcp::VerificationNote::MISSING_HASH:
+ return String::compose("An asset is missing a <Hash> tag: %1", note.note().get());
}
return "";
diff --git a/src/verify.h b/src/verify.h
index 917d5e53..5ba029c9 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -151,6 +151,8 @@ public:
MISSING_CLOSED_CAPTION_ENTRY_POINT,
/** Closed caption MainSubtitle <EntryPoint> must be zero Bv2.1_8.3.2 */
CLOSED_CAPTION_ENTRY_POINT_NON_ZERO,
+ /** <Hash> must be present for assets in CPLs */
+ MISSING_HASH,
};
VerificationNote (Type type, Code code)