libdcp
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
dcp Namespace Reference

Namespace for everything in libdcp. More...

Namespaces

 data
 

Classes

class  ArrayData
 Class to hold an arbitrary block of data. More...
 
class  Asset
 Parent class for DCP assets, i.e. picture, sound, subtitles, closed captions, CPLs, fonts. More...
 
class  AssetList
 
class  AssetMap
 
class  AssetReader
 
class  AssetWriter
 Parent class for classes which can write MXF-based assets. More...
 
class  AtmosAsset
 An asset of Dolby ATMOS sound data. More...
 
class  AtmosAssetWriter
 A helper class for writing to AtmosAssets. More...
 
class  Bitstream
 
class  Certificate
 A wrapper for an X509 certificate. More...
 
class  CertificateChain
 A chain of any number of certificates, from root to leaf. More...
 
class  Chromaticity
 A representation of a x,y,z chromaticity, where z = 1 - x - y. More...
 
class  ColourConversion
 A representation of all the parameters involved the colourspace conversion of a YUV image to XYZ (via RGB) More...
 
class  ContentKind
 
class  CPL
 A Composition Playlist. More...
 
class  CryptoContext
 
class  Data
 
class  DCP
 A class to create or read a DCP. More...
 
class  Time
 A representation of time within a DCP. More...
 
class  DecryptedKDM
 A decrypted KDM. More...
 
class  DecryptedKDMKey
 An un- or de-crypted key from a KDM. More...
 
class  EncryptedKDM
 An encrypted KDM. More...
 
class  EqualityOptions
 A class to describe what "equality" means for a particular test. More...
 
class  FileError
 An exception related to a file. More...
 
class  MXFFileError
 An exception related to an MXF file. More...
 
class  MiscError
 A miscellaneous exception. More...
 
class  ReadError
 Any error that occurs when reading data from a DCP. More...
 
class  J2KDecompressionError
 An error that occurs during decompression of JPEG2000 data. More...
 
class  MPEG2CodecError
 
class  MPEG2DecompressionError
 
class  MPEG2CompressionError
 
class  BadContentKindError
 
class  MissingAssetmapError
 Thrown when no ASSETMAP was found when trying to read a DCP. More...
 
class  XMLError
 An XML error. More...
 
class  UnresolvedRefError
 An exception caused by a reference (by UUID) to something which is not known. More...
 
class  TimeFormatError
 A an error with a string passed to LocalTime. More...
 
class  NotEncryptedError
 An error raised when creating a DecryptedKDM object for assets that are not encrypted. More...
 
class  ProgrammingError
 An exception thrown when a DCP_ASSERT fails; something that should not happen. More...
 
class  KDMDecryptionError
 
class  KDMFormatError
 
class  CertificateChainError
 
class  MissingTextImageError
 
class  BadKDMDateError
 
class  StartCompressionError
 
class  CombineError
 
class  LanguageTagError
 
class  BadSettingError
 
class  DuplicateIdError
 
class  MainSoundConfigurationError
 
class  UnknownChannelIdError
 
class  NoReelsError
 
class  InconsistentValidityPeriodError
 
class  BadURNUUIDError
 
class  FFmpegImage
 
class  File
 
class  FontAsset
 A (truetype) font asset for subtitles in an Interop DCP. More...
 
class  Frame
 
class  FrameInfo
 Information about a single frame (either a monoscopic frame or a left or right eye stereoscopic frame) More...
 
struct  J2KFrameInfo
 
struct  MPEG2FrameInfo
 
class  FSK
 Create frequency-shift-keyed samples for encoding synchronization signals. More...
 
class  GammaTransferFunction
 A description of a gamma function of the f(x) = x^g where g is the gamma. More...
 
class  IdentityTransferFunction
 
class  InteropLoadFontNode
 
class  InteropTextAsset
 A set of subtitles to be read and/or written in the Inter-Op format. More...
 
class  J2KPictureAsset
 An asset made up of JPEG2000 data. More...
 
class  J2KPictureAssetWriter
 Parent class for classes which write picture assets. More...
 
struct  ASDCPJ2KStateBase
 
class  Key
 A key for decrypting/encrypting assets. More...
 
class  LanguageTag
 
class  LoadFontNode
 Parser for LoadFont nodes from subtitle XML. More...
 
class  LocalTime
 A representation of a local time (down to the second), including its offset from GMT (equivalent to xs:dateTime). More...
 
class  MXFMetadata
 Metadata that is written to a MXF file's header. More...
 
class  ModifiedGammaTransferFunction
 
class  MonoJ2KPictureAsset
 A 2D (monoscopic) picture asset. More...
 
class  MonoJ2KPictureAssetWriter
 A helper class for writing to MonoJ2KPictureAssets. More...
 
