summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-29 15:19:07 +0200
committerCarl Hetherington <cth@carlh.net>2026-04-01 23:43:00 +0200
commit814abc3a7afca78c8877d2c9478364c327db7734 (patch)
treee25526e6db17f5040caa5f1d8bdf18bfdb125814
parent6ebb73004a5568b19228ff699cd68aadc8abbcff (diff)
INVALID_LANGUAGE: note -> language.
-rw-r--r--src/verify.cc6
-rw-r--r--src/verify.h2
-rw-r--r--test/verify_test.cc16
3 files changed, 12 insertions, 12 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 2608ab77..41ecda0b 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -444,7 +444,7 @@ verify_language_tag(Context& context, string tag)
try {
LanguageTag test (tag);
} catch (LanguageTagError &) {
- context.add_note(VerificationNote::Code::INVALID_LANGUAGE, tag);
+ context.add_note(VerificationNote(VerificationNote::Code::INVALID_LANGUAGE).set_language(tag));
}
}
@@ -1568,7 +1568,7 @@ verify_cpl(Context& context, shared_ptr<const CPL> cpl)
LanguageTag::RegionSubtag test(terr);
} catch (...) {
if (terr != "001") {
- context.add_note(VerificationNote::Code::INVALID_LANGUAGE, terr);
+ context.add_note(VerificationNote(VerificationNote::Code::INVALID_LANGUAGE).set_language(terr));
valid = false;
}
}
@@ -2012,7 +2012,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str
case VerificationNote::Code::INVALID_STANDARD:
return "This DCP does not use the SMPTE standard.";
case VerificationNote::Code::INVALID_LANGUAGE:
- return compose("The DCP specifies a language '%1' which does not conform to the RFC 5646 standard.", note.note().get());
+ return compose("The DCP specifies a language '%1' which does not conform to the RFC 5646 standard.", *note.language());
case VerificationNote::Code::VALID_RELEASE_TERRITORY:
return compose("Valid release territory %1.", *note.territory());
case VerificationNote::Code::INVALID_PICTURE_SIZE_IN_PIXELS:
diff --git a/src/verify.h b/src/verify.h
index ac943f50..ecaeacfe 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -200,7 +200,7 @@ public:
/** DCP is Interop, not SMPTE [Bv2.1_6.1] */
INVALID_STANDARD,
/** A language or territory does not conform to RFC 5646 [Bv2.1_6.2.1]
- * note contains the invalid language
+ * language contains the invalid language
* reel_index contains the reel index (starting from 0)
*/
INVALID_LANGUAGE,
diff --git a/test/verify_test.cc b/test/verify_test.cc
index fd4db820..93ff427e 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -1733,8 +1733,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_language1)
note(VC::VALID_CONTENT_KIND, string{"trailer"}, cpl),
note(VC::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl),
note(VC::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl),
- VN(VC::INVALID_LANGUAGE, string("badlang")).set_cpl_id(cpl->id()).set_reel_index(0),
- VN(VC::INVALID_LANGUAGE, string("wrong-andbad")).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()),
+ VN(VC::INVALID_LANGUAGE).set_cpl_id(cpl->id()).set_reel_index(0).set_language("badlang"),
+ VN(VC::INVALID_LANGUAGE).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()).set_language("wrong-andbad"),
VN(VC::MISSING_CPL_METADATA, cpl->file().get()).set_cpl_id(cpl->id())
});
}
@@ -1766,8 +1766,8 @@ BOOST_AUTO_TEST_CASE (verify_invalid_language2)
note(VC::VALID_CONTENT_KIND, string{"trailer"}, cpl),
note(VC::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl),
note(VC::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl),
- VN(VC::INVALID_LANGUAGE, string("badlang")).set_cpl_id(cpl->id()).set_reel_index(0),
- VN(VC::INVALID_LANGUAGE, string("wrong-andbad")).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()),
+ VN(VC::INVALID_LANGUAGE).set_cpl_id(cpl->id()).set_reel_index(0).set_language("badlang"),
+ VN(VC::INVALID_LANGUAGE).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()).set_language("wrong-andbad"),
VN(VC::MISSING_CPL_METADATA, cpl->file().get()).set_cpl_id(cpl->id())
});
}
@@ -1825,10 +1825,10 @@ BOOST_AUTO_TEST_CASE (verify_invalid_language3)
note(VC::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl),
note(VC::VALID_CPL_ANNOTATION_TEXT, string{"hello"}, cpl),
note(VC::VALID_PICTURE_FRAME_SIZES_IN_BYTES, canonical(dir / "videofoo.mxf"), cpl).set_reel_index(0).set_asset_id(picture->id()),
- VN(VC::INVALID_LANGUAGE, string("this-is-wrong")).set_cpl_id(cpl->id()),
- VN(VC::INVALID_LANGUAGE, string("andso-is-this")).set_cpl_id(cpl->id()),
- VN(VC::INVALID_LANGUAGE, string("fred-jim")).set_cpl_id(cpl->id()),
- VN(VC::INVALID_LANGUAGE, string("frobozz")).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(sound->id()),
+ VN(VC::INVALID_LANGUAGE).set_cpl_id(cpl->id()).set_language("this-is-wrong"),
+ VN(VC::INVALID_LANGUAGE).set_cpl_id(cpl->id()).set_language("andso-is-this"),
+ VN(VC::INVALID_LANGUAGE).set_cpl_id(cpl->id()).set_language("fred-jim"),
+ VN(VC::INVALID_LANGUAGE).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(sound->id()).set_language("frobozz"),
});
}