summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-08-11 20:51:21 +0200
committerCarl Hetherington <cth@carlh.net>2023-08-11 20:51:23 +0200
commit4dca630057509164494b65c2deeb748a51928c73 (patch)
treece8cd487fa4cd9fc1708cb009584464bc5eef0ab /src
parent7bf884ff9aa2d5dc39fe60e069f1454aaafc4d1e (diff)
Add check for empty <LabelText> in <ContentVersion>v1.8.76
We have a report of Deluxe failing a DCP because of this.
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc11
-rw-r--r--src/verify.h5
2 files changed, 16 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 8f318af9..42ee1921 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -1548,6 +1548,15 @@ verify_cpl(
}
}
+ for (auto version: cpl->content_versions()) {
+ if (version.label_text.empty()) {
+ notes.push_back(
+ dcp::VerificationNote(VerificationNote::Type::WARNING, VerificationNote::Code::EMPTY_CONTENT_VERSION_LABEL_TEXT, cpl->file().get()).set_id(cpl->id())
+ );
+ break;
+ }
+ }
+
if (dcp->standard() == Standard::SMPTE) {
if (!cpl->annotation_text()) {
notes.push_back({VerificationNote::Type::BV21_ERROR, VerificationNote::Code::MISSING_CPL_ANNOTATION_TEXT, cpl->id(), cpl->file().get()});
@@ -2091,6 +2100,8 @@ dcp::note_to_string (VerificationNote note)
return String::compose("The SMPTE subtitle asset %1 has <Text> nodes but no <LoadFont> node", note.id().get());
case VerificationNote::Code::MISMATCHED_ASSET_MAP_ID:
return String::compose("The asset with ID %1 in the asset map actually has an id of %2", note.id().get(), note.other_id().get());
+ case VerificationNote::Code::EMPTY_CONTENT_VERSION_LABEL_TEXT:
+ return String::compose("The <LabelText> in a <ContentVersion> in CPL %1 is empty", note.id().get());
}
return "";
diff --git a/src/verify.h b/src/verify.h
index 37a1fc11..fdf2d7ff 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -462,6 +462,11 @@ public:
* other_id contains the ID from the file.
*/
MISMATCHED_ASSET_MAP_ID,
+ /** The <LabelText> inside a <ContentVersion> is empty
+ * note contains the CPL ID
+ * file contains the CPL filename
+ */
+ EMPTY_CONTENT_VERSION_LABEL_TEXT,
};
VerificationNote (Type type, Code code)