summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-04-04 23:09:29 +0200
committerCarl Hetherington <cth@carlh.net>2023-04-04 23:37:44 +0200
commitef41b0c235eaa9f02203fd8438873e951bf3de07 (patch)
tree0511d4f08fee449fe12e461be349071dcce701ba /src
parent3d7d70e0cf79cf5bb68c24d830d4e08e22ca4308 (diff)
Add check for mismatch between sound asset and MainSoundConfiguration.v1.8.66
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc12
-rw-r--r--src/verify.h8
2 files changed, 19 insertions, 1 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 1cab0423..8b2b11d3 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -1571,6 +1571,16 @@ verify_cpl(
verify_text_details(cpl->reels(), notes);
if (dcp->standard() == Standard::SMPTE) {
+ if (auto msc = cpl->main_sound_configuration()) {
+ if (state.audio_channels && msc->channels() != *state.audio_channels) {
+ notes.push_back({
+ VerificationNote::Type::ERROR,
+ VerificationNote::Code::INVALID_MAIN_SOUND_CONFIGURATION,
+ String::compose("MainSoundConfiguration has %1 channels but sound assets have %2", msc->channels(), *state.audio_channels),
+ cpl->file().get()
+ });
+ }
+ }
if (have_main_subtitle && have_no_main_subtitle) {
notes.push_back({VerificationNote::Type::BV21_ERROR, VerificationNote::Code::MISSING_MAIN_SUBTITLE_FROM_SOME_REELS});
@@ -1996,6 +2006,8 @@ dcp::note_to_string (VerificationNote note)
return String::compose("<IssueDate> has an invalid value: %1", note.note().get());
case VerificationNote::Code::MISMATCHED_SOUND_CHANNEL_COUNTS:
return String::compose("The sound assets do not all have the same channel count; the first to differ is %1", note.file()->filename());
+ case VerificationNote::Code::INVALID_MAIN_SOUND_CONFIGURATION:
+ return String::compose("<MainSoundConfiguration> has an invalid value: %1", note.note().get());
}
return "";
diff --git a/src/verify.h b/src/verify.h
index d05c92eb..7696ea85 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -425,7 +425,13 @@ public:
/** The sound assets in the CPL do not have the same audio channel count.
* file contains the filename of the first asset to differ
*/
- MISMATCHED_SOUND_CHANNEL_COUNTS
+ MISMATCHED_SOUND_CHANNEL_COUNTS,
+ /** The CPL contains a MainSoundConfiguration tag which does not describe the number of
+ * channels in the audio assets.
+ * note contains details of what is wrong
+ * file contains the CPL filename
+ */
+ INVALID_MAIN_SOUND_CONFIGURATION,
};
VerificationNote (Type type, Code code)