diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-04-13 01:38:56 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-04-13 01:38:56 +0200 |
| commit | 51ae14c7e304d4fbc8d7524d584f3f4762d51f67 (patch) | |
| tree | 3c27f3924ddb4b982338384ae759e858d6cc697b /src | |
| parent | ee23803a3dced33ae93346dd1e5cb6453d873023 (diff) | |
Make ReelAsset the parent of ReelFileAsset.
Diffstat (limited to 'src')
| -rw-r--r-- | src/reel_atmos_asset.cc | 6 | ||||
| -rw-r--r-- | src/reel_atmos_asset.h | 2 | ||||
| -rw-r--r-- | src/reel_closed_caption_asset.cc | 6 | ||||
| -rw-r--r-- | src/reel_closed_caption_asset.h | 2 | ||||
| -rw-r--r-- | src/reel_file_asset.cc | 8 | ||||
| -rw-r--r-- | src/reel_file_asset.h | 9 | ||||
| -rw-r--r-- | src/reel_picture_asset.cc | 6 | ||||
| -rw-r--r-- | src/reel_picture_asset.h | 2 | ||||
| -rw-r--r-- | src/reel_sound_asset.cc | 6 | ||||
| -rw-r--r-- | src/reel_sound_asset.h | 2 | ||||
| -rw-r--r-- | src/reel_subtitle_asset.cc | 6 | ||||
| -rw-r--r-- | src/reel_subtitle_asset.h | 2 |
12 files changed, 25 insertions, 32 deletions
diff --git a/src/reel_atmos_asset.cc b/src/reel_atmos_asset.cc index 32ebbcf5..b17dceca 100644 --- a/src/reel_atmos_asset.cc +++ b/src/reel_atmos_asset.cc @@ -51,8 +51,7 @@ using namespace dcp; ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<AtmosAsset> asset, int64_t entry_point) - : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) - , ReelFileAsset (asset) + : ReelFileAsset (asset, asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) , ReelEncryptableAsset (asset->key_id()) { @@ -60,8 +59,7 @@ ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<AtmosAsset> asset, int64_t entry ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<const cxml::Node> node) - : ReelAsset (node) - , ReelFileAsset (node) + : ReelFileAsset (node) , ReelEncryptableAsset (node) { node->ignore_child ("DataType"); diff --git a/src/reel_atmos_asset.h b/src/reel_atmos_asset.h index 6f452c3a..8aaf6a59 100644 --- a/src/reel_atmos_asset.h +++ b/src/reel_atmos_asset.h @@ -55,7 +55,7 @@ class AtmosAsset; /** @class ReelAtmosAsset * @brief Part of a Reel's description which refers to a Atmos MXF */ -class ReelAtmosAsset : public ReelAsset, public ReelFileAsset, public ReelEncryptableAsset +class ReelAtmosAsset : public ReelFileAsset, public ReelEncryptableAsset { public: ReelAtmosAsset (std::shared_ptr<AtmosAsset> asset, int64_t entry_point); diff --git a/src/reel_closed_caption_asset.cc b/src/reel_closed_caption_asset.cc index a29d6e37..4ba6fe0c 100644 --- a/src/reel_closed_caption_asset.cc +++ b/src/reel_closed_caption_asset.cc @@ -54,16 +54,14 @@ using namespace dcp; ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) - : ReelAsset (asset->id(), edit_rate, intrinsic_duration, entry_point) - , ReelFileAsset (asset) + : ReelFileAsset (asset, asset->id(), edit_rate, intrinsic_duration, entry_point) { } ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr<const cxml::Node> node) - : ReelAsset (node) - , ReelFileAsset (node) + : ReelFileAsset (node) { _language = node->optional_string_child ("Language"); } diff --git a/src/reel_closed_caption_asset.h b/src/reel_closed_caption_asset.h index 44ae83f3..a1f3b6ec 100644 --- a/src/reel_closed_caption_asset.h +++ b/src/reel_closed_caption_asset.h @@ -56,7 +56,7 @@ namespace dcp { /** @class ReelClosedCaptionAsset * @brief Part of a Reel's description which refers to a closed caption XML/MXF file */ -class ReelClosedCaptionAsset : public ReelAsset, public ReelFileAsset +class ReelClosedCaptionAsset : public ReelFileAsset { public: ReelClosedCaptionAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point); diff --git a/src/reel_file_asset.cc b/src/reel_file_asset.cc index a55e084e..85bf9de7 100644 --- a/src/reel_file_asset.cc +++ b/src/reel_file_asset.cc @@ -45,8 +45,9 @@ using std::shared_ptr; using namespace dcp; -ReelFileAsset::ReelFileAsset (shared_ptr<Asset> asset) - : _asset_ref (asset) +ReelFileAsset::ReelFileAsset (shared_ptr<Asset> asset, std::string id, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) + : ReelAsset (id, edit_rate, intrinsic_duration, entry_point) + , _asset_ref (asset) , _hash (asset->hash()) { @@ -54,7 +55,8 @@ ReelFileAsset::ReelFileAsset (shared_ptr<Asset> asset) ReelFileAsset::ReelFileAsset (shared_ptr<const cxml::Node> node) - : _asset_ref (remove_urn_uuid(node->string_child("Id"))) + : ReelAsset (node) + , _asset_ref (remove_urn_uuid(node->string_child("Id"))) , _hash (node->optional_string_child ("Hash")) { diff --git a/src/reel_file_asset.h b/src/reel_file_asset.h index 070a3e0f..042f94b4 100644 --- a/src/reel_file_asset.h +++ b/src/reel_file_asset.h @@ -41,6 +41,7 @@ #define LIBDCP_REEL_FILE_ASSET_H +#include "reel_asset.h" #include "ref.h" #include <boost/optional.hpp> #include <string> @@ -49,10 +50,10 @@ namespace dcp { -class ReelFileAsset +class ReelFileAsset : public ReelAsset { public: - explicit ReelFileAsset (std::shared_ptr<Asset> asset); + ReelFileAsset (std::shared_ptr<Asset> asset, std::string id, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); explicit ReelFileAsset (std::shared_ptr<const cxml::Node> node); /** @return a Ref to our actual asset */ @@ -82,12 +83,12 @@ protected: template <class T> std::shared_ptr<T> asset_of_type () const { - return std::dynamic_pointer_cast<T> (_asset_ref.asset ()); + return std::dynamic_pointer_cast<T>(_asset_ref.asset()); } template <class T> std::shared_ptr<T> asset_of_type () { - return std::dynamic_pointer_cast<T> (_asset_ref.asset ()); + return std::dynamic_pointer_cast<T>(_asset_ref.asset()); } /** Reference to the asset (MXF or XML file) that this reel entry diff --git a/src/reel_picture_asset.cc b/src/reel_picture_asset.cc index 8b439003..ddc6a802 100644 --- a/src/reel_picture_asset.cc +++ b/src/reel_picture_asset.cc @@ -57,8 +57,7 @@ using namespace dcp; ReelPictureAsset::ReelPictureAsset (shared_ptr<PictureAsset> asset, int64_t entry_point) - : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) - , ReelFileAsset (asset) + : ReelFileAsset (asset, asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) , ReelEncryptableAsset (asset->key_id()) , _frame_rate (asset->frame_rate ()) , _screen_aspect_ratio (asset->screen_aspect_ratio ()) @@ -68,8 +67,7 @@ ReelPictureAsset::ReelPictureAsset (shared_ptr<PictureAsset> asset, int64_t entr ReelPictureAsset::ReelPictureAsset (shared_ptr<const cxml::Node> node) - : ReelAsset (node) - , ReelFileAsset (node) + : ReelFileAsset (node) , ReelEncryptableAsset (node) { _frame_rate = Fraction (node->string_child ("FrameRate")); diff --git a/src/reel_picture_asset.h b/src/reel_picture_asset.h index 3d98b09d..6eb01bc9 100644 --- a/src/reel_picture_asset.h +++ b/src/reel_picture_asset.h @@ -52,7 +52,7 @@ namespace dcp { /** @class ReelPictureAsset * @brief Part of a Reel's description which refers to a picture asset */ -class ReelPictureAsset : public ReelAsset, public ReelFileAsset, public ReelEncryptableAsset +class ReelPictureAsset : public ReelFileAsset, public ReelEncryptableAsset { public: ReelPictureAsset (std::shared_ptr<PictureAsset> asset, int64_t entry_point); diff --git a/src/reel_sound_asset.cc b/src/reel_sound_asset.cc index 7ca2b2da..9cf672df 100644 --- a/src/reel_sound_asset.cc +++ b/src/reel_sound_asset.cc @@ -49,8 +49,7 @@ using namespace dcp; ReelSoundAsset::ReelSoundAsset (shared_ptr<SoundAsset> asset, int64_t entry_point) - : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) - , ReelFileAsset (asset) + : ReelFileAsset (asset, asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) , ReelEncryptableAsset (asset->key_id()) { @@ -58,8 +57,7 @@ ReelSoundAsset::ReelSoundAsset (shared_ptr<SoundAsset> asset, int64_t entry_poin ReelSoundAsset::ReelSoundAsset (shared_ptr<const cxml::Node> node) - : ReelAsset (node) - , ReelFileAsset (node) + : ReelFileAsset (node) , ReelEncryptableAsset (node) { node->ignore_child ("Language"); diff --git a/src/reel_sound_asset.h b/src/reel_sound_asset.h index c5619ad9..bf686ec9 100644 --- a/src/reel_sound_asset.h +++ b/src/reel_sound_asset.h @@ -50,7 +50,7 @@ namespace dcp { /** @class ReelSoundAsset * @brief Part of a Reel's description which refers to a sound asset */ -class ReelSoundAsset : public ReelAsset, public ReelFileAsset, public ReelEncryptableAsset +class ReelSoundAsset : public ReelFileAsset, public ReelEncryptableAsset { public: ReelSoundAsset (std::shared_ptr<dcp::SoundAsset> content, int64_t entry_point); diff --git a/src/reel_subtitle_asset.cc b/src/reel_subtitle_asset.cc index 0981d1c0..9c683caa 100644 --- a/src/reel_subtitle_asset.cc +++ b/src/reel_subtitle_asset.cc @@ -52,16 +52,14 @@ using namespace dcp; ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) - : ReelAsset (asset->id(), edit_rate, intrinsic_duration, entry_point) - , ReelFileAsset (asset) + : ReelFileAsset (asset, asset->id(), edit_rate, intrinsic_duration, entry_point) { } ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<const cxml::Node> node) - : ReelAsset (node) - , ReelFileAsset (node) + : ReelFileAsset (node) { _language = node->optional_string_child("Language"); } diff --git a/src/reel_subtitle_asset.h b/src/reel_subtitle_asset.h index ad1ea6cd..fd4c5cd1 100644 --- a/src/reel_subtitle_asset.h +++ b/src/reel_subtitle_asset.h @@ -59,7 +59,7 @@ class SubtitleAsset; /** @class ReelSubtitleAsset * @brief Part of a Reel's description which refers to a subtitle XML/MXF file */ -class ReelSubtitleAsset : public ReelAsset, public ReelFileAsset +class ReelSubtitleAsset : public ReelFileAsset { public: ReelSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); |
