summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-08-26 23:24:58 +0200
committerCarl Hetherington <cth@carlh.net>2020-09-21 21:57:18 +0200
commita0e7285ae99ca4630a8096884f05ad4e1b3fc204 (patch)
treea73460032764effcb536ae90fb480a0e1050bd99
parent0fa60920228c591f1183149d79c88302d3ce01fb (diff)
Tidy up a bit; vertical white space, group metadata together,
order accessors the same as members, getter before setter.
-rw-r--r--src/cpl.h84
1 files changed, 46 insertions, 38 deletions
diff --git a/src/cpl.h b/src/cpl.h
index 1132952a..b7055e5d 100644
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014-2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2020 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
@@ -31,31 +31,37 @@
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.
*/
@@ -74,11 +80,27 @@ public:
void add (boost::shared_ptr<Reel> reel);
void add (DecryptedKDM const &);
- /** @return contents of the &lt;AnnotationText&gt; 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;
}
@@ -91,6 +113,11 @@ public:
_issue_date = issue_date;
}
+ /** @return contents of the &lt;AnnotationText&gt; node */
+ std::string annotation_text () const {
+ return _annotation_text;
+ }
+
void set_annotation_text (std::string at) {
_annotation_text = at;
}
@@ -104,11 +131,6 @@ public:
_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.)
*/
@@ -116,30 +138,13 @@ public:
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 {
@@ -150,8 +155,8 @@ public:
_ratings = r;
}
- ContentVersion content_version () const {
- return _content_version;
+ boost::optional<Standard> standard () const {
+ return _standard;
}
static std::string static_pkl_type (Standard standard);
@@ -168,13 +173,16 @@ private:
std::string _content_title_text; ///< &lt;ContentTitleText&gt;
ContentKind _content_kind; ///< &lt;ContentKind&gt;
ContentVersion _content_version; ///< &lt;ContentVersion&gt;
- 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