summaryrefslogtreecommitdiff
path: root/src/verify.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-08 02:07:05 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-08 02:07:05 +0200
commit3a328b69a4770687fa16a113f33882217a59a142 (patch)
tree960fa222675068d0877d2c6ea4151dee08b20fe0 /src/verify.cc
parent854bc0a513611a402b2d693d9d17da3420fd10b4 (diff)
Verify that SMPTE subtitle IDs are handled properly (DoM #1962).
Diffstat (limited to 'src/verify.cc')
-rw-r--r--src/verify.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 382a67ba..35ec69f8 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -686,6 +686,15 @@ verify_smpte_subtitle_asset (
notes.push_back ({ VerificationNote::Type::BV21_ERROR, VerificationNote::Code::MISMATCHED_SUBTITLE_LANGUAGES });
}
}
+
+ DCP_ASSERT (asset->resource_id());
+ if (asset->resource_id().get() != asset->xml_id()) {
+ notes.push_back ({ VerificationNote::Type::BV21_ERROR, VerificationNote::Code::MISMATCHED_TIMED_TEXT_RESOURCE_ID });
+ }
+
+ if (asset->id() == asset->resource_id().get() || asset->id() == asset->xml_id()) {
+ notes.push_back ({ VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INCORRECT_TIMED_TEXT_ASSET_ID });
+ }
}
@@ -1565,6 +1574,10 @@ dcp::note_to_string (VerificationNote note)
return String::compose("The JPEG2000 codestream has %1 tile parts in a 4K image instead of 6.", note.note().get());
case VerificationNote::Code::MISSING_JPEG200_TLM_MARKER:
return "No TLM marker was found in a JPEG2000 codestream.";
+ case VerificationNote::Code::MISMATCHED_TIMED_TEXT_RESOURCE_ID:
+ return "The Resource ID in a timed text MXF did not match the ID of the contained XML.";
+ case VerificationNote::Code::INCORRECT_TIMED_TEXT_ASSET_ID:
+ return "The Asset ID in a timed text MXF is the same as the Resource ID or that of the contained XML.";
}
return "";