summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-04-01 22:42:50 +0200
committerCarl Hetherington <cth@carlh.net>2025-12-15 17:13:38 +0100
commitda2837520e0d1f0d4d5aad04ee5bf11de303f6ed (patch)
treef3f9f3fbfc22f81d527d077fb6d07271778b7a94 /src
parent9c173bc3638c9e41266a60670d375de1823eb813 (diff)
Use error for INVALID_MAIN_SOUND_CONFIGURATION.
Diffstat (limited to 'src')
-rw-r--r--src/cpl.cc3
-rw-r--r--src/verify.cc10
-rw-r--r--src/verify.h2
3 files changed, 7 insertions, 8 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index 6c367169..16ff84af 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -320,9 +320,8 @@ CPL::read_composition_metadata_asset(cxml::ConstNodePtr node, vector<dcp::Verifi
dcp::VerificationNote(
dcp::VerificationNote::Type::ERROR,
dcp::VerificationNote::Code::INVALID_MAIN_SOUND_CONFIGURATION,
- fmt::format("{} could not be parsed", _main_sound_configuration->as_string()),
*_file
- ).set_cpl_id(_id)
+ ).set_cpl_id(_id).set_error(fmt::format("{} could not be parsed", _main_sound_configuration->as_string()))
);
}
}
diff --git a/src/verify.cc b/src/verify.cc
index 3c6fef18..81cfd7fb 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -1735,10 +1735,10 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl)
if (context.dcp->standard() == Standard::SMPTE) {
if (auto msc = cpl->main_sound_configuration()) {
if (msc->valid() && context.audio_channels && msc->channels() != *context.audio_channels) {
- context.error(
- VerificationNote::Code::INVALID_MAIN_SOUND_CONFIGURATION,
- String::compose("MainSoundConfiguration has %1 channels but sound assets have %2", msc->channels(), *context.audio_channels),
- cpl->file().get()
+ context.add_note(
+ VN(
+ VN::Type::ERROR, VN::Code::INVALID_MAIN_SOUND_CONFIGURATION, cpl->file().get()
+ ).set_error(fmt::format("MainSoundConfiguration has {} channels but sound assets have {}", msc->channels(), *context.audio_channels))
);
}
}
@@ -2226,7 +2226,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str
case VerificationNote::Code::MISMATCHED_SOUND_CHANNEL_COUNTS:
return compose("The sound assets do not all have the same channel count; the first to differ is %1", filename());
case VerificationNote::Code::INVALID_MAIN_SOUND_CONFIGURATION:
- return compose("<MainSoundConfiguration> has an invalid value: %1", note.note().get());
+ return compose("<MainSoundConfiguration> has an invalid value: %1", note.error().get());
case VerificationNote::Code::MISSING_FONT:
return compose("The font file for font ID \"%1\" was not found, or was not referred to in the ASSETMAP.", note.load_font_id().get());
case VerificationNote::Code::INVALID_JPEG2000_TILE_PART_SIZE:
diff --git a/src/verify.h b/src/verify.h
index 08f190b1..2c61771b 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -500,7 +500,7 @@ public:
MISMATCHED_SOUND_CHANNEL_COUNTS,
/** The CPL contains a _<MainSoundConfiguration>_ tag which does not describe the number of
* channels in the audio assets, or which is in some way badly formatted.
- * note contains details of what is wrong
+ * error contains details of what is wrong
* file contains the CPL filename
* cpl_id contains the CPL ID
*/