libdcp
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
dcp::MXF Class Reference

Parent for classes which represent MXF files. More...

#include <mxf.h>

Inheritance diagram for dcp::MXF:
dcp::AtmosAsset dcp::PictureAsset dcp::SMPTESubtitleAsset dcp::SoundAsset dcp::MonoPictureAsset dcp::StereoPictureAsset

Public Member Functions

 MXF (Standard standard)
 
bool encrypted () const
 
void set_key_id (std::string i)
 
boost::optional< std::string > key_id () const
 
virtual void set_key (Key)
 
boost::optional< Keykey () const
 
void set_context_id (std::string id)
 
std::string context_id () const
 
void set_metadata (MXFMetadata m)
 
MXFMetadata metadata () const
 
Standard standard () const
 

Protected Member Functions

std::string read_writer_info (ASDCP::WriterInfo const &)
 
void fill_writer_info (ASDCP::WriterInfo *w, std::string id) const
 

Protected Attributes

boost::optional< std::string > _key_id
 
boost::optional< Key_key
 
std::string _context_id
 
MXFMetadata _metadata
 
boost::optional< Standard > _standard
 

Friends

template<class P , class Q >
void start (PictureAssetWriter *writer, std::shared_ptr< P > state, Q *mxf, uint8_t const *data, int size)
 

Detailed Description

Parent for classes which represent MXF files.

Definition at line 73 of file mxf.h.

Member Function Documentation

◆ context_id()

std::string dcp::MXF::context_id ( ) const
inline
Returns
context ID used when encrypting; this starts off as a random value

Definition at line 116 of file mxf.h.

◆ encrypted()

bool dcp::MXF::encrypted ( ) const
inline
Returns
true if the data is encrypted

Definition at line 80 of file mxf.h.

◆ fill_writer_info()

void MXF::fill_writer_info ( ASDCP::WriterInfo *  w,
std::string  id 
) const
protected

Fill in a ASDCP::WriteInfo struct.

Parameters
wstruct to fill in

Definition at line 82 of file mxf.cc.

◆ key()

boost::optional<Key> dcp::MXF::key ( ) const
inline
Returns
encryption/decryption key, if one has been set

Definition at line 104 of file mxf.h.

◆ key_id()

boost::optional<std::string> dcp::MXF::key_id ( ) const
inline
Returns
the ID of the key used for encryption/decryption, if there is one

Definition at line 92 of file mxf.h.

◆ metadata()

MXFMetadata dcp::MXF::metadata ( ) const
inline
Returns
metadata from the MXF file

Definition at line 128 of file mxf.h.

◆ read_writer_info()

string MXF::read_writer_info ( ASDCP::WriterInfo const &  info)
protected

Read an ASDCP::WriterInfo struct, extracting things for our member variables.

Returns
AssetUUID of the MXF

Definition at line 124 of file mxf.cc.

◆ set_context_id()

void dcp::MXF::set_context_id ( std::string  id)
inline

Set the context ID to be used when encrypting.

Parameters
idNew ID.

Definition at line 111 of file mxf.h.

◆ set_key()

void MXF::set_key ( Key  key)
virtual

Set the (private) key that will be used to encrypt or decrypt this MXF's content This is the top-secret key that is distributed (itself encrypted) to cinemas via Key Delivery Messages (KDMs)

Parameters
keyKey to use

Reimplemented in dcp::SMPTESubtitleAsset.

Definition at line 112 of file mxf.cc.

◆ set_key_id()

void dcp::MXF::set_key_id ( std::string  i)
inline

Set the ID of the key that is used for encryption/decryption.

Parameters
ikey ID.

Definition at line 87 of file mxf.h.

◆ set_metadata()

void dcp::MXF::set_metadata ( MXFMetadata  m)
inline

Set the metadata that is written to the MXF file.

Parameters
mMetadata.

Definition at line 123 of file mxf.h.

Member Data Documentation

◆ _key

boost::optional<Key> dcp::MXF::_key
protected

Key used for encryption/decryption, if there is one

Definition at line 157 of file mxf.h.

◆ _key_id

boost::optional<std::string> dcp::MXF::_key_id
protected

ID of the key used for encryption/decryption, if there is one

Definition at line 155 of file mxf.h.


The documentation for this class was generated from the following files: