X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fcpl.h;h=95bcd03fb8d9ee217ee0b32f8da97806bf851b4f;hb=127c14300f1d2df9fc2b9dd4ffb5218ea6a717c3;hp=3f4835047205e6951c18cef4d66a2839da622dfe;hpb=2e64e69c8d7836d14e059c474bb6bd667e7bb52f;p=libdcp.git diff --git a/src/cpl.h b/src/cpl.h index 3f483504..95bcd03f 100644 --- a/src/cpl.h +++ b/src/cpl.h @@ -17,10 +17,14 @@ */ +#ifndef LIBDCP_CPL_H +#define LIBDCP_CPL_H + #include #include #include #include +#include #include #include "types.h" #include "certificates.h" @@ -29,6 +33,7 @@ namespace libdcp { namespace parse { class AssetMap; + class AssetMapAsset; } class Asset; @@ -36,15 +41,16 @@ class Reel; class XMLMetadata; class MXFMetadata; class Encryption; +class KDM; /** @brief A CPL within a DCP */ class CPL { public: CPL (std::string directory, std::string name, ContentKind content_kind, int length, int frames_per_second); - CPL (std::string directory, std::string file, boost::shared_ptr asset_map, bool require_mxfs = true); + CPL (std::string directory, std::string file, std::list asset_maps, bool require_mxfs = true); - void add_reel (boost::shared_ptr reel); + void add_reel (boost::shared_ptr reel); /** @return the length in frames */ int length () const { @@ -58,7 +64,7 @@ public: return _content_kind; } - std::list > reels () const { + std::list > reels () const { return _reels; } @@ -75,10 +81,16 @@ public: } std::list > assets () const; + + bool encrypted () const; + + std::string id () const { + return _id; + } bool equals (CPL const & other, EqualityOptions options, boost::function note) const; - void write_xml (XMLMetadata const &, boost::shared_ptr) const; + void write_xml (bool, XMLMetadata const &, boost::shared_ptr) const; void write_to_assetmap (xmlpp::Node *) const; void write_to_pkl (xmlpp::Node *) const; @@ -88,11 +100,16 @@ public: boost::shared_ptr, boost::posix_time::ptime from, boost::posix_time::ptime until, + bool, MXFMetadata const &, XMLMetadata const & ) const; + + void add_kdm (KDM const &); private: + std::pair > asset_from_id (std::list, std::string id) const; + std::string _directory; /** the name of the DCP */ std::string _name; @@ -103,12 +120,14 @@ private: /** frames per second */ int _fps; /** reels */ - std::list > _reels; + std::list > _reels; /** our UUID */ - std::string _uuid; + std::string _id; /** a SHA1 digest of our XML */ mutable std::string _digest; }; } + +#endif