summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-12-14 23:23:41 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:22 +0100
commitd4519ea7898ccb878a297126bbb45c7b65cccd08 (patch)
tree13c623d68e03655dc9d5cfbe5c1706a01024651c /src
parent3924dd859ad3de1d4a207d04e841f699bd27490a (diff)
Bv2.1 7.2.2: Check that subtitle Language tags are present.
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc8
-rw-r--r--src/verify.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 428c737f..9dc87eec 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -658,6 +658,12 @@ verify_subtitle_asset (
if (smpte) {
if (smpte->language()) {
verify_language_tag (*smpte->language(), notes);
+ } else {
+ notes.push_back (
+ VerificationNote(
+ VerificationNote::VERIFY_BV21_ERROR, VerificationNote::MISSING_SUBTITLE_LANGUAGE, *asset->file()
+ )
+ );
}
if (boost::filesystem::file_size(*asset->file()) > 115 * 1024 * 1024) {
notes.push_back (
@@ -883,6 +889,8 @@ dcp::note_to_string (dcp::VerificationNote note)
return String::compose("The total size of the timed text asset %1 is larger than the 115MB maximum required by Bv2.1", note.file()->filename());
case dcp::VerificationNote::TIMED_TEXT_FONTS_TOO_LARGE_IN_BYTES:
return String::compose("The total size of the fonts in timed text asset %1 is larger than the 10MB maximum required by Bv2.1", note.file()->filename());
+ case dcp::VerificationNote::MISSING_SUBTITLE_LANGUAGE:
+ return String::compose("The XML for a SMPTE subtitle asset has no <Language> tag, which is required by Bv2.1", note.file()->filename());
}
return "";
diff --git a/src/verify.h b/src/verify.h
index c30718eb..5a120e10 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -108,6 +108,8 @@ public:
TIMED_TEXT_ASSET_TOO_LARGE_IN_BYTES,
/** The total size of all a timed text asset's fonts is larger than 10MB [Bv2.1_7.2.1] */
TIMED_TEXT_FONTS_TOO_LARGE_IN_BYTES,
+ /** Some SMPTE subtitle XML has no <Language> tag [Bv2.1_7.2.2] */
+ MISSING_SUBTITLE_LANGUAGE,
};
VerificationNote (Type type, Code code)