A class to create or read a DCP.
More...
#include <dcp.h>
|
| DCP (boost::filesystem::path directory) |
|
| DCP (DCP const &)=delete |
|
DCP & | operator= (DCP const &)=delete |
|
| DCP (DCP &&) |
|
DCP & | operator= (DCP &&) |
|
void | read (std::vector< VerificationNote > *notes=nullptr, bool ignore_incorrect_picture_mxf_type=false) |
|
bool | equals (DCP const &other, EqualityOptions const &options, NoteHandler note) const |
|
void | add (std::shared_ptr< CPL > cpl) |
|
std::vector< std::shared_ptr< CPL > > | cpls () const |
|
std::vector< std::shared_ptr< Asset > > | assets (bool ignore_unresolved=false) const |
|
bool | any_encrypted () const |
|
bool | all_encrypted () const |
|
void | add (DecryptedKDM const &) |
|
void | set_issuer (std::string issuer) |
|
void | set_creator (std::string creator) |
|
void | set_issue_date (std::string issue_date) |
|
void | set_annotation_text (std::string annotation_text) |
|
void | write_xml (std::shared_ptr< const CertificateChain > signer=std::shared_ptr< const CertificateChain >(), bool include_mca_subdescriptors=true, NameFormat name_format=NameFormat("%t")) |
|
void | resolve_refs (std::vector< std::shared_ptr< Asset >> assets) |
|
boost::optional< Standard > | standard () const |
|
boost::filesystem::path | directory () const |
|
std::vector< std::shared_ptr< PKL > > | pkls () const |
|
boost::optional< boost::filesystem::path > | asset_map_file () const |
|
boost::optional< AssetMap > | asset_map () const |
|
|
static std::vector< boost::filesystem::path > | directories_from_files (std::vector< boost::filesystem::path > files) |
|
|
boost::filesystem::path | _directory |
|
std::vector< std::shared_ptr< CPL > > | _cpls |
|
std::vector< std::shared_ptr< PKL > > | _pkls |
|
boost::optional< AssetMap > | _asset_map |
|
boost::optional< std::string > | _new_issuer |
|
boost::optional< std::string > | _new_creator |
|
boost::optional< std::string > | _new_issue_date |
|
boost::optional< std::string > | _new_annotation_text |
|
A class to create or read a DCP.
Definition at line 82 of file dcp.h.
◆ DCP()
DCP::DCP |
( |
boost::filesystem::path |
directory | ) |
|
|
explicit |
Construct a DCP. You can pass an existing DCP's directory as the parameter; alternatively, directory will be created if it does not exist. Note that if you pass an existing DCP into this constructor it will not be read until you call ::read().
- Parameters
-
directory | Directory containing the DCP's files. |
Definition at line 99 of file dcp.cc.
◆ add()
Add a KDM to decrypt this DCP. This method must be called after DCP::read() or the KDM you specify will be ignored.
- Parameters
-
Definition at line 403 of file dcp.cc.
◆ assets()
vector< shared_ptr< Asset > > DCP::assets |
( |
bool |
ignore_unresolved = false | ) |
const |
- Parameters
-
ignore_unresolved | true to silently ignore unresolved assets, otherwise an exception is thrown if they are found. |
- Returns
- All assets (including CPLs).
Definition at line 532 of file dcp.cc.
◆ directories_from_files()
vector< boost::filesystem::path > DCP::directories_from_files |
( |
std::vector< boost::filesystem::path > |
files | ) |
|
|
static |
Given a list of files that make up 1 or more DCPs, return the DCP directories
Definition at line 561 of file dcp.cc.
◆ equals()
bool DCP::equals |
( |
DCP const & |
other, |
|
|
EqualityOptions const & |
options, |
|
|
NoteHandler |
note |
|
) |
| const |
Compare this DCP with another, according to various options.
- Parameters
-
other | DCP to compare this one to. |
options | Options to define what "equality" means. |
note | Functor to handle notes made by the equality operation. |
- Returns
- true if the DCPs are equal according to EqualityOptions, otherwise false.
Definition at line 342 of file dcp.cc.
◆ pkls()
std::vector<std::shared_ptr<PKL> > dcp::DCP::pkls |
( |
| ) |
const |
|
inline |
- Returns
- PKLs if this DCP was read from an existing one, or if write_xml() has been called on it. If neither is true, this method returns an empty vector.
Definition at line 181 of file dcp.h.
◆ read()
void DCP::read |
( |
std::vector< VerificationNote > * |
notes = nullptr , |
|
|
bool |
ignore_incorrect_picture_mxf_type = false |
|
) |
| |
Read a DCP. This method does not do any deep checking of the DCP's validity, but if it comes across any bad things it will do one of two things.
Errors that are so serious that they prevent the method from working will result in an exception being thrown. For example, a missing ASSETMAP means that the DCP can't be read without a lot of guesswork, so this will throw.
Errors that are not fatal will be added to notes, if it's non-null. For example, if the DCP contains a mixture of Interop and SMPTE elements this will result in a note being added to the vector.
For more thorough checking of a DCP's contents, see dcp::verify().
- Parameters
-
notes | List of notes that will be added to if non-0. |
ignore_incorrect_picture_mxf_type | true to try loading MXF files marked as monoscopic as stereoscopic if the monoscopic load fails; fixes problems some 3D DCPs that (I think) have an incorrect descriptor in their MXF. |
Definition at line 140 of file dcp.cc.
◆ standard()
boost::optional<Standard> dcp::DCP::standard |
( |
| ) |
const |
|
inline |
- Returns
- Standard of a DCP that was read in
Definition at line 166 of file dcp.h.
◆ write_volindex()
void DCP::write_volindex |
( |
Standard |
standard | ) |
const |
|
private |
Write the VOLINDEX file.
- Parameters
-
standard | DCP standard to use (INTEROP or SMPTE) |
Definition at line 418 of file dcp.cc.
◆ write_xml()
Write all the XML files for this DCP.
- Parameters
-
signer | Signer to use |
include_mca_subdescriptors | true to write MCA subdescriptors to CPLs. |
name_format | Name format to use for the CPL and PKL filenames |
Definition at line 452 of file dcp.cc.
◆ _cpls
std::vector<std::shared_ptr<CPL> > dcp::DCP::_cpls |
|
private |
The CPLs that make up this DCP
Definition at line 206 of file dcp.h.
◆ _directory
boost::filesystem::path dcp::DCP::_directory |
|
private |
The directory that we are writing to
Definition at line 204 of file dcp.h.
◆ _pkls
std::vector<std::shared_ptr<PKL> > dcp::DCP::_pkls |
|
private |
The PKLs that make up this DCP
Definition at line 208 of file dcp.h.
The documentation for this class was generated from the following files: