X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fmxf_asset.h;h=b71442817a8bf9b023bbfdd70c65ff5dc563ab9d;hb=81450a3f659c466ba178a1173fbd79465f3060d5;hp=e566c32c7afde49262594434732f108fff7ec54c;hpb=e563727ee7b72881ee163db9b777559c8ceb5074;p=libdcp.git diff --git a/src/mxf_asset.h b/src/mxf_asset.h index e566c32c..b7144281 100644 --- a/src/mxf_asset.h +++ b/src/mxf_asset.h @@ -23,6 +23,7 @@ #include #include "asset.h" #include "key.h" +#include "metadata.h" namespace ASDCP { class AESEncContext; @@ -46,29 +47,12 @@ public: */ MXFAsset (boost::filesystem::path directory, std::string file_name); - /** Construct an MXFAsset. - * This class will not write anything to disk in this constructor, but subclasses may. - * - * @param directory Directory where MXF file is. - * @param file_name Name of MXF file. - * @param progress Signal to use to inform of progress, or 0. - * @param edit_rate Edit rate in frames per second (usually equal to the video frame rate). - * @param intrinsic_duration Duration of the whole asset in frames. - */ - MXFAsset ( - boost::filesystem::path directory, - std::string file_name, - boost::signals2::signal* progress, - int edit_rate, - int intrinsic_duration - ); - ~MXFAsset (); virtual bool equals (boost::shared_ptr other, EqualityOptions opt, boost::function note) const; - virtual void write_to_cpl (xmlpp::Element *, bool interop) const; - + virtual std::string key_type () const = 0; + /** Fill in a ADSCP::WriteInfo struct. * @param w struct to fill in. * @param uuid uuid to use. @@ -76,6 +60,10 @@ public: */ void fill_writer_info (ASDCP::WriterInfo* w, std::string uuid, bool interop, MXFMetadata const & metadata); + void set_progress (boost::signals2::signal* progress) { + _progress = progress; + } + bool encrypted () const { return !_key_id.empty (); } @@ -98,8 +86,22 @@ public: return _encryption_context; } - virtual std::string key_type () const = 0; - + void set_metadata (MXFMetadata m) { + _metadata = m; + } + + MXFMetadata metadata () const { + return _metadata; + } + + void set_interop (bool i) { + _interop = i; + } + + bool interop () const { + return _interop; + } + protected: virtual std::string cpl_node_name () const = 0; virtual std::pair cpl_node_attribute (bool) const { @@ -112,6 +114,8 @@ protected: ASDCP::AESDecContext* _decryption_context; std::string _key_id; boost::optional _key; + MXFMetadata _metadata; + bool _interop; }; }