summaryrefslogtreecommitdiff
path: root/src/cpl.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-01-04 21:28:36 +0000
committerCarl Hetherington <cth@carlh.net>2016-01-04 21:28:36 +0000
commit11438c8a93dfcf1c0febe7aeb888b4d94cf67e8f (patch)
treeabb08f929eb9e6c122a4f12c08fc335d03574a86 /src/cpl.h
parentb13403b9098b115b9b4f57a771aff92a33610116 (diff)
Various development of IMF.
Diffstat (limited to 'src/cpl.h')
-rw-r--r--src/cpl.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/cpl.h b/src/cpl.h
index 69b16368..35dbe8ab 100644
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -18,6 +18,8 @@
*/
#include "asset.h"
+#include "metadata.h"
+#include <libcxml/cxml.h>
namespace dcp
{
@@ -28,14 +30,34 @@ class CPL : public Asset
{
public:
CPL ();
+ CPL (ContentKind content_kind);
CPL (boost::filesystem::path file);
+ void set_metadata (XMLMetadata m) {
+ _metadata = m;
+ }
+
+ /** @return the type of the content, used by media servers
+ * to categorise things (e.g. feature, trailer, etc.)
+ */
+ ContentKind content_kind () const {
+ return _content_kind;
+ }
+
virtual void resolve_refs (std::list<boost::shared_ptr<Asset> >) = 0;
virtual int64_t duration () const = 0;
virtual bool encrypted () const = 0;
virtual void add (DecryptedKDM const &) = 0;
/** @return string to use for AnnotationText in a PKL */
virtual std::string pkl_annotation () const = 0;
+
+protected:
+ boost::shared_ptr<cxml::Document> read_common (boost::filesystem::path file);
+ /** &lt;Issuer&gt;, &lt;Creator&gt; and &lt;IssueDate&gt;. These are grouped
+ * because they occur together in a few places.
+ */
+ XMLMetadata _metadata;
+ ContentKind _content_kind; ///< &lt;ContentKind&gt;
};
};