class  MonoJ2KPictureFrame
 A single frame of a 2D (monoscopic) picture asset. More...
 
class  MonoMPEG2PictureAsset
 
class  MonoMPEG2PictureAssetWriter
 
class  MonoMPEG2PictureFrame
 
class  MPEG2PictureAsset
 
class  MPEG2PictureAssetWriter
 
struct  ASDCPMPEG2StateBase
 
class  MPEG2Codec
 
class  MPEG2Decompressor
 
class  MPEG2Compressor
 
class  MXF
 Parent for classes which represent MXF files. More...
 
class  NameFormat
 
class  Object
 Some part of a DCP that has a UUID. More...
 
class  OpenJPEGImage
 A wrapper of libopenjpeg's opj_image_t. More...
 
class  PictureAsset
 
class  PiecewiseLUT2
 
class  PKL
 
class  Rating
 
class  RatingSystem
 
class  Reel
 A reel within a DCP; the part which actually refers to picture, sound, subtitle, marker and Atmos data. More...
 
class  ReelAsset
 An entry in a <Reel> which refers to a use of a piece of content. More...
 
class  ReelAtmosAsset
 Part of a Reel's description which refers to a Atmos MXF. More...
 
class  ReelFileAsset
 
class  ReelInteropTextAsset
 Part of a Reel's description which refers to an Interop subtitle or caption XML file. More...
 
class  ReelMarkersAsset
 
class  ReelMonoPictureAsset
 Part of a Reel's description which refers to a monoscopic picture asset. More...
 
class  ReelPictureAsset
 Part of a Reel's description which refers to a picture asset. More...
 
class  ReelSMPTETextAsset
 Part of a Reel's description which refers to an SMPTE subtitle or caption MXF file. More...
 
class  ReelSoundAsset
 Part of a Reel's description which refers to a sound asset. More...
 
class  ReelStereoPictureAsset
 Part of a Reel's description which refers to a stereoscopic picture asset. More...
 
class  ReelTextAsset
 Part of a Reel's description which refers to a subtitle or caption XML/MXF file. More...
 
class  Ref
 A reference to an asset which is identified by a universally-unique identifier (UUID) More...
 
class  Ruby
 
class  SGamut3TransferFunction
 
class  ScopeGuard
 
class  SMPTELoadFontNode
 Parser for LoadFont nodes from SMPTE subtitle XML. More...
 
class  SMPTETextAsset
 A set of subtitles/captions to be read and/or written in the SMPTE format. More...
 
class  SoundAsset
 Representation of a sound asset. More...
 
class  SoundAssetWriter
 A helper class for writing to SoundAssets. More...
 
class  SoundFrame
 
class  StereoJ2KPictureAsset
 A 3D (stereoscopic) picture asset. More...
 
class  StereoJ2KPictureAssetWriter
 A helper class for writing to StereoJ2KPictureAssets. More...
 
class  StereoJ2KPictureFrame
 A single frame of a 3D (stereoscopic) picture asset. More...
 
class  Text
 
class  TextAsset
 A parent for classes representing a file containing subtitles or captions. More...
 
class  TextImage
 A bitmap subtitle or caption with all the associated attributes. More...
 
class  TextString
 A single line of subtitle text with all the associated attributes. More...
 
class  TransferFunction
 A transfer function represented by a lookup table. More...
 
struct  Size
 The integer, two-dimensional size of something. More...
 
class  Fraction
 A fraction (i.e. a thing with an integer numerator and an integer denominator). More...
 
class  Colour
 An RGB colour. More...
 
class  ContentVersion
 
class  Luminance
 
class  MainSoundConfiguration
 
class  UTCOffset
 
class  ASDCPErrorSuspender
 
class  VerificationNote
 
struct  VerificationOptions
 
struct  VerificationResult
 
struct  LinesCharactersResult
 
class  Context
 
class  Formatter
 
class  TextFormatter
 
class  HTMLFormatter
 

Typedefs

typedef AssetReader< ASDCP::ATMOS::MXFReader, AtmosFrameAtmosAssetReader
 
typedef Frame< ASDCP::ATMOS::MXFReader, ASDCP::DCData::FrameBuffer > AtmosFrame
 
typedef CryptoContext< ASDCP::AESEncContext > EncryptionContext
 
typedef CryptoContext< ASDCP::AESDecContext > DecryptionContext
 
typedef AssetReader< ASDCP::JP2K::MXFReader, MonoJ2KPictureFrameMonoJ2KPictureAssetReader
 
typedef AssetReader< ASDCP::MPEG2::MXFReader, MonoMPEG2PictureFrameMonoMPEG2PictureAssetReader
 
typedef AssetReader< ASDCP::PCM::MXFReader, SoundFrameSoundAssetReader
 
