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") {
notes.push_back({VerificationNote::Type::BV21_ERROR, VerificationNote::Code::INVALID_LANGUAGE, terr});
+ valid = false;
}
}
+ if (valid) {
+ context.ok(VerificationNote::Code::VALID_RELEASE_TERRITORY, terr);
+ }
}
}
return "This DCP does not use the SMPTE standard.";
case VerificationNote::Code::INVALID_LANGUAGE:
return 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 compose("Valid release territory %1.", note.note().get());
case VerificationNote::Code::INVALID_PICTURE_SIZE_IN_PIXELS:
return compose("The size %1 of picture asset %2 is not allowed.", note.note().get(), filename());
case VerificationNote::Code::INVALID_PICTURE_FRAME_RATE_FOR_2K:
* 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