summaryrefslogtreecommitdiff
path: root/src/cpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpl.h')
-rw-r--r--src/cpl.h60
1 files changed, 19 insertions, 41 deletions
diff --git a/src/cpl.h b/src/cpl.h
index cffd4404..6b59c53d 100644
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -25,6 +25,7 @@
#include <boost/function.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/optional.hpp>
+#include <boost/filesystem.hpp>
#include <libxml++/libxml++.h>
#include "types.h"
#include "certificates.h"
@@ -42,45 +43,25 @@ class XMLMetadata;
class MXFMetadata;
class Encryption;
class KDM;
+class ContentVersion;
/** @brief A CPL within a DCP */
class CPL
{
public:
- CPL (std::string directory, std::string name, ContentKind content_kind);
- CPL (std::string directory, std::string file, std::list<PathAssetMap> asset_maps, bool require_mxfs = true);
+ /** Create a new CPL */
+ CPL ();
- void add_reel (boost::shared_ptr<Reel> reel);
-
- /** @return the type of the content, used by media servers
- * to categorise things (e.g. feature, trailer, etc.)
+ /** Read a CPL from an XML file.
+ * @param file File to read.
*/
- ContentKind content_kind () const {
- return _content_kind;
- }
-
- std::list<boost::shared_ptr<Reel> > reels () const {
- return _reels;
- }
-
- /** @return the CPL's name, as will be presented on projector
- * media servers and theatre management systems.
- */
- std::string name () const {
- return _name;
- }
-
- std::list<boost::shared_ptr<const Asset> > assets () const;
+ CPL (boost::filesystem::path file);
bool encrypted () const;
- std::string id () const {
- return _id;
- }
+ bool equals (boost::shared_ptr<const CPL> other, EqualityOptions options, boost::function<void (NoteType, std::string)> note) const;
- bool equals (CPL const & other, EqualityOptions options, boost::function<void (NoteType, std::string)> note) const;
-
- void write_xml (bool, XMLMetadata const &, boost::shared_ptr<Encryption>) const;
+ void write_xml (boost::filesystem::path directory, bool interop, boost::shared_ptr<Encryption>) const;
void write_to_assetmap (xmlpp::Node *) const;
void write_to_pkl (xmlpp::Node *) const;
@@ -96,21 +77,18 @@ public:
) const;
void add_kdm (KDM const &);
+
+ std::string id;
+ std::string annotation_text;
+ std::string issue_date;
+ std::string issuer;
+ std::string creator;
+ std::string content_title_text;
+ ContentKind content_kind;
+ boost::shared_ptr<ContentVersion> content_version;
+ std::list<boost::shared_ptr<Reel> > reels;
private:
- std::pair<std::string, boost::shared_ptr<const parse::AssetMapAsset> > asset_from_id (std::list<PathAssetMap>, std::string id) const;
-
- std::string _directory;
- /** the name of the DCP */
- std::string _name;
- /** the content kind of the CPL */
- ContentKind _content_kind;
- /** reels */
- std::list<boost::shared_ptr<Reel> > _reels;
-
- /** our UUID */
- std::string _id;
-
/* XXX: nasty */
/** a SHA1 digest of our XML */
mutable std::string _digest;