typedef AssetReader< ASDCP::JP2K::MXFSReader, StereoJ2KPictureFrameStereoJ2KPictureAssetReader
 
typedef boost::function< void(NoteType, std::string)> NoteHandler
 

Enumerations

enum class  Behaviour { OVERWRITE_EXISTING , MAKE_NEW }
 
enum class  YUVToRGB { REC601 , REC709 , REC2020 , COUNT }
 
enum class  HAlign { LEFT , CENTER , RIGHT }
 
enum class  RubyPosition { BEFORE , AFTER }
 
enum class  SubtitleStandard { INTEROP , SMPTE_2007 , SMPTE_2010 , SMPTE_2014 }
 
enum class  TextType { OPEN_SUBTITLE , OPEN_CAPTION , CLOSED_SUBTITLE , CLOSED_CAPTION }
 
enum class  Channel {
  LEFT = 0 , RIGHT = 1 , CENTRE = 2 , LFE = 3 ,
  LS = 4 , RS = 5 , HI = 6 , VI = 7 ,
  LC = 8 , RC = 9 , BSL = 10 , BSR = 11 ,
  MOTION_DATA = 12 , SYNC_SIGNAL = 13 , SIGN_LANGUAGE = 14 , CHANNEL_COUNT = 16
}
 
enum class  MCASoundField { FIVE_POINT_ONE , SEVEN_POINT_ONE , OTHER }
 
enum class  Effect { NONE , BORDER , SHADOW }
 
enum class  Direction { LTR , RTL , TTB , BTT }
 
enum class  Eye { LEFT , RIGHT }
 
enum class  NoteType { PROGRESS , ERROR , NOTE }
 
enum class  Standard { INTEROP , SMPTE }
 
enum class  Formulation { MODIFIED_TRANSITIONAL_1 , MULTIPLE_MODIFIED_TRANSITIONAL_1 , DCI_ANY , DCI_SPECIFIC }
 
enum class  Marker {
  FFOC , LFOC , FFTC , LFTC ,
  FFOI , LFOI , FFEC , LFEC ,
  FFMC , LFMC , FFOB , LFOB
}
 
enum class  Status { FINAL , TEMP , PRE }
 
enum class  VAlign { TOP , CENTER , BOTTOM }
 

Functions

std::shared_ptr< Assetasset_factory (boost::filesystem::path path, bool ignore_incorrect_picture_mxf_type, bool *found_threed_marked_as_twod=nullptr)
 
bool operator== (Certificate const &a, Certificate const &b)
 
bool operator< (Certificate const &a, Certificate const &b)
 
std::ostream & operator<< (std::ostream &s, Certificate const &c)
 
std::string public_key_digest (RSA *public_key)
 
std::string public_key_digest (boost::filesystem::path private_key)
 
std::string escape_digest (std::string digest)
 
void combine (std::vector< boost::filesystem::path > inputs, boost::filesystem::path output, std::string issuer=String::compose("libdcp %1", dcp::version), std::string creator=String::compose("libdcp %1", dcp::version), std::string issue_date=LocalTime().as_string(), std::string annotation_text=String::compose("Created by libdcp %1", dcp::version), std::shared_ptr< const CertificateChain > signer=std::shared_ptr< CertificateChain >())
 
bool operator== (ContentKind const &a, ContentKind const &b)
 
bool operator!= (ContentKind const &a, ContentKind const &b)
 
bool operator== (Data const &a, Data const &b)
 
bool operator!= (Data const &a, Data const &b)
 
bool operator== (Time const &a, Time const &b)
 
bool operator!= (Time const &a, Time const &b)
 
bool operator<= (Time const &a, Time const &b)
 
bool operator< (Time const &a, Time const &b)
 
bool operator> (Time const &a, Time const &b)
 
bool operator>= (Time const &a, Time const &b)
 
std::ostream & operator<< (std::ostream &s, Time const &t)
 
Time operator+ (Time a, Time b)
 
Time operator- (Time a, Time b)
 
float operator/ (Time a, Time const &b)
 
bool operator== (DecryptedKDMKey const &, DecryptedKDMKey const &)
 
bool operator== (EncryptedKDM const &a, EncryptedKDM const &b)
 
std::string halign_to_string (HAlign a)
 
HAlign string_to_halign (std::string s)
 
bool operator== (InteropLoadFontNode const &a, InteropLoadFontNode const &b)
 
bool operator!= (InteropLoadFontNode const &a, InteropLoadFontNode const &b)
 
std::shared_ptr< OpenJPEGImagedecompress_j2k (uint8_t const *data, int64_t size, int reduce)
 
std::shared_ptr< OpenJPEGImagedecompress_j2k (Data const &data, int reduce)
 
