46 #include "content_kind.h"
51 #include <boost/filesystem.hpp>
52 #include <boost/function.hpp>
53 #include <boost/optional.hpp>
58 struct verify_invalid_language3;
64 class CertificateChain;
90 explicit CPL(boost::filesystem::path
file, std::vector<dcp::VerificationNote>* notes =
nullptr);
93 std::shared_ptr<const Asset> other,
101 void add (std::shared_ptr<Reel> reel);
103 void set (std::vector<std::shared_ptr<Reel>>
reels);
112 std::vector<std::shared_ptr<Reel>>
reels ()
const {
117 std::vector<std::shared_ptr<const ReelFileAsset>>
reel_file_assets ()
const;
134 boost::filesystem::path
file,
135 std::shared_ptr<const CertificateChain>,
136 bool include_mca_subdescriptors =
true
139 void resolve_refs (std::vector<std::shared_ptr<Asset>>);
141 int64_t duration ()
const;
143 std::string issuer ()
const {
147 void set_issuer (std::string issuer) {
151 std::string creator ()
const {
155 void set_creator (std::string creator) {
159 void set_issue_date (std::string issue_date) {
160 _issue_date = issue_date;
165 return _annotation_text;
168 void set_annotation_text (std::string at) {
169 _annotation_text = at;
177 void set_content_title_text (std::string ct) {
192 boost::optional<ContentVersion> content_version ()
const;
194 std::vector<ContentVersion> content_versions ()
const {
195 return _content_versions;
198 void set_content_version (ContentVersion v) {
199 _content_versions.clear ();
200 _content_versions.push_back (v);
203 void set_content_versions (std::vector<ContentVersion> v);
205 std::vector<Rating> ratings ()
const {
209 void set_ratings (std::vector<Rating> r) {
213 boost::optional<std::string> full_content_title_text ()
const {
217 void set_full_content_title_text (std::string t) {
221 boost::optional<std::string> full_content_title_text_language ()
const {
222 return _full_content_title_text_language;
226 _full_content_title_text_language = l.to_string();
229 boost::optional<std::string> release_territory ()
const {
237 boost::optional<std::string> release_territory_scope ()
const {
238 return _release_territory_scope;
241 boost::optional<int> version_number ()
const {
242 return _version_number;
245 void set_version_number (
int v);
247 void unset_version_number ();
249 boost::optional<Status> status ()
const {
253 void set_status (
Status s) {
257 boost::optional<std::string> chain ()
const {
261 void set_chain (std::string c) {
265 boost::optional<std::string> distributor ()
const {
269 void set_distributor (std::string d) {
273 boost::optional<std::string> facility ()
const {
277 void set_facility (std::string f) {
281 boost::optional<Luminance> luminance ()
const {
285 void set_luminance (Luminance l) {
289 boost::optional<dcp::MainSoundConfiguration> main_sound_configuration ()
const {
290 return _main_sound_configuration;
294 _main_sound_configuration = c;
297 boost::optional<int> main_sound_sample_rate ()
const {
298 return _main_sound_sample_rate;
301 void set_main_sound_sample_rate (
int r) {
302 _main_sound_sample_rate = r;
305 boost::optional<dcp::Size> main_picture_stored_area ()
const {
306 return _main_picture_stored_area;
309 void set_main_picture_stored_area (
dcp::Size s) {
310 _main_picture_stored_area = s;
313 boost::optional<dcp::Size> main_picture_active_area ()
const {
314 return _main_picture_active_area;
317 void set_main_picture_active_area(
dcp::Size area);
319 std::vector<std::string> additional_subtitle_languages ()
const {
320 return _additional_subtitle_languages;
323 void set_additional_subtitle_languages (std::vector<dcp::LanguageTag>
const& lang);
326 _sign_language_video_language = lang.to_string();
329 boost::optional<std::string> sign_language_video_language ()
const {
330 return _sign_language_video_language;
333 void set_dolby_edr_image_transfer_function(std::string
function) {
334 _dolby_edr_image_transfer_function =
function;
337 boost::optional<std::string> dolby_edr_image_transfer_function()
const {
338 return _dolby_edr_image_transfer_function;
341 Standard standard ()
const {
349 return _read_composition_metadata;
352 static std::string static_pkl_type (Standard standard);
356 std::string
pkl_type (Standard standard)
const override;
359 friend struct ::verify_invalid_language3;
362 void read_composition_metadata_asset (cxml::ConstNodePtr node);
363 void write_mca_subdescriptors(xmlpp::Element* parent, std::shared_ptr<const SoundAsset> asset)
const;
366 std::string _creator;
367 std::string _issue_date;
368 boost::optional<std::string> _annotation_text;
371 std::vector<ContentVersion> _content_versions;
372 std::vector<Rating> _ratings;
379 boost::optional<std::string> _full_content_title_text_language;
384 boost::optional<std::string> _release_territory_scope;
385 boost::optional<int> _version_number;
386 boost::optional<Status> _status;
387 boost::optional<std::string> _chain;
388 boost::optional<std::string> _distributor;
389 boost::optional<std::string> _facility;
390 boost::optional<Luminance> _luminance;
391 boost::optional<MainSoundConfiguration> _main_sound_configuration;
392 boost::optional<int> _main_sound_sample_rate;
393 boost::optional<dcp::Size> _main_picture_stored_area;
394 boost::optional<dcp::Size> _main_picture_active_area;
396 std::vector<std::string> _additional_subtitle_languages;
397 boost::optional<std::string> _sign_language_video_language;
398 boost::optional<std::string> _dolby_edr_image_transfer_function;
399 bool _read_composition_metadata =
false;
401 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
void maybe_write_composition_metadata_asset(xmlpp::Element *node, bool include_mca_subdescriptors) const
std::string _cpl_metadata_id
ContentKind content_kind() const
bool any_encrypted() const
bool read_composition_metadata() const
boost::optional< std::string > _full_content_title_text
void write_xml(boost::filesystem::path file, std::shared_ptr< const CertificateChain >, bool include_mca_subdescriptors=true) const
ContentKind _content_kind
<ContentKind>
A class to describe what "equality" means for a particular test.
Namespace for everything in libdcp.
The integer, two-dimensional size of something.
dcp::verify() method and associated code