diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/reel_interop_text_asset.cc | 6 | ||||
| -rw-r--r-- | src/reel_interop_text_asset.h | 2 | ||||
| -rw-r--r-- | src/reel_mono_picture_asset.cc | 8 | ||||
| -rw-r--r-- | src/reel_mono_picture_asset.h | 2 | ||||
| -rw-r--r-- | src/reel_picture_asset.h | 2 | ||||
| -rw-r--r-- | src/reel_smpte_text_asset.cc | 7 | ||||
| -rw-r--r-- | src/reel_smpte_text_asset.h | 2 | ||||
| -rw-r--r-- | src/reel_sound_asset.cc | 7 | ||||
| -rw-r--r-- | src/reel_sound_asset.h | 2 | ||||
| -rw-r--r-- | src/reel_stereo_picture_asset.cc | 7 | ||||
| -rw-r--r-- | src/reel_stereo_picture_asset.h | 2 | ||||
| -rw-r--r-- | src/reel_text_asset.h | 2 |
12 files changed, 49 insertions, 0 deletions
diff --git a/src/reel_interop_text_asset.cc b/src/reel_interop_text_asset.cc index 0f99b614..35bf1d6e 100644 --- a/src/reel_interop_text_asset.cc +++ b/src/reel_interop_text_asset.cc @@ -47,6 +47,7 @@ LIBDCP_ENABLE_WARNINGS using std::make_pair; using std::pair; +using std::shared_ptr; using std::string; using boost::optional; using namespace dcp; @@ -113,3 +114,8 @@ ReelInteropTextAsset::write_to_cpl(xmlpp::Element* node, Standard standard) cons } +shared_ptr<ReelTextAsset> +ReelInteropTextAsset::clone() const +{ + return std::make_shared<ReelInteropTextAsset>(*this); +} diff --git a/src/reel_interop_text_asset.h b/src/reel_interop_text_asset.h index 4c0648e4..70a8069f 100644 --- a/src/reel_interop_text_asset.h +++ b/src/reel_interop_text_asset.h @@ -63,6 +63,8 @@ public: xmlpp::Element* write_to_cpl(xmlpp::Element* node, Standard standard) const override; + virtual std::shared_ptr<ReelTextAsset> clone() const override; + protected: std::string cpl_node_name() const override; std::pair<std::string, std::string> cpl_node_namespace() const override; diff --git a/src/reel_mono_picture_asset.cc b/src/reel_mono_picture_asset.cc index a79abaa1..7cf3643a 100644 --- a/src/reel_mono_picture_asset.cc +++ b/src/reel_mono_picture_asset.cc @@ -77,3 +77,11 @@ ReelMonoPictureAsset::can_be_read() const return asset()->can_be_read(); } + + +shared_ptr<ReelPictureAsset> +ReelMonoPictureAsset::clone() const +{ + return std::make_shared<ReelMonoPictureAsset>(*this); +} + diff --git a/src/reel_mono_picture_asset.h b/src/reel_mono_picture_asset.h index 29df2d14..add85154 100644 --- a/src/reel_mono_picture_asset.h +++ b/src/reel_mono_picture_asset.h @@ -83,6 +83,8 @@ public: return asset_of_type<MonoMPEG2PictureAsset>(); } + std::shared_ptr<ReelPictureAsset> clone() const override; + private: std::string cpl_node_name() const override; }; diff --git a/src/reel_picture_asset.h b/src/reel_picture_asset.h index 9f42a5b6..b400b60e 100644 --- a/src/reel_picture_asset.h +++ b/src/reel_picture_asset.h @@ -90,6 +90,8 @@ public: virtual xmlpp::Element* write_to_cpl(xmlpp::Element* node, Standard standard) const override; + virtual std::shared_ptr<ReelPictureAsset> clone() const = 0; + bool equals(std::shared_ptr<const ReelPictureAsset>, EqualityOptions const&, NoteHandler) const; /** @return picture frame rate */ diff --git a/src/reel_smpte_text_asset.cc b/src/reel_smpte_text_asset.cc index 30a4d443..23b52c8f 100644 --- a/src/reel_smpte_text_asset.cc +++ b/src/reel_smpte_text_asset.cc @@ -127,3 +127,10 @@ ReelSMPTETextAsset::can_be_read() const return smpte_asset()->can_be_read(); } + +shared_ptr<ReelTextAsset> +ReelSMPTETextAsset::clone() const +{ + return std::make_shared<ReelSMPTETextAsset>(*this); +} + diff --git a/src/reel_smpte_text_asset.h b/src/reel_smpte_text_asset.h index 68459c30..e472aa71 100644 --- a/src/reel_smpte_text_asset.h +++ b/src/reel_smpte_text_asset.h @@ -68,6 +68,8 @@ public: xmlpp::Element* write_to_cpl(xmlpp::Element* node, Standard standard) const override; + virtual std::shared_ptr<ReelTextAsset> clone() const override; + protected: std::string cpl_node_name() const override; std::pair<std::string, std::string> cpl_node_namespace() const override; diff --git a/src/reel_sound_asset.cc b/src/reel_sound_asset.cc index 9e03ae18..2b123a2d 100644 --- a/src/reel_sound_asset.cc +++ b/src/reel_sound_asset.cc @@ -112,3 +112,10 @@ ReelSoundAsset::can_be_read() const return asset()->can_be_read(); } + +shared_ptr<ReelSoundAsset> +ReelSoundAsset::clone() const +{ + return std::make_shared<ReelSoundAsset>(*this); +} + diff --git a/src/reel_sound_asset.h b/src/reel_sound_asset.h index 57792907..e2bbb53c 100644 --- a/src/reel_sound_asset.h +++ b/src/reel_sound_asset.h @@ -68,6 +68,8 @@ public: return asset_of_type<SoundAsset>(); } + virtual std::shared_ptr<ReelSoundAsset> clone() const; + bool equals(std::shared_ptr<const ReelSoundAsset>, EqualityOptions const&, NoteHandler) const; private: diff --git a/src/reel_stereo_picture_asset.cc b/src/reel_stereo_picture_asset.cc index 53abb8d6..949ad9fe 100644 --- a/src/reel_stereo_picture_asset.cc +++ b/src/reel_stereo_picture_asset.cc @@ -95,3 +95,10 @@ ReelStereoPictureAsset::can_be_read() const return asset()->can_be_read(); } + +shared_ptr<ReelPictureAsset> +ReelStereoPictureAsset::clone() const +{ + return std::make_shared<ReelStereoPictureAsset>(*this); +} + diff --git a/src/reel_stereo_picture_asset.h b/src/reel_stereo_picture_asset.h index 9e5b30cf..834b1eeb 100644 --- a/src/reel_stereo_picture_asset.h +++ b/src/reel_stereo_picture_asset.h @@ -72,6 +72,8 @@ public: return asset_of_type<StereoJ2KPictureAsset>(); } + std::shared_ptr<ReelPictureAsset> clone() const override; + private: std::string cpl_node_name() const override; std::pair<std::string, std::string> cpl_node_attribute (Standard standard) const override; diff --git a/src/reel_text_asset.h b/src/reel_text_asset.h index 35efe941..9bbea1f7 100644 --- a/src/reel_text_asset.h +++ b/src/reel_text_asset.h @@ -75,6 +75,8 @@ public: return asset_of_type<TextAsset>(); } + virtual std::shared_ptr<ReelTextAsset> clone() const = 0; + bool equals(std::shared_ptr<const ReelTextAsset>, EqualityOptions const&, NoteHandler) const; void set_language (dcp::LanguageTag language); |
