diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-01-31 18:21:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-01-31 18:21:48 +0100 |
| commit | ebcc22dc9db55f762f35b9c408163df847ba804f (patch) | |
| tree | b5aa1bc2a3b77097e0eb506f844bf2ac1fb6852c | |
| parent | db15020d516c2d2ea36c10261a22a7da9c4a60ed (diff) | |
Add some new constructors.
| -rw-r--r-- | src/reel_file_asset.cc | 10 | ||||
| -rw-r--r-- | src/reel_file_asset.h | 1 | ||||
| -rw-r--r-- | src/reel_sound_asset.cc | 7 | ||||
| -rw-r--r-- | src/reel_sound_asset.h | 1 |
4 files changed, 19 insertions, 0 deletions
diff --git a/src/reel_file_asset.cc b/src/reel_file_asset.cc index ad534ebd..f564d8d9 100644 --- a/src/reel_file_asset.cc +++ b/src/reel_file_asset.cc @@ -52,6 +52,16 @@ using boost::optional; using namespace dcp; +ReelFileAsset::ReelFileAsset(boost::optional<std::string> key_id, std::string id, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point, optional<string> hash) + : ReelAsset(id, edit_rate, intrinsic_duration, entry_point) + , _asset_ref(id) + , _hash(hash) + , _key_id(key_id) +{ + +} + + ReelFileAsset::ReelFileAsset (shared_ptr<Asset> asset, optional<string> key_id, 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) diff --git a/src/reel_file_asset.h b/src/reel_file_asset.h index 2412ac2b..a109e1ab 100644 --- a/src/reel_file_asset.h +++ b/src/reel_file_asset.h @@ -53,6 +53,7 @@ namespace dcp { class ReelFileAsset : public ReelAsset { public: + ReelFileAsset(boost::optional<std::string> key_id, std::string id, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point, boost::optional<std::string> hash); ReelFileAsset (std::shared_ptr<Asset> asset, boost::optional<std::string> key_id, std::string id, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); explicit ReelFileAsset (std::shared_ptr<const cxml::Node> node); diff --git a/src/reel_sound_asset.cc b/src/reel_sound_asset.cc index 3c11f666..8b1bd97a 100644 --- a/src/reel_sound_asset.cc +++ b/src/reel_sound_asset.cc @@ -52,6 +52,13 @@ using boost::optional; using namespace dcp; +ReelSoundAsset::ReelSoundAsset(std::string id, dcp::Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point, boost::optional<std::string> hash, boost::optional<std::string> key_id) + : ReelFileAsset(key_id, id, edit_rate, intrinsic_duration, entry_point, hash) +{ + +} + + ReelSoundAsset::ReelSoundAsset (shared_ptr<SoundAsset> asset, int64_t entry_point) : ReelFileAsset (asset, asset->key_id(), asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) { diff --git a/src/reel_sound_asset.h b/src/reel_sound_asset.h index ac157bdb..c7175a59 100644 --- a/src/reel_sound_asset.h +++ b/src/reel_sound_asset.h @@ -52,6 +52,7 @@ namespace dcp { class ReelSoundAsset : public ReelFileAsset { public: + ReelSoundAsset(std::string id, dcp::Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point, boost::optional<std::string> hash, boost::optional<std::string> key_id); ReelSoundAsset (std::shared_ptr<dcp::SoundAsset> content, int64_t entry_point); explicit ReelSoundAsset (std::shared_ptr<const cxml::Node>); |
