From e3033879f7693d40f652f013b00c76deed6994da Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 4 Dec 2023 23:14:40 +0100 Subject: Rename everything. --- src/verify.cc | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/verify.cc') diff --git a/src/verify.cc b/src/verify.cc index 960f0438..4e9c29c3 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -42,7 +42,7 @@ #include "dcp.h" #include "exceptions.h" #include "filesystem.h" -#include "interop_subtitle_asset.h" +#include "interop_text_asset.h" #include "mono_picture_asset.h" #include "mono_picture_frame.h" #include "raw_convert.h" @@ -54,7 +54,7 @@ #include "reel_sound_asset.h" #include "reel_smpte_subtitle_asset.h" #include "reel_subtitle_asset.h" -#include "smpte_subtitle_asset.h" +#include "smpte_text_asset.h" #include "stereo_picture_asset.h" #include "stereo_picture_frame.h" #include "verify.h" @@ -670,7 +670,7 @@ verify_closed_caption_reel (shared_ptr reel_asset, /** Verify stuff that is common to both subtitles and closed captions */ void verify_smpte_timed_text_asset ( - shared_ptr asset, + shared_ptr asset, optional reel_asset_duration, vector& notes ) @@ -720,9 +720,9 @@ verify_smpte_timed_text_asset ( /** Verify Interop subtitle / CCAP stuff */ void -verify_interop_text_asset(shared_ptr asset, vector& notes) +verify_interop_text_asset(shared_ptr asset, vector& notes) { - if (asset->subtitles().empty()) { + if (asset->texts().empty()) { notes.push_back({VerificationNote::Type::ERROR, VerificationNote::Code::MISSING_SUBTITLE, asset->id(), asset->file().get() }); } auto const unresolved = asset->unresolved_fonts(); @@ -735,7 +735,7 @@ verify_interop_text_asset(shared_ptr asset, vector asset, + shared_ptr asset, vector& notes, State& state ) @@ -778,7 +778,7 @@ verify_smpte_subtitle_asset ( /** Verify all subtitle stuff */ static void verify_subtitle_asset ( - shared_ptr asset, + shared_ptr asset, optional reel_asset_duration, function)> stage, boost::filesystem::path xsd_dtd_directory, @@ -787,7 +787,7 @@ verify_subtitle_asset ( ) { stage ("Checking subtitle XML", asset->file()); - /* Note: we must not use SubtitleAsset::xml_as_string() here as that will mean the data on disk + /* Note: we must not use TextAsset::xml_as_string() here as that will mean the data on disk * gets passed through libdcp which may clean up and therefore hide errors. */ if (asset->raw_xml()) { @@ -796,7 +796,7 @@ verify_subtitle_asset ( notes.push_back ({VerificationNote::Type::WARNING, VerificationNote::Code::MISSED_CHECK_OF_ENCRYPTED}); } - auto namespace_count = [](shared_ptr asset, string root_node) { + auto namespace_count = [](shared_ptr asset, string root_node) { cxml::Document doc(root_node); doc.read_string(asset->raw_xml().get()); auto root = dynamic_cast(doc.node())->cobj(); @@ -807,7 +807,7 @@ verify_subtitle_asset ( return count; }; - auto interop = dynamic_pointer_cast(asset); + auto interop = dynamic_pointer_cast(asset); if (interop) { verify_interop_text_asset(interop, notes); if (namespace_count(asset, "DCSubtitle") > 1) { @@ -815,7 +815,7 @@ verify_subtitle_asset ( } } - auto smpte = dynamic_pointer_cast(asset); + auto smpte = dynamic_pointer_cast(asset); if (smpte) { verify_smpte_timed_text_asset (smpte, reel_asset_duration, notes); verify_smpte_subtitle_asset (smpte, notes, state); @@ -830,7 +830,7 @@ verify_subtitle_asset ( /** Verify all closed caption stuff */ static void verify_closed_caption_asset ( - shared_ptr asset, + shared_ptr asset, optional reel_asset_duration, function)> stage, boost::filesystem::path xsd_dtd_directory, @@ -838,7 +838,7 @@ verify_closed_caption_asset ( ) { stage ("Checking closed caption XML", asset->file()); - /* Note: we must not use SubtitleAsset::xml_as_string() here as that will mean the data on disk + /* Note: we must not use TextAsset::xml_as_string() here as that will mean the data on disk * gets passed through libdcp which may clean up and therefore hide errors. */ auto raw_xml = asset->raw_xml(); @@ -851,12 +851,12 @@ verify_closed_caption_asset ( notes.push_back ({VerificationNote::Type::WARNING, VerificationNote::Code::MISSED_CHECK_OF_ENCRYPTED}); } - auto interop = dynamic_pointer_cast(asset); + auto interop = dynamic_pointer_cast(asset); if (interop) { verify_interop_text_asset(interop, notes); } - auto smpte = dynamic_pointer_cast(asset); + auto smpte = dynamic_pointer_cast(asset); if (smpte) { verify_smpte_timed_text_asset (smpte, reel_asset_duration, notes); } @@ -1161,7 +1161,7 @@ struct LinesCharactersResult static void verify_text_lines_and_characters ( - shared_ptr asset, + shared_ptr asset, int warning_length, int error_length, LinesCharactersResult* result @@ -1189,7 +1189,7 @@ verify_text_lines_and_characters ( vector> events; - auto position = [](shared_ptr sub) { + auto position = [](shared_ptr sub) { switch (sub->v_align()) { case VAlign::TOP: return lrintf(sub->v_position() * 100); @@ -1202,8 +1202,8 @@ verify_text_lines_and_characters ( return 0L; }; - for (auto j: asset->subtitles()) { - auto text = dynamic_pointer_cast(j); + for (auto j: asset->texts()) { + auto text = dynamic_pointer_cast(j); if (text) { auto in = make_shared(text->in(), position(text), text->text().length()); events.push_back(in); -- cgit v1.2.3