std::shared_ptr< OpenJPEGImagedecompress_j2k (std::shared_ptr< const Data > data, int reduce)
 
ArrayData compress_j2k (std::shared_ptr< const OpenJPEGImage >, int bandwidth, int frames_per_second, bool threed, bool fourk, std::string comment="libdcp")
 
bool operator== (Key const &a, Key const &b)
 
bool operator!= (Key const &a, Key const &b)
 
bool operator== (dcp::LanguageTag const &a, dcp::LanguageTag const &b)
 
bool operator!= (dcp::LanguageTag const &a, dcp::LanguageTag const &b)
 
bool operator< (dcp::LanguageTag const &a, dcp::LanguageTag const &b)
 
std::ostream & operator<< (std::ostream &os, dcp::LanguageTag const &tag)
 
void load_language_tag_lists (boost::filesystem::path tags_directory)
 
std::vector< std::pair< std::string, std::string > > dcnc_tags ()
 
std::ostream & operator<< (std::ostream &s, LocalTime const &t)
 
template<typename P , typename Q >
locale_convert (Q, int precision=16, bool fixed=false)
 
template<>
std::string locale_convert (unsigned char x, int, bool)
 
template<>
std::string locale_convert (unsigned short int x, int, bool)
 
template<>
std::string locale_convert (int x, int, bool)
 
template<>
std::string locale_convert (unsigned int x, int, bool)
 
template<>
std::string locale_convert (long int x, int, bool)
 
template<>
std::string locale_convert (unsigned long int x, int, bool)
 
template<>
std::string locale_convert (long long int x, int, bool)
 
template<>
std::string locale_convert (unsigned long long int x, int, bool)
 
template<>
std::string locale_convert (float x, int precision, bool fixed)
 
template<>
std::string locale_convert (double x, int precision, bool fixed)
 
template<>
std::string locale_convert (std::string x, int, bool)
 
template<>
std::string locale_convert (char *x, int, bool)
 
template<>
std::string locale_convert (char const *x, int, bool)
 
template<>
std::string locale_convert (wchar_t const *x, int, bool)
 
template<>
std::string locale_convert (char x, int, bool)
 
template<>
std::string locale_convert (boost::filesystem::path x, int, bool)
 
bool operator== (NameFormat const &a, NameFormat const &b)
 
bool operator== (Rating const &a, Rating const &b)
 
std::vector< RatingSystemrating_systems ()
 
void load_rating_list (boost::filesystem::path ratings_file)
 
template<typename P , typename Q >
raw_convert (Q, int precision=16, bool fixed=false)
 
template<>
std::string raw_convert (unsigned char v, int, bool)
 
template<>
std::string raw_convert (unsigned short int v, int, bool)
 
template<>
std::string raw_convert (int v, int, bool)
 
template<>
std::string raw_convert (unsigned int v, int, bool)
 
template<>
std::string raw_convert (long v, int, bool)
 
template<>
std::string raw_convert (unsigned long v, int, bool)
 
template<>
std::string raw_convert (long long v, int, bool)
 
template<>
std::string raw_convert (unsigned long long v, int, bool)
 
template<>
std::string raw_convert (float v, int, bool)
 
template<>
std::string raw_convert (double v, int, bool)
 
template<>
std::string raw_convert (char const *v, int, bool)
 
template<>
std::string raw_convert (char *v, int, bool)
 
template<>
std::string raw_convert (std::string v, int, bool)
 
template<>
std::string raw_convert (wchar_t const *v, int, bool)
 
template<>
std::string raw_convert (char v, int, bool)
 
void xyz_to_rgba (std::shared_ptr< const OpenJPEGImage >, ColourConversion const &conversion, uint8_t *rgba, int stride)
 
void xyz_to_rgb (std::shared_ptr< const OpenJPEGImage >, ColourConversion const &conversion, uint8_t *rgb, int stride, boost::optional< NoteHandler > note=boost::optional< NoteHandler >())
 
PiecewiseLUT2 make_inverse_gamma_lut (std::shared_ptr< const TransferFunction > fn)
 
void rgb_to_xyz (uint8_t const *rgb, uint16_t *dst, dcp::Size size, int stride, ColourConversion const &conversion)
 
std::shared_ptr< OpenJPEGImagergb_to_xyz (uint8_t const *rgb, dcp::Size size, int stride, ColourConversion const &conversion)
 
void combined_rgb_to_xyz (ColourConversion const &conversion, double *matrix)
 
bool operator== (Ruby const &a, Ruby const &b)
 
bool operator!= (Ruby const &a, Ruby const &b)
 
std::vector< std::shared_ptr< dcp::CPL > > find_and_resolve_cpls (std::vector< boost::filesystem::path > const &directories, bool tolerant)
 
