summaryrefslogtreecommitdiff
path: root/src/reel_closed_caption_asset.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-13 23:50:28 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-13 23:50:28 +0200
commit4bd57fbbac67ac04ec47a9765b9f278aa1691851 (patch)
tree55a607e6ac16fa52f69522312f2464443fac5aeb /src/reel_closed_caption_asset.h
parent488e3d1bd5e6b17d49f6db4df14c64f4b64db89b (diff)
Tidying a few things up.
Diffstat (limited to 'src/reel_closed_caption_asset.h')
-rw-r--r--src/reel_closed_caption_asset.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/reel_closed_caption_asset.h b/src/reel_closed_caption_asset.h
index a1f3b6ec..78e05659 100644
--- a/src/reel_closed_caption_asset.h
+++ b/src/reel_closed_caption_asset.h
@@ -62,12 +62,16 @@ public:
ReelClosedCaptionAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point);
explicit ReelClosedCaptionAsset (std::shared_ptr<const cxml::Node>);
- bool equals (std::shared_ptr<const ReelClosedCaptionAsset>, EqualityOptions, NoteHandler) const;
+ std::shared_ptr<const SubtitleAsset> asset () const {
+ return asset_of_type<const SubtitleAsset>();
+ }
- std::shared_ptr<SubtitleAsset> asset () const {
- return std::dynamic_pointer_cast<SubtitleAsset>(_asset_ref.asset());
+ std::shared_ptr<SubtitleAsset> asset () {
+ return asset_of_type<SubtitleAsset>();
}
+ bool equals (std::shared_ptr<const ReelClosedCaptionAsset>, EqualityOptions, NoteHandler) const;
+
void set_language (dcp::LanguageTag l) {
_language = l.to_string();
}