diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-03-29 16:32:10 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-04-01 23:43:00 +0200 |
| commit | 53a3e519faeb354934c535f933014cc60ccc3ea4 (patch) | |
| tree | 4364cb6664cc4bddc05719f9dec19ca8ae0b4439 | |
| parent | 7192b355e9754b0551d219de26b387905287495c (diff) | |
INVALID_SOUND_BIT_DEPTH: note -> bit_depth.
| -rw-r--r-- | src/verify.cc | 4 | ||||
| -rw-r--r-- | src/verify.h | 2 | ||||
| -rw-r--r-- | test/verify_test.cc | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/verify.cc b/src/verify.cc index a720d731..b42fdbb7 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -655,7 +655,7 @@ verify_main_sound_asset(Context& context, shared_ptr<const ReelSoundAsset> reel_ context.add_note(VerificationNote(VerificationNote::Code::INVALID_SOUND_FRAME_RATE, file).set_frame_rate(dcp::Fraction(asset->sampling_rate(), 1))); } if (asset->bit_depth() != 24) { - context.add_note(VerificationNote::Code::INVALID_SOUND_BIT_DEPTH, fmt::to_string(asset->bit_depth()), file); + context.add_note(VerificationNote(VerificationNote::Code::INVALID_SOUND_BIT_DEPTH, file).set_bit_depth(asset->bit_depth())); } } @@ -2060,7 +2060,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str case VerificationNote::Code::INVALID_SOUND_FRAME_RATE: return compose("The sound asset %1 has a sampling rate of %2", filename(), note.frame_rate()->numerator); case VerificationNote::Code::INVALID_SOUND_BIT_DEPTH: - return compose("The sound asset %1 has a bit depth of %2", filename(), note.note().get()); + return compose("The sound asset %1 has a bit depth of %2", filename(), *note.bit_depth()); case VerificationNote::Code::MISSING_CPL_ANNOTATION_TEXT: return compose("The CPL %1 has no <AnnotationText> tag.", note.cpl_id().get()); case VerificationNote::Code::MISMATCHED_CPL_ANNOTATION_TEXT: diff --git a/src/verify.h b/src/verify.h index 73b1ab43..04640844 100644 --- a/src/verify.h +++ b/src/verify.h @@ -292,7 +292,7 @@ public: */ INVALID_SOUND_FRAME_RATE, /** The audio bit depth must be 24 - * note contains the invalid bit depth + * bit_depth contains the invalid bit depth * file contains the asset filename * reel_index contains the reel index (starting from 0) */ diff --git a/test/verify_test.cc b/test/verify_test.cc index 3ed981fd..73b8860f 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -5933,7 +5933,9 @@ BOOST_AUTO_TEST_CASE(verify_invalid_sound_bit_depth) note(VC::NONE_ENCRYPTED, cpl), note(VC::CORRECT_PICTURE_HASH, canonical(dir / "Video.mxf"), cpl).set_reel_index(0).set_asset_id("fd4796c2-9c84-454c-91f4-13ad127cea8a"), note(VC::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "Video.mxf"), cpl).set_reel_index(0).set_asset_id("fd4796c2-9c84-454c-91f4-13ad127cea8a"), - VN(VC::INVALID_SOUND_BIT_DEPTH, "16", canonical(dir / "Audio.mxf")).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id("9d5e8bc4-676b-4306-a86d-03f70c73b457"), + VN( + VC::INVALID_SOUND_BIT_DEPTH, canonical(dir / "Audio.mxf") + ).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id("9d5e8bc4-676b-4306-a86d-03f70c73b457").set_bit_depth(16), VN(VC::MISSING_HASH, string("fd4796c2-9c84-454c-91f4-13ad127cea8a")).set_cpl_id(cpl->id()).set_reel_index(0), VN(VC::MISSING_HASH, string("9d5e8bc4-676b-4306-a86d-03f70c73b457")).set_cpl_id(cpl->id()).set_reel_index(0), VN(VC::MISSING_CPL_METADATA, canonical(cpl->file().get())).set_cpl_id(cpl->id()), |
