summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-31 22:28:41 +0200
committerCarl Hetherington <cth@carlh.net>2026-04-01 23:43:00 +0200
commitfe938d4dd52ab41be4cdd441d5d4289deae6190d (patch)
treebf0cc0e3b28a947c336a91f3c4e64341959561d1 /src
parentbce04bc8feda6990157536b455fcdafcb3588ab4 (diff)
INVALID_MAIN_SOUND_CONFIGURATION: note -> error.
Diffstat (limited to 'src')
-rw-r--r--src/cpl.cc3
-rw-r--r--src/verify.cc9
-rw-r--r--src/verify.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index 27481939..0bc333c2 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -328,9 +328,8 @@ CPL::read_composition_metadata_asset(cxml::ConstNodePtr node, vector<dcp::Verifi
notes->push_back(
dcp::VerificationNote(
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 4cb21d31..bc3adea0 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -1700,9 +1700,10 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl)
if (auto msc = cpl->main_sound_configuration()) {
if (msc->valid() && context.audio_channels && msc->channels() != *context.audio_channels) {
context.add_note(
- 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()
+ VerificationNote(
+ VerificationNote::Code::INVALID_MAIN_SOUND_CONFIGURATION,
+ cpl->file().get()
+ ).set_error(fmt::format("MainSoundConfiguration has {} channels but sound assets have {}", msc->channels(), *context.audio_channels))
);
}
}
@@ -2189,7 +2190,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());
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.note().get());
case VerificationNote::Code::INVALID_JPEG2000_TILE_PART_SIZE:
diff --git a/src/verify.h b/src/verify.h
index 777a68de..ba485242 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -538,7 +538,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
*/