X-Git-Url: https://main.carlh.net/gitweb/?p=libdcp.git;a=blobdiff_plain;f=src%2Freel_file_asset.h;h=6ef917abf79f5f8b9ad5f4f6f0d787f84e8ee165;hp=042f94b4852b5572ed9d31347d96d189e4042145;hb=488e3d1bd5e6b17d49f6db4df14c64f4b64db89b;hpb=51ae14c7e304d4fbc8d7524d584f3f4762d51f67 diff --git a/src/reel_file_asset.h b/src/reel_file_asset.h index 042f94b4..6ef917ab 100644 --- a/src/reel_file_asset.h +++ b/src/reel_file_asset.h @@ -53,9 +53,11 @@ namespace dcp { class ReelFileAsset : public ReelAsset { public: - ReelFileAsset (std::shared_ptr asset, std::string id, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); + ReelFileAsset (std::shared_ptr asset, boost::optional key_id, std::string id, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); explicit ReelFileAsset (std::shared_ptr node); + virtual xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const override; + /** @return a Ref to our actual asset */ Ref const & asset_ref () const { return _asset_ref; @@ -79,6 +81,22 @@ public: bool file_asset_equals (std::shared_ptr other, EqualityOptions opt, NoteHandler note) const; + virtual boost::optional key_type () const { + return boost::none; + } + + bool encryptable () const override { + return static_cast(key_type()); + } + + boost::optional key_id () const { + return _key_id; + } + + bool encrypted () const { + return static_cast(key_id()); + } + protected: template @@ -98,6 +116,7 @@ protected: /** Either our asset's computed hash or the hash read in from the CPL, if it's present */ boost::optional _hash; + boost::optional _key_id; ///< The <KeyId> from the reel's entry for this asset, if there is one };