47 #include "language_tag.h"
50 #include <boost/filesystem.hpp>
51 #include <boost/function.hpp>
52 #include <boost/optional.hpp>
57 struct verify_invalid_language3;
66 class CertificateChain;
79 explicit CPL (boost::filesystem::path
file);
82 std::shared_ptr<const Asset> other,
90 void add (std::shared_ptr<Reel> reel);
99 std::vector<std::shared_ptr<Reel>>
reels ()
const {
104 std::vector<std::shared_ptr<const ReelFileAsset>>
reel_file_assets ()
const;
119 boost::filesystem::path
file,
120 std::shared_ptr<const CertificateChain>
123 void resolve_refs (std::vector<std::shared_ptr<Asset>>);
125 int64_t duration ()
const;
127 std::string issuer ()
const {
131 void set_issuer (std::string issuer) {
135 std::string creator ()
const {
139 void set_creator (std::string creator) {
143 void set_issue_date (std::string issue_date) {
144 _issue_date = issue_date;
149 return _annotation_text;
152 void set_annotation_text (std::string at) {
153 _annotation_text = at;
161 void set_content_title_text (std::string ct) {
165 void set_content_kind (dcp::ContentKind k) {
176 boost::optional<ContentVersion> content_version ()
const;
178 std::vector<ContentVersion> content_versions ()
const {
179 return _content_versions;
182 void set_content_version (ContentVersion v) {
183 _content_versions.clear ();
184 _content_versions.push_back (v);
187 void set_content_versions (std::vector<ContentVersion> v);
189 std::vector<Rating> ratings ()
const {
193 void set_ratings (std::vector<Rating> r) {
197 boost::optional<std::string> full_content_title_text ()
const {
201 void set_full_content_title_text (std::string t) {
205 boost::optional<std::string> full_content_title_text_language ()
const {
206 return _full_content_title_text_language;
210 _full_content_title_text_language = l.to_string();
213 boost::optional<std::string> release_territory ()
const {
221 boost::optional<std::string> release_territory_scope ()
const {
222 return _release_territory_scope;
225 boost::optional<int> version_number ()
const {
226 return _version_number;
229 void set_version_number (
int v);
231 void unset_version_number ();
233 boost::optional<Status> status ()
const {
237 void set_status (
Status s) {
241 boost::optional<std::string> chain ()
const {
245 void set_chain (std::string c) {
249 boost::optional<std::string> distributor ()
const {
253 void set_distributor (std::string d) {
257 boost::optional<std::string> facility ()
const {
261 void set_facility (std::string f) {
265 boost::optional<Luminance> luminance ()
const {
269 void set_luminance (Luminance l) {
273 boost::optional<std::string> main_sound_configuration ()
const {
274 return _main_sound_configuration;
277 void set_main_sound_configuration (std::string c) {
278 _main_sound_configuration = c;
281 boost::optional<int> main_sound_sample_rate ()
const {
282 return _main_sound_sample_rate;
285 void set_main_sound_sample_rate (
int r) {
286 _main_sound_sample_rate = r;
289 boost::optional<dcp::Size> main_picture_stored_area ()
const {
290 return _main_picture_stored_area;
293 void set_main_picture_stored_area (
dcp::Size s) {
294 _main_picture_stored_area = s;
297 boost::optional<dcp::Size> main_picture_active_area ()
const {
298 return _main_picture_active_area;
301 void set_main_picture_active_area (
dcp::Size s) {
302 _main_picture_active_area = s;
305 std::vector<std::string> additional_subtitle_languages ()
const {
306 return _additional_subtitle_languages;
309 void set_additional_subtitle_languages (std::vector<dcp::LanguageTag>
const& lang);
312 _sign_language_video_language = lang.to_string();
315 boost::optional<std::string> sign_language_video_language ()
const {
316 return _sign_language_video_language;
319 Standard standard ()
const {
323 static std::string static_pkl_type (Standard standard);
327 std::string
pkl_type (Standard standard)
const override;
330 friend struct ::verify_invalid_language3;
333 void read_composition_metadata_asset (cxml::ConstNodePtr node);
336 std::string _creator;
337 std::string _issue_date;
338 boost::optional<std::string> _annotation_text;
341 std::vector<ContentVersion> _content_versions;
342 std::vector<Rating> _ratings;
349 boost::optional<std::string> _full_content_title_text_language;
354 boost::optional<std::string> _release_territory_scope;
355 boost::optional<int> _version_number;
356 boost::optional<Status> _status;
357 boost::optional<std::string> _chain;
358 boost::optional<std::string> _distributor;
359 boost::optional<std::string> _facility;
360 boost::optional<Luminance> _luminance;
361 boost::optional<std::string> _main_sound_configuration;
362 boost::optional<int> _main_sound_sample_rate;
363 boost::optional<dcp::Size> _main_picture_stored_area;
364 boost::optional<dcp::Size> _main_picture_active_area;
366 std::vector<std::string> _additional_subtitle_languages;
367 boost::optional<std::string> _sign_language_video_language;
369 std::vector<std::shared_ptr<Reel>> _reels;
Parent class for DCP assets, i.e. picture, sound, subtitles, closed captions, CPLs,...
boost::optional< boost::filesystem::path > file() const
std::vector< std::shared_ptr< Reel > > reels() const
bool all_encrypted() const
void add(std::shared_ptr< Reel > reel)
std::string content_title_text() const
std::vector< std::shared_ptr< const ReelFileAsset > > reel_file_assets() const
boost::optional< std::string > _release_territory
std::string pkl_type(Standard standard) const override
std::string _content_title_text
<ContentTitleText>
boost::optional< std::string > annotation_text() const
std::string _cpl_metadata_id
ContentKind content_kind() const
bool any_encrypted() const
boost::optional< std::string > _full_content_title_text
void write_xml(boost::filesystem::path file, std::shared_ptr< const CertificateChain >) const
ContentKind _content_kind
<ContentKind>
void maybe_write_composition_metadata_asset(xmlpp::Element *node) const
Namespace for everything in libdcp.
A class to describe what "equality" means for a particular test.
The integer, two-dimensional size of something.