/*
- Copyright (C) 2014-2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2020 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
files in the program, then also delete it here.
*/
+
/** @file src/cpl.h
* @brief CPL class.
*/
+
#ifndef LIBDCP_CPL_H
#define LIBDCP_CPL_H
-#include "types.h"
+
+#include "asset.h"
#include "certificate.h"
#include "key.h"
-#include "asset.h"
-#include <boost/shared_ptr.hpp>
+#include "types.h"
+#include <boost/filesystem.hpp>
#include <boost/function.hpp>
#include <boost/optional.hpp>
-#include <boost/filesystem.hpp>
+#include <boost/shared_ptr.hpp>
#include <list>
+
namespace dcp {
+
class ReelMXF;
class Reel;
class MXFMetadata;
class CertificateChain;
class DecryptedKDM;
+
/** @class CPL
* @brief A Composition Playlist.
*/
void add (boost::shared_ptr<Reel> reel);
void add (DecryptedKDM const &);
- /** @return contents of the <AnnotationText> node */
- std::string annotation_text () const {
- return _annotation_text;
+ /** @return the reels in this CPL */
+ std::list<boost::shared_ptr<Reel> > reels () const {
+ return _reels;
}
+ /** @return the ReelMXFs in this CPL in all reels */
+ std::list<boost::shared_ptr<const ReelMXF> > reel_mxfs () const;
+ std::list<boost::shared_ptr<ReelMXF> > reel_mxfs ();
+
+ bool encrypted () const;
+
+ void write_xml (
+ boost::filesystem::path file,
+ Standard standard,
+ boost::shared_ptr<const CertificateChain>
+ ) const;
+
+ void resolve_refs (std::list<boost::shared_ptr<Asset> >);
+
+ int64_t duration () const;
+
void set_issuer (std::string issuer) {
_issuer = issuer;
}
_issue_date = issue_date;
}
+ /** @return contents of the <AnnotationText> node */
+ std::string annotation_text () const {
+ return _annotation_text;
+ }
+
void set_annotation_text (std::string at) {
_annotation_text = at;
}
_content_title_text = ct;
}
- /** Set the contents of the ContentVersion tag */
- void set_content_version (ContentVersion v) {
- _content_version = v;
- }
-
/** @return the type of the content, used by media servers
* to categorise things (e.g. feature, trailer, etc.)
*/
return _content_kind;
}
- /** @return the reels in this CPL */
- std::list<boost::shared_ptr<Reel> > reels () const {
- return _reels;
+ ContentVersion content_version () const {
+ return _content_version;
}
- /** @return the ReelMXFs in this CPL in all reels.
- */
- std::list<boost::shared_ptr<const ReelMXF> > reel_mxfs () const;
- std::list<boost::shared_ptr<ReelMXF> > reel_mxfs ();
-
- bool encrypted () const;
-
- void write_xml (
- boost::filesystem::path file,
- Standard standard,
- boost::shared_ptr<const CertificateChain>
- ) const;
-
- void resolve_refs (std::list<boost::shared_ptr<Asset> >);
-
- int64_t duration () const;
-
- boost::optional<Standard> standard () const {
- return _standard;
+ /** Set the contents of the ContentVersion tag */
+ void set_content_version (ContentVersion v) {
+ _content_version = v;
}
std::list<Rating> ratings () const {
_ratings = r;
}
- ContentVersion content_version () const {
- return _content_version;
+ boost::optional<Standard> standard () const {
+ return _standard;
}
static std::string static_pkl_type (Standard standard);
std::string _content_title_text; ///< <ContentTitleText>
ContentKind _content_kind; ///< <ContentKind>
ContentVersion _content_version; ///< <ContentVersion>
- std::list<boost::shared_ptr<Reel> > _reels;
std::list<Rating> _ratings;
+ std::list<boost::shared_ptr<Reel> > _reels;
+
/** Standard of CPL that was read in */
boost::optional<Standard> _standard;
};
+
}
+
#endif