Add OK note when <ContentKind> is valid.
authorCarl Hetherington <cth@carlh.net>
Sun, 7 Jan 2024 23:43:10 +0000 (00:43 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 14 Apr 2024 15:22:08 +0000 (17:22 +0200)
src/verify.cc
src/verify.h

index 19a0a2778c4fd72d993bc19acc40402f2a32b087..1178d4552f04c952fcd6c2e17082a3e061c112c3 100644 (file)
@@ -1569,6 +1569,8 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl)
                auto iter = std::find_if(all.begin(), all.end(), [name](ContentKind const& k) { return !k.scope() && k.name() == name; });
                if (iter == all.end()) {
                        context.error(VerificationNote::Code::INVALID_CONTENT_KIND, cpl->content_kind().name());
+               } else {
+                       context.ok(VerificationNote::Code::VALID_CONTENT_KIND, cpl->content_kind().name());
                }
        }
 
@@ -2159,6 +2161,8 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str
                return process_string("There is an <Duration> node inside a <MainMarkers>.");
        case VerificationNote::Code::INVALID_CONTENT_KIND:
                return compose("<ContentKind> has an invalid value %1.", note.note().get());
+       case VerificationNote::Code::VALID_CONTENT_KIND:
+               return compose("Valid <ContentKind> %1.", note.note().get());
        case VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA:
                return compose("<MainPictureActiveaArea> has an invalid value: %1", note.note().get());
        case VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA:
index d0b1979ccfc76af8813a0a8d7b28de2262f99fdd..e5110065b087ed690a449b785790879fed550b43 100644 (file)
@@ -420,6 +420,7 @@ public:
                UNEXPECTED_DURATION,
                /** A <ContentKind> has been specified with either no scope or the SMPTE 429-7 scope, but which is not one of those allowed */
                INVALID_CONTENT_KIND,
+               VALID_CONTENT_KIND,
                /** Either the width or height of a <MainPictureActiveArea> in a CPL is either not an even number, or bigger than the corresponding asset dimension.
                 *  note contains details of what is wrong
                 *  file contains the CPL filename