bool operator== (SMPTELoadFontNode const &a, SMPTELoadFontNode const &b)
 
bool operator!= (SMPTELoadFontNode const &a, SMPTELoadFontNode const &b)
 
bool uses_baseline (SubtitleStandard standard)
 
bool uses_bounding_box (SubtitleStandard standard)
 
bool operator== (TextImage const &a, TextImage const &b)
 
bool operator!= (TextImage const &a, TextImage const &b)
 
std::ostream & operator<< (std::ostream &s, TextImage const &text)
 
bool operator== (TextString const &a, TextString const &b)
 
bool operator!= (TextString const &a, TextString const &b)
 
std::ostream & operator<< (std::ostream &s, TextString const &sub)
 
bool operator== (Size const &a, Size const &b)
 
bool operator!= (Size const &a, Size const &b)
 
std::vector< dcp::Channelused_audio_channels ()
 
std::string channel_to_mca_id (Channel c, MCASoundField field)
 
Channel mca_id_to_channel (std::string)
 
std::string channel_to_mca_name (Channel c, MCASoundField field)
 
ASDCP::UL channel_to_mca_universal_label (Channel c, MCASoundField field, ASDCP::Dictionary const *dict)
 
std::string effect_to_string (Effect e)
 
Effect string_to_effect (std::string s)
 
std::string direction_to_string (Direction a)
 
Direction string_to_direction (std::string s)
 
bool operator== (Fraction const &a, Fraction const &b)
 
bool operator!= (Fraction const &a, Fraction const &b)
 
std::string formulation_to_string (dcp::Formulation formulation)
 
dcp::Formulation string_to_formulation (std::string forumulation)
 
bool operator== (Colour const &a, Colour const &b)
 
bool operator!= (Colour const &a, Colour const &b)
 
std::string marker_to_string (Marker)
 
Marker marker_from_string (std::string)
 
std::string status_to_string (Status s)
 
Status string_to_status (std::string s)
 
bool operator== (Luminance const &a, Luminance const &b)
 
bool operator== (UTCOffset const &a, UTCOffset const &b)
 
bool operator!= (UTCOffset const &a, UTCOffset const &b)
 
std::string make_uuid ()
 
std::string make_digest (boost::filesystem::path filename, boost::function< void(int64_t, int64_t)>)
 
std::string make_digest (ArrayData data)
 
bool ids_equal (std::string a, std::string b)
 
std::string remove_urn_uuid (std::string raw)
 
void init (boost::optional< boost::filesystem::path > resources_directory=boost::optional< boost::filesystem::path >())
 
int base64_decode (std::string const &in, unsigned char *out, int out_length)
 
boost::optional< boost::filesystem::path > relative_to_root (boost::filesystem::path root, boost::filesystem::path file)
 
std::string file_to_string (boost::filesystem::path, uintmax_t max_length=1048576)
 
void write_string_to_file (std::string const &string, boost::filesystem::path const &path)
 
std::string private_key_fingerprint (std::string key)
 
std::string openjpeg_version ()
 
std::string spaces (int n)
 
void indent (xmlpp::Element *element, int initial)
 
bool day_less_than_or_equal (LocalTime a, LocalTime b)
 
bool day_greater_than_or_equal (LocalTime a, LocalTime b)
 
std::string unique_string (std::vector< std::string > existing, std::string base)
 
boost::filesystem::path directory_containing_executable ()
 
boost::filesystem::path resources_directory ()
 
template<class From , class To >
void add_to_container (To &container, From source)
 
std::string valign_to_string (VAlign a)
 
VAlign string_to_valign (std::string s)
 
VerificationResult verify (std::vector< boost::filesystem::path > directories, std::vector< dcp::DecryptedKDM > kdms, std::function< void(std::string, boost::optional< boost::filesystem::path >)> stage, std::function< void(float)> progress, VerificationOptions options={}, boost::optional< boost::filesystem::path > xsd_dtd_directory=boost::optional< boost::filesystem::path >())
 
std::string note_to_string (dcp::VerificationNote note, std::function< std::string(std::string)> process_string=[](std::string s) { return s;}, std::function< std::string(std::string)> process_filename=[](std::string s) { return s;})
 
bool operator== (dcp::VerificationNote const &a, dcp::VerificationNote const &b)
 
bool operator!= (dcp::VerificationNote const &a, dcp::VerificationNote const &b)
 
bool operator< (dcp::VerificationNote const &a, dcp::VerificationNote const &b)
 
std::ostream & operator<< (std::ostream &s, dcp::VerificationNote const &note)
 
void verify_text_lines_and_characters (std::shared_ptr< const dcp::TextAsset > asset, int warning_length, int error_length, dcp::LinesCharactersResult *result)
 
