diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-03-30 22:27:28 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-04-01 23:43:00 +0200 |
| commit | 9e1f77e3d4c34a4f197f01570c8017309c214256 (patch) | |
| tree | e4bc1422f7300aaf73ae994662ed78c4db3786b9 /src | |
| parent | 613c7287fb3d24b34e16ff9820eabd67270bd825 (diff) | |
INVALID_MAIN_PICTURE_ACTIVE_AREA: note -> error.
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 38 | ||||
| -rw-r--r-- | src/verify.h | 2 |
2 files changed, 22 insertions, 18 deletions
diff --git a/src/verify.cc b/src/verify.cc index 40a7d44f..432d5b1f 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -1463,17 +1463,19 @@ verify_reel( if (main_picture_active_area) { if (main_picture_active_area->width > asset_size.width) { context.add_note( - VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, - String::compose("width %1 is bigger than the asset width %2", main_picture_active_area->width, asset_size.width), - context.cpl->file().get() - ); + VerificationNote( + VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, + context.cpl->file().get() + ).set_error(fmt::format("width {} is bigger than the asset width {}", main_picture_active_area->width, asset_size.width)) + ); } if (main_picture_active_area->height > asset_size.height) { context.add_note( - VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, - String::compose("height %1 is bigger than the asset height %2", main_picture_active_area->height, asset_size.height), - context.cpl->file().get() - ); + VerificationNote( + VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, + context.cpl->file().get() + ).set_error(fmt::format("height {} is bigger than the asset height {}", main_picture_active_area->height, asset_size.height)) + ); } } } @@ -1650,18 +1652,20 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl) bool active_area_ok = true; if (main_picture_active_area && (main_picture_active_area->width % 2)) { context.add_note( - 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() - ); + VerificationNote( + VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, + cpl->file().get() + ).set_error(fmt::format("width {} is not a multiple of 2", main_picture_active_area->width)) + ); active_area_ok = false; } if (main_picture_active_area && (main_picture_active_area->height % 2)) { context.add_note( - VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, - String::compose("height %1 is not a multiple of 2", main_picture_active_area->height), - cpl->file().get() - ); + VerificationNote( + VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA, + cpl->file().get() + ).set_error(fmt::format("height {} is not a multiple of 2", main_picture_active_area->height)) + ); active_area_ok = false; } @@ -2174,7 +2178,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str case VerificationNote::Code::VALID_CONTENT_KIND: return compose("Valid <ContentKind> %1.", *note.content_kind()); case VerificationNote::Code::INVALID_MAIN_PICTURE_ACTIVE_AREA: - return compose("<MainPictureActiveaArea> has an invalid value: %1", note.note().get()); + return compose("<MainPictureActiveaArea> has an invalid value: %1", *note.error()); case VerificationNote::Code::VALID_MAIN_PICTURE_ACTIVE_AREA: return compose("<MainPictureActiveaArea> %1 is valid", note.note().get()); case VerificationNote::Code::DUPLICATE_ASSET_ID_IN_PKL: diff --git a/src/verify.h b/src/verify.h index b2e8000f..4425a0c2 100644 --- a/src/verify.h +++ b/src/verify.h @@ -500,7 +500,7 @@ public: */ 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 + * error contains details of what is wrong * file contains the CPL filename * reel_index contains the reel index (starting from 0) */ |
