summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-29 16:22:14 +0200
committerCarl Hetherington <cth@carlh.net>2026-04-01 23:43:00 +0200
commit7192b355e9754b0551d219de26b387905287495c (patch)
treea408842a1445c3a5adb4dfb2508a718ca7f9fa9e
parentad1b660b6b3132952bdc2d4e5682fa164c82dd37 (diff)
INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES: note -> size_in_bytes.
-rw-r--r--src/verify.cc4
-rw-r--r--src/verify.h2
-rw-r--r--test/verify_test.cc3
3 files changed, 4 insertions, 5 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 72d2f0ac..a720d731 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -721,7 +721,7 @@ verify_smpte_timed_text_asset (
total_size += i.second.size();
}
if (total_size > 10 * 1024 * 1024) {
- context.add_note(VerificationNote::Code::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES, fmt::to_string(total_size), asset->file().get());
+ context.add_note(VerificationNote(VerificationNote::Code::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES, asset->file().get()).set_size_in_bytes(total_size));
}
if (asset->raw_xml()) {
@@ -2028,7 +2028,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str
case VerificationNote::Code::INVALID_TIMED_TEXT_SIZE_IN_BYTES:
return compose("The size %1 of the timed text asset %2 is larger than the 115MB maximum.", *note.size_in_bytes(), filename());
case VerificationNote::Code::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES:
- return compose("The size %1 of the fonts in timed text asset %2 is larger than the 10MB maximum.", note.note().get(), filename());
+ return compose("The size %1 of the fonts in timed text asset %2 is larger than the 10MB maximum.", *note.size_in_bytes(), filename());
case VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE:
return compose("The XML for the SMPTE subtitle asset %1 has no <Language> tag.", filename());
case VerificationNote::Code::MISMATCHED_SUBTITLE_LANGUAGES:
diff --git a/src/verify.h b/src/verify.h
index 1cb6acc0..73b1ab43 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -242,7 +242,7 @@ public:
*/
INVALID_TIMED_TEXT_SIZE_IN_BYTES,
/** The total size of all a timed text asset's fonts is larger than 10MB [Bv2.1_7.2.1]
- * note contains the invalid size in bytes
+ * size_in_bytes contains the invalid size in bytes
* file contains the asset filename
*/
INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES,
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 63cb0bb3..3ed981fd 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -2191,9 +2191,8 @@ verify_timed_text_asset_too_large (string name)
).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()).set_size_in_bytes(121698284),
VN(
VC::INVALID_TIMED_TEXT_FONT_SIZE_IN_BYTES,
- "121634816",
canonical(dir / "subs.mxf")
- ).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()),
+ ).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()).set_size_in_bytes(121634816),
VN(VC::MISSING_SUBTITLE_START_TIME, canonical(dir / "subs.mxf")).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()),
VN(VC::INVALID_SUBTITLE_FIRST_TEXT_TIME).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()),
VN(VC::MISSING_CPL_METADATA, cpl->file().get()).set_cpl_id(cpl->id())