X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fmxf_asset.h;h=763f405bdf687c2f52b894dcc2cb43cfc06b1372;hb=ad3d9f8bbe623f87e440bd6a5a12520361a7661f;hp=a23a052dafd91643b3c533eb22738a2b9efd06ea;hpb=c2bac22380bea453665a24c6f39200a977771daf;p=libdcp.git diff --git a/src/mxf_asset.h b/src/mxf_asset.h index a23a052d..763f405b 100644 --- a/src/mxf_asset.h +++ b/src/mxf_asset.h @@ -25,12 +25,14 @@ namespace ASDCP { class AESEncContext; + class AESDecContext; } namespace libdcp { class MXFMetadata; +class KDMCipher; /** @brief Parent class for assets which have MXF files */ class MXFAsset : public Asset @@ -59,6 +61,8 @@ public: virtual bool equals (boost::shared_ptr other, EqualityOptions opt, boost::function note) const; + virtual void write_to_cpl (xmlpp::Node *) const; + /** Fill in a ADSCP::WriteInfo struct. * @param w struct to fill in. * @param uuid uuid to use. @@ -66,9 +70,24 @@ public: void fill_writer_info (ASDCP::WriterInfo* w, std::string uuid, MXFMetadata const & metadata); void add_typed_key_id (xmlpp::Element *) const; + + std::string key_id () const { + return _key_id; + } + + void set_key_id (std::string k) { + _key_id = k; + } + + bool encrypted () const { + return !_key_id.empty (); + } + + void set_kdm_cipher (KDMCipher); protected: virtual std::string key_type () const = 0; + virtual std::string cpl_node_name () const = 0; /** Signal to emit to report progress, or 0 */ boost::signals2::signal* _progress; @@ -76,6 +95,7 @@ protected: ASDCP::AESEncContext* _encryption_context; std::string _key_value; std::string _key_id; + ASDCP::AESDecContext* _decryption_context; }; }