diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-03-30 22:42:37 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-15 17:13:38 +0100 |
| commit | 5d4e90e80ed7552dfc96e967b5d96a5eb5a72c9f (patch) | |
| tree | bbd161c726666a8d2476fd365708f96518e6e356 | |
| parent | a0620ecb2074364dc79db66f456913da8c61fb1d (diff) | |
Use new release_territory for VALID_RELEASE_TERRITORY.
| -rw-r--r-- | src/verify.cc | 7 | ||||
| -rw-r--r-- | src/verify.h | 12 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/verify.cc b/src/verify.cc index 50fa2abe..fd5c45ec 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1597,7 +1597,7 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl) } } if (valid) { - context.ok(VerificationNote::Code::VALID_RELEASE_TERRITORY, terr); + context.add_note(VN(VN::Type::OK, VN::Code::VALID_RELEASE_TERRITORY).set_release_territory(terr)); } } } @@ -2031,7 +2031,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str case VerificationNote::Code::INVALID_LANGUAGE: return compose("The DCP specifies a language '%1' which does not conform to the RFC 5646 standard.", note.language().get()); case VerificationNote::Code::VALID_RELEASE_TERRITORY: - return compose("Valid release territory %1.", note.note().get()); + return compose("Valid release territory %1.", note.release_territory().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: @@ -2268,7 +2268,8 @@ dcp::operator== (dcp::VerificationNote const& a, dcp::VerificationNote const& b) a.language() == b.language() && a.cpl_annotation_text() == b.cpl_annotation_text() && a.guard_bits() == b.guard_bits() && - a.issue_date() == b.issue_date(); + a.issue_date() == b.issue_date() && + a.release_territory() == b.release_territory(); } diff --git a/src/verify.h b/src/verify.h index b88cf578..a7a62bb9 100644 --- a/src/verify.h +++ b/src/verify.h @@ -617,7 +617,8 @@ private: CONTENT_KIND, CPL_ANNOTATION_TEXT, GUARD_BITS, - ISSUE_DATE + ISSUE_DATE, + RELEASE_TERRITORY }; template <class T> @@ -828,6 +829,15 @@ public: return data<std::string>(Data::ISSUE_DATE); } + VerificationNote& set_release_territory(std::string release_territory) { + _data[Data::RELEASE_TERRITORY] = release_territory; + return *this; + } + + boost::optional<std::string> release_territory() const { + return data<std::string>(Data::RELEASE_TERRITORY); + } + private: Type _type; Code _code; |
