diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-01-08 00:29:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-04-15 10:59:34 +0200 |
| commit | a8d2013b99626ed08e7c80e6e58cf234b53b0c4d (patch) | |
| tree | cbefbd254036f60de9e578c4a1079202822bac62 /src | |
| parent | e0761a05398114d16ab3f51589e4df97711c6cea (diff) | |
Add OK note when main picture active area is valid.
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 12 | ||||
| -rw-r--r-- | src/verify.h | 1 |
2 files changed, 13 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: diff --git a/src/verify.h b/src/verify.h index e59371b8..24a4e34c 100644 --- a/src/verify.h +++ b/src/verify.h @@ -423,6 +423,7 @@ public: * file contains the CPL filename */ INVALID_MAIN_PICTURE_ACTIVE_AREA, + VALID_MAIN_PICTURE_ACTIVE_AREA, /** A PKL has more than one asset with the same ID * note contains the PKL ID * file contains the PKL filename |
