2 Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include "certificates.h"
28 #include <libxml++/libxml++.h>
29 #include <boost/shared_ptr.hpp>
30 #include <boost/function.hpp>
31 #include <boost/optional.hpp>
32 #include <boost/filesystem.hpp>
45 * @brief A Composition Playlist.
47 class CPL : public Asset
50 CPL (std::string annotation_text, ContentKind content_kind);
51 CPL (boost::filesystem::path file);
55 EqualityOptions options,
56 boost::function<void (NoteType, std::string)> note
59 void add (boost::shared_ptr<Reel> reel);
60 void add (DecryptedKDM const &);
62 /** @return contents of the <AnnotationText> node */
63 std::string annotation_text () const {
64 return _annotation_text;
67 /** @return contents of the <ContentTitleText> node */
68 std::string content_title_text () const {
69 return _content_title_text;
72 /** @return contents of the <Id> node within <ContentVersion> */
73 void set_content_version_id (std::string id) {
74 _content_version_id = id;
77 /** @return contents of the <LabelText> node within <ContentVersion> */
78 void set_content_version_label_text (std::string text) {
79 _content_version_label_text = text;
82 /** @return the type of the content, used by media servers
83 * to categorise things (e.g. feature, trailer, etc.)
85 ContentKind content_kind () const {
89 /** @return the reels in this CPL */
90 std::list<boost::shared_ptr<Reel> > reels () const {
94 /** @return the Content in this CPL across all its reels
95 * (Content is picture, sound and subtitles)
97 std::list<boost::shared_ptr<const Content> > content () const;
99 bool encrypted () const;
101 void set_mxf_keys (Key);
104 boost::filesystem::path file,
106 boost::shared_ptr<const Signer>
109 void resolve_refs (std::list<boost::shared_ptr<Object> >);
112 /** @return type string for PKLs for this asset */
113 std::string pkl_type (Standard standard) const;
116 std::string _annotation_text; ///< <AnnotationText>
117 /** <Issuer>, <Creator> and <IssueDate>. These are grouped
118 * because they occur together in a few places.
120 XMLMetadata _metadata;
121 std::string _content_title_text; ///< <ContentTitleText>
122 ContentKind _content_kind; ///< <ContentKind>
123 std::string _content_version_id; ///< <Id> in <ContentVersion>
124 std::string _content_version_label_text; ///< <LabelText> in <ContentVersion>
125 std::list<boost::shared_ptr<Reel> > _reels;