diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-06-28 19:27:50 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-08-17 12:57:31 +0200 |
| commit | b64644327bff333569bf4a60f1d7c3d46f058b48 (patch) | |
| tree | c7332cca06c2a171ce91c691760686d03882c919 /src | |
| parent | 32f8cc149c8c78c82f9f7e3689e43c11da362968 (diff) | |
Reel{,Interop,SMPTE}SubtitleAsset -> Reel{,Interop,SMPTE}TextAsset.
Diffstat (limited to 'src')
| -rw-r--r-- | src/cpl.cc | 2 | ||||
| -rw-r--r-- | src/dcp.cc | 2 | ||||
| -rw-r--r-- | src/reel.cc | 24 | ||||
| -rw-r--r-- | src/reel.h | 8 | ||||
| -rw-r--r-- | src/reel_interop_text_asset.cc (renamed from src/reel_interop_subtitle_asset.cc) | 15 | ||||
| -rw-r--r-- | src/reel_interop_text_asset.h (renamed from src/reel_interop_subtitle_asset.h) | 17 | ||||
| -rw-r--r-- | src/reel_smpte_text_asset.cc (renamed from src/reel_smpte_subtitle_asset.cc) | 14 | ||||
| -rw-r--r-- | src/reel_smpte_text_asset.h (renamed from src/reel_smpte_subtitle_asset.h) | 16 | ||||
| -rw-r--r-- | src/reel_text_asset.cc (renamed from src/reel_subtitle_asset.cc) | 18 | ||||
| -rw-r--r-- | src/reel_text_asset.h (renamed from src/reel_subtitle_asset.h) | 20 | ||||
| -rw-r--r-- | src/verify.cc | 8 | ||||
| -rw-r--r-- | src/verify_report.cc | 2 | ||||
| -rw-r--r-- | src/wscript | 12 |
13 files changed, 78 insertions, 80 deletions
@@ -51,7 +51,7 @@ #include "reel_closed_caption_asset.h" #include "reel_picture_asset.h" #include "reel_sound_asset.h" -#include "reel_subtitle_asset.h" +#include "reel_text_asset.h" #include "util.h" #include "version.h" #include "warnings.h" @@ -57,7 +57,7 @@ #include "pkl.h" #include "raw_convert.h" #include "reel_asset.h" -#include "reel_subtitle_asset.h" +#include "reel_text_asset.h" #include "smpte_subtitle_asset.h" #include "sound_asset.h" #include "stereo_j2k_picture_asset.h" diff --git a/src/reel.cc b/src/reel.cc index acd7c7fc..6a7043f0 100644 --- a/src/reel.cc +++ b/src/reel.cc @@ -47,14 +47,14 @@ #include "reel_atmos_asset.h" #include "reel_closed_caption_asset.h" #include "reel_interop_closed_caption_asset.h" -#include "reel_interop_subtitle_asset.h" +#include "reel_interop_text_asset.h" #include "reel_markers_asset.h" #include "reel_mono_picture_asset.h" #include "reel_smpte_closed_caption_asset.h" -#include "reel_smpte_subtitle_asset.h" +#include "reel_smpte_text_asset.h" #include "reel_sound_asset.h" #include "reel_stereo_picture_asset.h" -#include "reel_subtitle_asset.h" +#include "reel_text_asset.h" #include "smpte_subtitle_asset.h" #include "sound_asset.h" #include "stereo_j2k_picture_asset.h" @@ -98,10 +98,10 @@ Reel::Reel (std::shared_ptr<const cxml::Node> node, dcp::Standard standard) if (main_subtitle) { switch (standard) { case Standard::INTEROP: - _main_subtitle = make_shared<ReelInteropSubtitleAsset>(main_subtitle); + _main_subtitle = make_shared<ReelInteropTextAsset>(main_subtitle); break; case Standard::SMPTE: - _main_subtitle = make_shared<ReelSMPTESubtitleAsset>(main_subtitle); + _main_subtitle = make_shared<ReelSMPTETextAsset>(main_subtitle); break; } } @@ -208,8 +208,8 @@ Reel::equals(std::shared_ptr<const Reel> other, EqualityOptions const& opt, Note bool same_type = false; { - auto interop = dynamic_pointer_cast<ReelInteropSubtitleAsset>(_main_subtitle); - auto interop_other = dynamic_pointer_cast<ReelInteropSubtitleAsset>(other->_main_subtitle); + auto interop = dynamic_pointer_cast<ReelInteropTextAsset>(_main_subtitle); + auto interop_other = dynamic_pointer_cast<ReelInteropTextAsset>(other->_main_subtitle); if (interop && interop_other) { same_type = true; if (!interop->equals(interop_other, opt, note)) { @@ -219,8 +219,8 @@ Reel::equals(std::shared_ptr<const Reel> other, EqualityOptions const& opt, Note } { - auto smpte = dynamic_pointer_cast<ReelSMPTESubtitleAsset>(_main_subtitle); - auto smpte_other = dynamic_pointer_cast<ReelSMPTESubtitleAsset>(other->_main_subtitle); + auto smpte = dynamic_pointer_cast<ReelSMPTETextAsset>(_main_subtitle); + auto smpte_other = dynamic_pointer_cast<ReelSMPTETextAsset>(other->_main_subtitle); if (smpte && smpte_other) { same_type = true; if (!smpte->equals(smpte_other, opt, note)) { @@ -333,13 +333,13 @@ Reel::give_kdm_to_assets (DecryptedKDM const & kdm) _main_sound->asset()->set_key (i.key()); } if (_main_subtitle) { - auto smpte = dynamic_pointer_cast<ReelSMPTESubtitleAsset>(_main_subtitle); + auto smpte = dynamic_pointer_cast<ReelSMPTETextAsset>(_main_subtitle); if (smpte && i.id() == smpte->key_id() && smpte->asset_ref().resolved()) { smpte->smpte_asset()->set_key(i.key()); } } for (auto j: _closed_captions) { - auto smpte = dynamic_pointer_cast<ReelSMPTESubtitleAsset>(j); + auto smpte = dynamic_pointer_cast<ReelSMPTETextAsset>(j); if (smpte && i.id() == smpte->key_id() && smpte->asset_ref().resolved()) { smpte->smpte_asset()->set_key(i.key()); } @@ -358,7 +358,7 @@ Reel::add (shared_ptr<ReelAsset> asset) _main_picture = p; } else if (auto so = dynamic_pointer_cast<ReelSoundAsset>(asset)) { _main_sound = so; - } else if (auto su = dynamic_pointer_cast<ReelSubtitleAsset>(asset)) { + } else if (auto su = dynamic_pointer_cast<ReelTextAsset>(asset)) { _main_subtitle = su; } else if (auto m = dynamic_pointer_cast<ReelMarkersAsset>(asset)) { _main_markers = m; @@ -68,7 +68,7 @@ class DecryptedKDM; class ReelAsset; class ReelPictureAsset; class ReelSoundAsset; -class ReelSubtitleAsset; +class ReelTextAsset; class ReelMarkersAsset; class ReelClosedCaptionAsset; class ReelAtmosAsset; @@ -84,7 +84,7 @@ public: Reel ( std::shared_ptr<ReelPictureAsset> picture, std::shared_ptr<ReelSoundAsset> sound = std::shared_ptr<ReelSoundAsset> (), - std::shared_ptr<ReelSubtitleAsset> subtitle = std::shared_ptr<ReelSubtitleAsset> (), + std::shared_ptr<ReelTextAsset> subtitle = std::shared_ptr<ReelTextAsset> (), std::shared_ptr<ReelMarkersAsset> markers = std::shared_ptr<ReelMarkersAsset> (), std::shared_ptr<ReelAtmosAsset> atmos = std::shared_ptr<ReelAtmosAsset> () ) @@ -105,7 +105,7 @@ public: return _main_sound; } - std::shared_ptr<ReelSubtitleAsset> main_subtitle () const { + std::shared_ptr<ReelTextAsset> main_subtitle () const { return _main_subtitle; } @@ -145,7 +145,7 @@ private: std::shared_ptr<ReelPictureAsset> _main_picture; std::shared_ptr<ReelSoundAsset> _main_sound; - std::shared_ptr<ReelSubtitleAsset> _main_subtitle; + std::shared_ptr<ReelTextAsset> _main_subtitle; std::shared_ptr<ReelMarkersAsset> _main_markers; std::vector<std::shared_ptr<ReelClosedCaptionAsset>> _closed_captions; std::shared_ptr<ReelAtmosAsset> _atmos; diff --git a/src/reel_interop_subtitle_asset.cc b/src/reel_interop_text_asset.cc index 5f295d53..4bd030aa 100644 --- a/src/reel_interop_subtitle_asset.cc +++ b/src/reel_interop_text_asset.cc @@ -32,33 +32,32 @@ */ -/** @file src/reel_interop_subtitle_asset.cc - * @brief ReelInteropSubtitleAsset class +/** @file src/reel_interop_text_asset.cc + * @brief ReelInteropTextAsset class */ -#include "reel_interop_subtitle_asset.h" +#include "reel_interop_text_asset.h" #include "warnings.h" LIBDCP_DISABLE_WARNINGS #include <libxml++/libxml++.h> LIBDCP_ENABLE_WARNINGS -using std::shared_ptr; using std::string; using boost::optional; using namespace dcp; -ReelInteropSubtitleAsset::ReelInteropSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) - : ReelSubtitleAsset (asset, edit_rate, intrinsic_duration, entry_point) +ReelInteropTextAsset::ReelInteropTextAsset(std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) + : ReelTextAsset(asset, edit_rate, intrinsic_duration, entry_point) { } -ReelInteropSubtitleAsset::ReelInteropSubtitleAsset (std::shared_ptr<const cxml::Node> node) - : ReelSubtitleAsset (node) +ReelInteropTextAsset::ReelInteropTextAsset(std::shared_ptr<const cxml::Node> node) + : ReelTextAsset(node) { node->done (); } diff --git a/src/reel_interop_subtitle_asset.h b/src/reel_interop_text_asset.h index 7e90e9e0..cedc2ae5 100644 --- a/src/reel_interop_subtitle_asset.h +++ b/src/reel_interop_text_asset.h @@ -32,27 +32,26 @@ */ -/** @file src/reel_interop_subtitle_asset.h - * @brief ReelInteropSubtitleAsset class +/** @file src/reel_interop_text_asset.h + * @brief ReelInteropTextAsset class */ #include "interop_subtitle_asset.h" -#include "reel_file_asset.h" -#include "reel_subtitle_asset.h" +#include "reel_text_asset.h" namespace dcp { -/** @class ReelInteropSubtitleAsset - * @brief Part of a Reel's description which refers to an Interop subtitle XML file +/** @class ReelInteropTextAsset + * @brief Part of a Reel's description which refers to an Interop subtitle or caption XML file */ -class ReelInteropSubtitleAsset : public ReelSubtitleAsset +class ReelInteropTextAsset : public ReelTextAsset { public: - ReelInteropSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); - explicit ReelInteropSubtitleAsset (std::shared_ptr<const cxml::Node>); + ReelInteropTextAsset(std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); + explicit ReelInteropTextAsset (std::shared_ptr<const cxml::Node>); std::shared_ptr<const InteropSubtitleAsset> interop_asset () const { return asset_of_type<const InteropSubtitleAsset>(); diff --git a/src/reel_smpte_subtitle_asset.cc b/src/reel_smpte_text_asset.cc index 64440547..bbfa1b39 100644 --- a/src/reel_smpte_subtitle_asset.cc +++ b/src/reel_smpte_text_asset.cc @@ -32,12 +32,12 @@ */ -/** @file src/reel_interop_subtitle_asset.cc - * @brief ReelInteropSubtitleAsset class +/** @file src/reel_interop_text_asset.cc + * @brief ReelInteropTextAsset class */ -#include "reel_smpte_subtitle_asset.h" +#include "reel_smpte_text_asset.h" #include "smpte_subtitle_asset.h" #include "warnings.h" LIBDCP_DISABLE_WARNINGS @@ -51,15 +51,15 @@ using boost::optional; using namespace dcp; -ReelSMPTESubtitleAsset::ReelSMPTESubtitleAsset (shared_ptr<SMPTESubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) - : ReelSubtitleAsset (asset, edit_rate, intrinsic_duration, entry_point) +ReelSMPTETextAsset::ReelSMPTETextAsset(shared_ptr<SMPTESubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) + : ReelTextAsset(asset, edit_rate, intrinsic_duration, entry_point) { } -ReelSMPTESubtitleAsset::ReelSMPTESubtitleAsset (shared_ptr<const cxml::Node> node) - : ReelSubtitleAsset (node) +ReelSMPTETextAsset::ReelSMPTETextAsset(shared_ptr<const cxml::Node> node) + : ReelTextAsset(node) { node->done (); } diff --git a/src/reel_smpte_subtitle_asset.h b/src/reel_smpte_text_asset.h index 49b6000b..6eb3260d 100644 --- a/src/reel_smpte_subtitle_asset.h +++ b/src/reel_smpte_text_asset.h @@ -32,12 +32,12 @@ */ -/** @file src/reel_smpte_subtitle_asset.h - * @brief ReelSMPTESubtitleAsset class +/** @file src/reel_smpte_text_asset.h + * @brief ReelSMPTETextAsset class */ -#include "reel_subtitle_asset.h" +#include "reel_text_asset.h" #include "smpte_subtitle_asset.h" @@ -47,14 +47,14 @@ namespace dcp { class SMPTESubtitleAsset; -/** @class ReelSMPTESubtitleAsset - * @brief Part of a Reel's description which refers to an SMPTE subtitle MXF file +/** @class ReelSMPTETextAsset + * @brief Part of a Reel's description which refers to an SMPTE subtitle or caption MXF file */ -class ReelSMPTESubtitleAsset : public ReelSubtitleAsset +class ReelSMPTETextAsset : public ReelTextAsset { public: - ReelSMPTESubtitleAsset (std::shared_ptr<SMPTESubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); - explicit ReelSMPTESubtitleAsset (std::shared_ptr<const cxml::Node>); + ReelSMPTETextAsset(std::shared_ptr<SMPTESubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); + explicit ReelSMPTETextAsset(std::shared_ptr<const cxml::Node>); std::shared_ptr<const SMPTESubtitleAsset> smpte_asset () const { return asset_of_type<const SMPTESubtitleAsset>(); diff --git a/src/reel_subtitle_asset.cc b/src/reel_text_asset.cc index 436aa69f..1802ad51 100644 --- a/src/reel_subtitle_asset.cc +++ b/src/reel_text_asset.cc @@ -32,13 +32,13 @@ */ -/** @file src/reel_subtitle_asset.cc - * @brief ReelSubtitleAsset class +/** @file src/reel_text_asset.cc + * @brief ReelTextAsset class */ #include "language_tag.h" -#include "reel_subtitle_asset.h" +#include "reel_text_asset.h" #include "smpte_subtitle_asset.h" #include "subtitle_asset.h" #include "warnings.h" @@ -54,7 +54,7 @@ using boost::optional; using namespace dcp; -ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) +ReelTextAsset::ReelTextAsset(std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) : ReelFileAsset ( asset, dynamic_pointer_cast<SMPTESubtitleAsset>(asset) ? dynamic_pointer_cast<SMPTESubtitleAsset>(asset)->key_id() : boost::none, @@ -68,7 +68,7 @@ ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Frac } -ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<const cxml::Node> node) +ReelTextAsset::ReelTextAsset(std::shared_ptr<const cxml::Node> node) : ReelFileAsset (node) { _language = node->optional_string_child("Language"); @@ -76,21 +76,21 @@ ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<const cxml::Node> node) string -ReelSubtitleAsset::cpl_node_name (Standard) const +ReelTextAsset::cpl_node_name(Standard) const { return "MainSubtitle"; } void -ReelSubtitleAsset::set_language (dcp::LanguageTag language) +ReelTextAsset::set_language(dcp::LanguageTag language) { _language = language.to_string(); } bool -ReelSubtitleAsset::equals(shared_ptr<const ReelSubtitleAsset> other, EqualityOptions const& opt, NoteHandler note) const +ReelTextAsset::equals(shared_ptr<const ReelTextAsset> other, EqualityOptions const& opt, NoteHandler note) const { if (!asset_equals (other, opt, note)) { return false; @@ -104,7 +104,7 @@ ReelSubtitleAsset::equals(shared_ptr<const ReelSubtitleAsset> other, EqualityOpt xmlpp::Element * -ReelSubtitleAsset::write_to_cpl(xmlpp::Element* node, Standard standard) const +ReelTextAsset::write_to_cpl(xmlpp::Element* node, Standard standard) const { auto asset = ReelFileAsset::write_to_cpl (node, standard); if (_language) { diff --git a/src/reel_subtitle_asset.h b/src/reel_text_asset.h index c619c752..63962155 100644 --- a/src/reel_subtitle_asset.h +++ b/src/reel_text_asset.h @@ -32,13 +32,13 @@ */ -/** @file src/reel_subtitle_asset.h - * @brief ReelSubtitleAsset class. +/** @file src/reel_text_asset.h + * @brief ReelTextAsset class. */ -#ifndef LIBDCP_REEL_SUBTITLE_ASSET_H -#define LIBDCP_REEL_SUBTITLE_ASSET_H +#ifndef LIBDCP_REEL_TEXT_ASSET_H +#define LIBDCP_REEL_TEXT_ASSET_H #include "language_tag.h" @@ -56,14 +56,14 @@ namespace dcp { class SubtitleAsset; -/** @class ReelSubtitleAsset - * @brief Part of a Reel's description which refers to a subtitle XML/MXF file +/** @class ReelTextAsset + * @brief Part of a Reel's description which refers to a subtitle or caption XML/MXF file */ -class ReelSubtitleAsset : public ReelFileAsset +class ReelTextAsset : public ReelFileAsset { public: - ReelSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); - explicit ReelSubtitleAsset (std::shared_ptr<const cxml::Node>); + ReelTextAsset(std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); + explicit ReelTextAsset(std::shared_ptr<const cxml::Node>); std::shared_ptr<const SubtitleAsset> asset () const { return asset_of_type<const SubtitleAsset>(); @@ -75,7 +75,7 @@ public: xmlpp::Element* write_to_cpl(xmlpp::Element* node, Standard standard) const override; - bool equals(std::shared_ptr<const ReelSubtitleAsset>, EqualityOptions const&, NoteHandler) const; + bool equals(std::shared_ptr<const ReelTextAsset>, EqualityOptions const&, NoteHandler) const; void set_language (dcp::LanguageTag language); diff --git a/src/verify.cc b/src/verify.cc index 1e27514a..067ebfd2 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -48,12 +48,12 @@ #include "raw_convert.h" #include "reel.h" #include "reel_closed_caption_asset.h" -#include "reel_interop_subtitle_asset.h" +#include "reel_interop_text_asset.h" #include "reel_markers_asset.h" #include "reel_picture_asset.h" #include "reel_sound_asset.h" -#include "reel_smpte_subtitle_asset.h" -#include "reel_subtitle_asset.h" +#include "reel_smpte_text_asset.h" +#include "reel_text_asset.h" #include "smpte_subtitle_asset.h" #include "stereo_j2k_picture_asset.h" #include "stereo_j2k_picture_frame.h" @@ -722,7 +722,7 @@ verify_main_sound_asset(Context& context, shared_ptr<const ReelSoundAsset> reel_ static void -verify_main_subtitle_reel(Context& context, shared_ptr<const ReelSubtitleAsset> reel_asset) +verify_main_subtitle_reel(Context& context, shared_ptr<const ReelTextAsset> reel_asset) { /* XXX: is Language compulsory? */ if (reel_asset->language()) { diff --git a/src/verify_report.cc b/src/verify_report.cc index 632e2a04..bcbda1ff 100644 --- a/src/verify_report.cc +++ b/src/verify_report.cc @@ -39,7 +39,7 @@ #include "reel.h" #include "reel_picture_asset.h" #include "reel_sound_asset.h" -#include "reel_subtitle_asset.h" +#include "reel_text_asset.h" #include "verify.h" #include "verify_report.h" diff --git a/src/wscript b/src/wscript index 1793aa72..f7bced72 100644 --- a/src/wscript +++ b/src/wscript @@ -98,15 +98,15 @@ def build(bld): reel_closed_caption_asset.cc reel_file_asset.cc reel_interop_closed_caption_asset.cc - reel_interop_subtitle_asset.cc + reel_interop_text_asset.cc reel_markers_asset.cc reel_mono_picture_asset.cc reel_picture_asset.cc reel_smpte_closed_caption_asset.cc - reel_smpte_subtitle_asset.cc + reel_smpte_text_asset.cc reel_sound_asset.cc reel_stereo_picture_asset.cc - reel_subtitle_asset.cc + reel_text_asset.cc ref.cc rgb_xyz.cc ruby.cc @@ -215,15 +215,15 @@ def build(bld): reel_closed_caption_asset.h reel_file_asset.h reel_interop_closed_caption_asset.h - reel_interop_subtitle_asset.h + reel_interop_text_asset.h reel_markers_asset.h reel_mono_picture_asset.h reel_picture_asset.h reel_smpte_closed_caption_asset.h - reel_smpte_subtitle_asset.h + reel_smpte_text_asset.h reel_sound_asset.h reel_stereo_picture_asset.h - reel_subtitle_asset.h + reel_text_asset.h ref.h rgb_xyz.h ruby.h |
