diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-01-08 00:20:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-04-15 10:59:34 +0200 |
| commit | e0761a05398114d16ab3f51589e4df97711c6cea (patch) | |
| tree | 3839acc748d58034c4b2c54968c0df486a0088a6 /src | |
| parent | f443c3161460c1b927ec9072fdc4e76a2f156cab (diff) | |
Add OK note when release territory is valid.
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 7 | ||||
| -rw-r--r-- | src/verify.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc index 9756f9c7..d5229202 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1575,14 +1575,19 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl) if (cpl->release_territory()) { if (!cpl->release_territory_scope() || cpl->release_territory_scope().get() != "http://www.smpte-ra.org/schemas/429-16/2014/CPL-Metadata#scope/release-territory/UNM49") { auto terr = cpl->release_territory().get(); + bool valid = true; /* Must be a valid region tag, or "001" */ try { LanguageTag::RegionSubtag test(terr); } catch (...) { if (terr != "001") { context.bv21_error(VerificationNote::Code::INVALID_LANGUAGE, terr); + valid = false; } } + if (valid) { + context.ok(VerificationNote::Code::VALID_RELEASE_TERRITORY, terr); + } } } @@ -1980,6 +1985,8 @@ dcp::note_to_string (VerificationNote note) return "This DCP does not use the SMPTE standard."; case VerificationNote::Code::INVALID_LANGUAGE: return String::compose("The DCP specifies a language '%1' which does not conform to the RFC 5646 standard.", note.note().get()); + case VerificationNote::Code::VALID_RELEASE_TERRITORY: + return String::compose("Valid release territory %1.", note.note().get()); case VerificationNote::Code::INVALID_PICTURE_SIZE_IN_PIXELS: return String::compose("The size %1 of picture asset %2 is not allowed.", note.note().get(), note.file()->filename()); case VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_2K: diff --git a/src/verify.h b/src/verify.h index 339f4186..e59371b8 100644 --- a/src/verify.h +++ b/src/verify.h @@ -182,6 +182,7 @@ public: * note contains the invalid language */ INVALID_LANGUAGE, + VALID_RELEASE_TERRITORY, /** A picture asset does not have one of the required Bv2.1 sizes (in pixels) [Bv2.1_7.1] * note contains the incorrect size as "<width>x<height>" * file contains the asset filename |