void verify_extension_metadata (dcp::Context &context)
 
void verify_j2k (std::shared_ptr< const Data > data, int start_index, int frame_index, int frame_rate, std::vector< VerificationNote > &notes)
 
void verify_report (dcp::VerificationResult const &result, Formatter &formatter)
 
template<class T >
std::shared_ptr< T > optional_type_child (cxml::Node const &node, std::string name)
 
template<class T >
std::shared_ptr< T > type_child (std::shared_ptr< const cxml::Node > node, std::string name)
 
template<class T >
std::shared_ptr< T > optional_type_child (std::shared_ptr< const cxml::Node > node, std::string name)
 
template<class T >
std::vector< std::shared_ptr< T > > type_children (cxml::Node const &node, std::string name)
 
template<class T >
std::vector< std::shared_ptr< T > > type_children (std::shared_ptr< const cxml::Node > node, std::string name)
 
template<class T >
std::vector< std::shared_ptr< T > > type_grand_children (cxml::Node const &node, std::string name, std::string sub)
 
template<class T >
std::vector< std::shared_ptr< T > > type_grand_children (std::shared_ptr< const cxml::Node > node, std::string name, std::string sub)
 

Variables

constexpr float ASPECT_ADJUST_EPSILON = 1e-3
 
constexpr float ALIGN_EPSILON = 1e-3
 
constexpr float SPACE_BEFORE_EPSILON = 1e-3
 
constexpr float SIZE_EPSILON = 1e-3
 
constexpr float OFFSET_EPSILON = 1e-3
 
constexpr float SPACING_EPSILON = 1e-3
 
ASDCP::Dictionary const * asdcp_smpte_dict = nullptr
 
char const * version
 
char const * git_commit
 
bool const built_with_debug
 

Detailed Description

Namespace for everything in libdcp.

Enumeration Type Documentation

◆ Channel

enum dcp::Channel
strong

Identifier for a sound channel

Enumerator
LEFT 

left

RIGHT 

right

CENTRE 

centre

LFE 

low-frequency effects (sub)

LS 

left surround

RS 

right surround

LC 

not used, but referred to in MainSoundConfiguration in some CPLs

RC 

not used, but referred to in MainSoundConfiguration in some CPLs

Definition at line 93 of file types.h.

◆ Direction

enum dcp::Direction
strong

Direction for subtitle test

Enumerator
LTR 

left-to-right

RTL 

right-to-left

TTB 

top-to-bottom

BTT 

bottom-to-top

Definition at line 144 of file types.h.

◆ HAlign

enum dcp::HAlign
strong
Enumerator
LEFT 

horizontal position is distance from left of screen to left of subtitle

CENTER 

horizontal position is distance from centre of screen to centre of subtitle

RIGHT 

horizontal position is distance from right of screen to right of subtitle

Definition at line 45 of file h_align.h.

◆ Marker

enum dcp::Marker
strong
Enumerator
FFOC 

first frame of composition

LFOC 

last frame of composition

FFTC 

first frame of title credits

LFTC 

last frame of title credits

FFOI 

first frame of intermission

LFOI 

last frame of intermission

FFEC 

first frame of end credits

LFEC 

last frame of end credits

FFMC 

first frame of moving credits

LFMC 

last frame of moving credits

FFOB 

first frame of ratings band

LFOB 

last frame of ratings band

Definition at line 286 of file types.h.

◆ Status

enum dcp::Status
strong
Enumerator
FINAL 

final version

TEMP 

temporary version (picture/sound unfinished)

PRE 

pre-release (picture/sound finished)

Definition at line 306 of file types.h.

◆ VAlign

enum dcp::VAlign
strong
Enumerator
TOP 

