diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-06-28 20:12:51 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-08-17 12:57:31 +0200 |
| commit | 06c28c700f0a398a3289c4adfa83ceb2d0fc999d (patch) | |
| tree | 00b58dcb854767d037e166a804360b4c19e034e9 /src/reel_text_asset.h | |
| parent | b64644327bff333569bf4a60f1d7c3d46f058b48 (diff) | |
Merge ReelClosedCaptionAsset into ReelTextAsset.
Diffstat (limited to 'src/reel_text_asset.h')
| -rw-r--r-- | src/reel_text_asset.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/reel_text_asset.h b/src/reel_text_asset.h index 63962155..cf904921 100644 --- a/src/reel_text_asset.h +++ b/src/reel_text_asset.h @@ -45,9 +45,11 @@ #include "reel_asset.h" #include "reel_file_asset.h" #include "subtitle_asset.h" +#include "text_type.h" struct verify_invalid_language1; +struct verify_invalid_language2; namespace dcp { @@ -62,7 +64,7 @@ class SubtitleAsset; class ReelTextAsset : public ReelFileAsset { public: - ReelTextAsset(std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); + ReelTextAsset(TextType type, 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 { @@ -73,8 +75,6 @@ public: return asset_of_type<SubtitleAsset>(); } - xmlpp::Element* write_to_cpl(xmlpp::Element* node, Standard standard) const override; - bool equals(std::shared_ptr<const ReelTextAsset>, EqualityOptions const&, NoteHandler) const; void set_language (dcp::LanguageTag language); @@ -83,17 +83,20 @@ public: return _language; } + TextType type() const { + return _type; + } + protected: + friend struct ::verify_invalid_language1; + friend struct ::verify_invalid_language2; + /** As in other places, this is stored and returned as a string so that * we can tolerate non-RFC-5646 strings, but must be set as a dcp::LanguageTag * to try to ensure that we create compliant output. */ boost::optional<std::string> _language; - -private: - friend struct ::verify_invalid_language1; - - std::string cpl_node_name (Standard standard) const override; + TextType _type; }; |
