summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-31 18:05:14 +0200
committerCarl Hetherington <cth@carlh.net>2026-04-01 23:43:00 +0200
commitd6ccf7600d19ad73fab51a8a8ee1a215d5a9e180 (patch)
treecc0399b5593a99b6a11d93dec5d334fe1acde57c
parent01e7bb0bb80f50466912800bd327ec4f0d733542 (diff)
MISSING_SUBTITLE: note -> asset_id.
-rw-r--r--src/verify.cc4
-rw-r--r--src/verify.h2
-rw-r--r--test/verify_test.cc6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/verify.cc b/src/verify.cc
index 094567da..22e07b7c 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -748,7 +748,7 @@ void
verify_interop_text_asset(Context& context, shared_ptr<const InteropTextAsset> asset)
{
if (asset->texts().empty()) {
- context.add_note(VerificationNote::Code::MISSING_SUBTITLE, asset->id(), asset->file().get());
+ context.add_note(VerificationNote(VerificationNote::Code::MISSING_SUBTITLE, asset->file().get()).set_asset_id(asset->id()));
}
auto const unresolved = asset->unresolved_fonts();
if (!unresolved.empty()) {
@@ -2183,7 +2183,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str
case VerificationNote::Code::DUPLICATE_ASSET_ID_IN_ASSETMAP:
return compose("The ASSETMAP %1 has more than one asset with the same ID.", *note.asset_map_id());
case VerificationNote::Code::MISSING_SUBTITLE:
- return compose("The subtitle asset %1 has no subtitles.", note.note().get());
+ return compose("The subtitle asset %1 has no subtitles.", *note.asset_id());
case VerificationNote::Code::INVALID_SUBTITLE_ISSUE_DATE:
return compose("<IssueDate> has an invalid value: %1", note.note().get());
case VerificationNote::Code::MISMATCHED_SOUND_CHANNEL_COUNTS:
diff --git a/src/verify.h b/src/verify.h
index 2fb6b0ef..d4d066c6 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -520,7 +520,7 @@ public:
*/
DUPLICATE_ASSET_ID_IN_ASSETMAP,
/** An Interop subtitle asset has no subtitles
- * note contains the asset ID
+ * asset_id contains the asset ID
* 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 737da1e9..512c673e 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -1301,7 +1301,7 @@ BOOST_AUTO_TEST_CASE(verify_interop_subtitle_asset_with_no_subtitles)
note(VC::VALID_CONTENT_KIND, cpl).set_content_kind("trailer"),
note(VC::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl),
{ VC::INVALID_STANDARD },
- VN(VC::MISSING_SUBTITLE, asset->id(), boost::filesystem::canonical(asset->file().get())).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()),
+ VN(VC::MISSING_SUBTITLE, boost::filesystem::canonical(asset->file().get())).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()),
VN(VC::MISSING_FONT, string{"theFontId"}).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(asset->id()),
});
}
@@ -1473,7 +1473,7 @@ BOOST_AUTO_TEST_CASE (verify_empty_text_node_in_subtitles_with_empty_child_nodes
auto reel_asset = make_shared<dcp::ReelInteropTextAsset>(dcp::TextType::OPEN_SUBTITLE, asset, dcp::Fraction(24, 1), 192, 0);
auto cpl = write_dcp_with_single_asset (dir, reel_asset, dcp::Standard::INTEROP);
- auto const subs_id = cpl->reels()[0]->main_subtitle()->asset()->id();
+ auto const subs_id = asset->id();
using VN = dcp::VerificationNote;
using VC = VN::Code;
@@ -1486,7 +1486,7 @@ BOOST_AUTO_TEST_CASE (verify_empty_text_node_in_subtitles_with_empty_child_nodes
note(VC::NONE_ENCRYPTED, cpl),
note(VC::VALID_CONTENT_KIND, cpl).set_content_kind("trailer"),
note(VC::VALID_CONTENT_VERSION_LABEL_TEXT, cpl->content_version()->label_text, cpl),
- VN(VC::MISSING_SUBTITLE, asset->id(), boost::filesystem::canonical(asset->file().get())).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(subs_id),
+ VN(VC::MISSING_SUBTITLE, boost::filesystem::canonical(asset->file().get())).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(subs_id),
{ VC::INVALID_STANDARD },
VN(VC::EMPTY_TEXT).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(subs_id),
VN(VC::MISSING_FONT, string{"font0"}).set_cpl_id(cpl->id()).set_reel_index(0).set_asset_id(subs_id),