vertical position is distance: from top of screen to top of subtitle (for SMPTE 428-7:{2007,2010} or from top of screen to subtitle baseline (for Interop or SMPTE 428-7:2014)

CENTER 

vertical position is distance: from centre of screen to centre of subtitle (for SMPTE 428-7:{2007,2010}) or from centre of screen to subtitle baseline (for Interop or SMPTE 428-7:2014)

BOTTOM 

vertical position is distance: from bottom of screen to bottom of subtitle (for SMPTE 428-7:{2007,2010}) or from bottom of screen to subtitle baseline (for Interop or SMPTE 428-7:2014)

Definition at line 45 of file v_align.h.

Function Documentation

◆ asset_factory()

shared_ptr< Asset > dcp::asset_factory ( boost::filesystem::path  path,
bool  ignore_incorrect_picture_mxf_type,
bool *  found_threed_marked_as_twod = nullptr 
)

Create an Asset from a file.

Parameters
ignore_incorrect_picture_mxf_typetrue to ignore cases where a stereo picture asset is marked as 2D; if this is false an exception will be thrown in that case.
ignored_incorrect_picture_mxf_typeif this is non-null it will be set to true if a 3D asset was marked as 2D, otherwise it will be left alone.

Definition at line 58 of file asset_factory.cc.

◆ base64_decode()

int dcp::base64_decode ( std::string const &  in,
unsigned char *  out,
int  out_length 
)

Decode a base64 string. The base64 decode routine in KM_util.cpp gives different values to both this and the command-line base64 for some inputs. Not sure why.

Parameters
inbase64-encoded string
outOutput buffer
out_lengthLength of output buffer
Returns
Number of characters written to the output buffer

Definition at line 195 of file util.cc.

◆ combined_rgb_to_xyz()

void dcp::combined_rgb_to_xyz ( ColourConversion const &  conversion,
double *  matrix 
)
Parameters
conversionColour conversion.
matrixFilled in with the product of the RGB to XYZ matrix, the Bradford transform and the DCI companding.

Definition at line 235 of file rgb_xyz.cc.

◆ compress_j2k()

ArrayData dcp::compress_j2k ( std::shared_ptr< const OpenJPEGImage xyz,
int  bandwidth,
int  frames_per_second,
bool  threed,
bool  fourk,
std::string  comment = "libdcp" 
)

@xyz Picture to compress. Parts of xyz's data WILL BE OVERWRITTEN by libopenjpeg so xyz cannot be re-used after this call; see opj_j2k_encode where if l_reuse_data is false it will set l_tilec->data = l_img_comp->data.

Definition at line 242 of file j2k_transcode.cc.

◆ day_greater_than_or_equal()

bool dcp::day_greater_than_or_equal ( LocalTime  a,
LocalTime  b 
)
Returns
true if the day represented by a is greater than or equal to the one represented by b, ignoring the time parts

Definition at line 372 of file util.cc.

◆ day_less_than_or_equal()

bool dcp::day_less_than_or_equal ( LocalTime  a,
LocalTime  b 
)
Returns
true if the day represented by a is less than or equal to the one represented by b, ignoring the time parts

Definition at line 357 of file util.cc.

◆ decompress_j2k()

shared_ptr< dcp::OpenJPEGImage > dcp::decompress_j2k ( uint8_t const *  data,
int64_t  size,
int  reduce 
)

Decompress a JPEG2000 image to a bitmap

Parameters
dataJPEG2000 data
sizeSize of data in bytes
reduceA power of 2 by which to reduce the size of the decoded image; e.g. 0 reduces by (2^0 == 1), ie keeping the same size. 1 reduces by (2^1 == 2), ie halving the size of the image. This is useful for scaling 4K DCP images down to 2K.
Returns
OpenJPEGImage

Definition at line 126 of file j2k_transcode.cc.

◆ find_and_resolve_cpls()

vector< shared_ptr< dcp::CPL > > dcp::find_and_resolve_cpls ( std::vector< boost::filesystem::path > const &  directories,
bool  tolerant 
)

Find all the CPLs in some directories and resolve any assets that are found

We accept and ignore some warnings / errors but everything else is bad

Definition at line 50 of file search.cc.

◆ init()

void dcp::init ( boost::optional< boost::filesystem::path >  resources_directory = boost::optional< boost::filesystem::path >())

Set up various bits that the library needs. Should be called once by client applications.

Parameters
resources_directoryPath to a directory containing the tags and xsd directories from the source code; if none is specified libdcp will look in the directory given by LIBDCP_RESOURCES or based on where the current executable is.

◆ make_digest()

std::string dcp::make_digest ( boost::filesystem::path  filename,
boost::function< void(int64_t, int64_t)>   
)

Create a digest for a file

Parameters
filenameFile name
progressOptional progress reporting function, called with a number of bytes done and a total number of bytes.
Returns
Digest

◆ private_key_fingerprint()

string dcp::private_key_fingerprint ( std::string  key)
Parameters
keyRSA private key in PEM format (optionally with --—BEGIN... / --—END...)
Returns
SHA1 fingerprint of key

Definition at line 288 of file util.cc.

◆ public_key_digest()

string dcp::public_key_digest ( boost::filesystem::path  private_key_file)

Extract a public key from a private key and create a SHA1 digest of it.

Parameters
private_key_filePrivate key filename
opensslopenssl binary name (or full path if openssl is not on the system path).
Returns
SHA1 digest of corresponding public key, with escaped / characters.

Definition at line 172 of file certificate_chain.cc.

◆ raw_convert()

template<typename P , typename Q >
P dcp::raw_convert ( ,
int  precision = 16,
bool  fixed = false 
)

A sort-of version of boost::lexical_cast that does uses the "C" locale (i.e. no thousands separators and a . for the decimal separator).

Definition at line 57 of file raw_convert.h.

◆ rgb_to_xyz() [1/2]

shared_ptr< dcp::OpenJPEGImage > dcp::rgb_to_xyz ( uint8_t const *  rgb,
dcp::Size  size,
int  stride,
ColourConversion const &  conversion 
)
Parameters
rgbRGB data; packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, with the 2-byte value for each R/G/B component stored as little-endian; i.e. AV_PIX_FMT_RGB48LE.
sizesize of RGB image in pixels.
sizestride of RGB data in pixels.

Definition at line 328 of file rgb_xyz.cc.

◆ rgb_to_xyz() [2/2]

void dcp::rgb_to_xyz ( uint8_t const *  rgb,
uint16_t *  dst,
dcp::Size  size,
int  stride,
ColourConversion const &  conversion 
)
Parameters
rgbRGB data; packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, with the 2-byte value for each R/G/B component stored as little-endian; i.e. AV_PIX_FMT_RGB48LE.
dstBuffer to fill with packed 16-bit XYZ data, i.e. first 16-bit word is X, second is Y etc.
sizesize of RGB image in pixels.
sizestride of RGB data in pixels.

Definition at line 348 of file rgb_xyz.cc.

◆ unique_string()

string dcp::unique_string ( std::vector< std::string >  existing,
std::string  base 
)

Try quite hard to find a string which starts with base and is not in existing

Definition at line 387 of file util.cc.

◆ verify_j2k()

void dcp::verify_j2k ( std::shared_ptr< const Data data,
int  start_index,
int  frame_index,
int  frame_rate,
std::vector< VerificationNote > &  notes 
)
Parameters
start_indexFrame index within the DCP where this frame's reel starts.
frame_indexVideo frame index within the reel, so that notes can say which frame contains the problem.
frame_rateVideo frame rate (in frames per second) to calculate how big the tile parts can be.

number of POC markers in the main header

number of POC markers after the main header

Definition at line 68 of file verify_j2k.cc.

◆ verify_text_lines_and_characters()

void dcp::verify_text_lines_and_characters ( std::shared_ptr< const dcp::TextAsset asset,
int  warning_length,
int  error_length,
dcp::LinesCharactersResult result 
)

< vertical position from 0 at top of screen to 100 at bottom

< number of characters in the text of this event

Definition at line 1131 of file verify.cc.

◆ xyz_to_rgb()

void dcp::xyz_to_rgb ( std::shared_ptr< const OpenJPEGImage ,
ColourConversion const &  conversion,
uint8_t *  rgb,
int  stride,
boost::optional< NoteHandler >  note = boost::optional< NoteHandler >() 
)

Convert an XYZ image to 48bpp RGB.

Parameters
xyz_imageFrame in XYZ.
conversionColour conversion to use.
rgbBuffer to fill with RGB data. Format is packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, with the 2-byte value for each R/G/B component stored as little-endian; i.e. AV_PIX_FMT_RGB48LE.
strideStride for RGB data in bytes.
noteOptional handler for any notes that may be made during the conversion (e.g. when clamping occurs).

◆ xyz_to_rgba()

void dcp::xyz_to_rgba ( std::shared_ptr< const OpenJPEGImage xyz_image,
ColourConversion const &  conversion,
uint8_t *  rgba,
int  stride 
)

Convert an XYZ image to RGBA.

Parameters
xyz_imageImage in XYZ.
conversionColour conversion to use.
argbBuffer to fill with RGBA data. The format of the data is:
Byte   /- 0 -------|- 1 --------|- 2 --------|- 3 --------|- 4 --------|- 5 --------| ...
       |(0, 0) Blue|(0, 0)Green |(0, 0) Red  |(0, 0) Alpha|(0, 1) Blue |(0, 1) Green| ...

So that the first byte is the blue component of the pixel at x=0, y=0, the second is the green component, and so on.

Lines are packed so that the second row directly follows the first.

Definition at line 63 of file rgb_xyz.cc.

Variable Documentation

◆ ALIGN_EPSILON

constexpr float dcp::ALIGN_EPSILON = 1e-3
constexpr

Maximum absolute difference between dcp::TextString alignment values that are considered equal.

Definition at line 272 of file types.h.

◆ ASPECT_ADJUST_EPSILON

constexpr float dcp::ASPECT_ADJUST_EPSILON = 1e-3
constexpr

Maximum absolute difference between dcp::TextString::aspect_adjust values that are considered equal

Definition at line 266 of file types.h.

◆ SPACE_BEFORE_EPSILON

constexpr float dcp::SPACE_BEFORE_EPSILON = 1e-3
constexpr

Maximum absolute difference between dcp::TextString space_before values that are considered equal.

Definition at line 278 of file types.h.