diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-04-08 02:07:05 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-04-08 02:07:05 +0200 |
| commit | 3a328b69a4770687fa16a113f33882217a59a142 (patch) | |
| tree | 960fa222675068d0877d2c6ea4151dee08b20fe0 /src | |
| parent | 854bc0a513611a402b2d693d9d17da3420fd10b4 (diff) | |
Verify that SMPTE subtitle IDs are handled properly (DoM #1962).
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 13 | ||||
| -rw-r--r-- | src/verify.h | 4 |
2 files changed, 17 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 ""; diff --git a/src/verify.h b/src/verify.h index f14382c5..0a422801 100644 --- a/src/verify.h +++ b/src/verify.h @@ -366,6 +366,10 @@ public: INVALID_JPEG2000_TILE_PARTS_FOR_4K, /** No TLM marker was found [Bv2.1_10.2.1] */ MISSING_JPEG200_TLM_MARKER, + /** The MXF ResourceID of a timed text resource was not the same as that of the contained XML essence [Bv2.1_10.4.3] */ + MISMATCHED_TIMED_TEXT_RESOURCE_ID, + /** The AssetID of a timed text MXF is the same as its ResourceID or that of the contained XML essence [Bv2.1_10.4.2] */ + INCORRECT_TIMED_TEXT_ASSET_ID, }; VerificationNote (Type type, Code code) |
