summaryrefslogtreecommitdiff
path: root/src/verify.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-01-08 00:29:04 +0100
committerCarl Hetherington <cth@carlh.net>2024-04-15 10:59:34 +0200
commita8d2013b99626ed08e7c80e6e58cf234b53b0c4d (patch)
treecbefbd254036f60de9e578c4a1079202822bac62 /src/verify.cc
parente0761a05398114d16ab3f51589e4df97711c6cea (diff)
Add OK note when main picture active area is valid.
Diffstat (limited to 'src/verify.cc')
-rw-r--r--src/verify.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/verify.cc b/src/verify.cc
index d5229202..430f369a 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -1655,12 +1655,14 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl)
map<Marker, Time> markers_seen;
auto const main_picture_active_area = cpl->main_picture_active_area();
+ bool active_area_ok = true;
if (main_picture_active_area && (main_picture_active_area->width % 2)) {
context.error(
VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA,
String::compose("width %1 is not a multiple of 2", main_picture_active_area->width),
cpl->file().get()
);
+ active_area_ok = false;
}
if (main_picture_active_area && (main_picture_active_area->height % 2)) {
context.error(
@@ -1668,6 +1670,14 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl)
String::compose("height %1 is not a multiple of 2", main_picture_active_area->height),
cpl->file().get()
);
+ active_area_ok = false;
+ }
+
+ if (main_picture_active_area && active_area_ok) {
+ context.ok(
+ VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA, String::compose("%1x%2", main_picture_active_area->width, main_picture_active_area->height),
+ cpl->file().get()
+ );
}
int64_t frame = 0;
@@ -2139,6 +2149,8 @@ dcp::note_to_string (VerificationNote note)
return String::compose("<ContentKind> has an invalid value %1.", note.note().get());
case VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA:
return String::compose("<MainPictureActiveaArea> has an invalid value: %1", note.note().get());
+ case VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA:
+ return String::compose("<MainPictureActiveaArea> %1 is valid", note.note().get());
case VerificationNote::Code::DUPLICATE_ASSET_ID_IN_PKL:
return String::compose("The PKL %1 has more than one asset with the same ID.", note.note().get());
case VerificationNote::Code::DUPLICATE_ASSET_ID_IN_ASSETMAP: