libdcp
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
dcp::ReelAsset Class Referenceabstract

An entry in a <Reel> which refers to a use of a piece of content. More...

#include <reel_asset.h>

Inheritance diagram for dcp::ReelAsset:
dcp::Object dcp::ReelFileAsset dcp::ReelMarkersAsset dcp::ReelAtmosAsset dcp::ReelClosedCaptionAsset dcp::ReelPictureAsset dcp::ReelSoundAsset dcp::ReelSubtitleAsset dcp::ReelInteropClosedCaptionAsset dcp::ReelSMPTEClosedCaptionAsset dcp::ReelMonoPictureAsset dcp::ReelStereoPictureAsset dcp::ReelInteropSubtitleAsset dcp::ReelSMPTESubtitleAsset

Public Member Functions

 ReelAsset (std::string id, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point)
 
 ReelAsset (std::shared_ptr< const cxml::Node >)
 
virtual xmlpp::Node * write_to_cpl (xmlpp::Node *node, Standard standard) const
 
virtual bool encryptable () const
 
Fraction edit_rate () const
 
int64_t intrinsic_duration () const
 
void set_entry_point (int64_t e)
 
void unset_entry_point ()
 
boost::optional< int64_t > entry_point () const
 
void set_duration (int64_t d)
 
boost::optional< int64_t > duration () const
 
int64_t actual_duration () const
 
boost::optional< std::string > annotation_text () const
 
void set_annotation_text (std::string at)
 
void unset_annotation_text ()
 
bool asset_equals (std::shared_ptr< const ReelAsset >, EqualityOptions, NoteHandler) const
 
- Public Member Functions inherited from dcp::Object
 Object ()
 
 Object (std::string id)
 
 Object (Object const &)=delete
 
Objectoperator= (Object const &)=delete
 
std::string id () const
 

Protected Member Functions

virtual std::string cpl_node_name (Standard) const =0
 
virtual std::pair< std::string, std::string > cpl_node_attribute (Standard) const
 
virtual std::pair< std::string, std::string > cpl_node_namespace () const
 

Protected Attributes

int64_t _intrinsic_duration = 0
 The <IntrinsicDuration> from the reel's entry for this asset.
 
boost::optional< int64_t > _duration
 The <Duration> from the reel's entry for this asset, if present.
 
- Protected Attributes inherited from dcp::Object
std::string _id
 

Private Attributes

boost::optional< std::string > _annotation_text
 The <AnnotationText> from the reel's entry for this asset.
 
Fraction _edit_rate
 The <EditRate> from the reel's entry for this asset.
 
boost::optional< int64_t > _entry_point
 The <EntryPoint> from the reel's entry for this asset.
 

Detailed Description

An entry in a <Reel> which refers to a use of a piece of content.

This class encapsulates the XML that exists in a <Reel> to say that a piece of content is used in this reel. It does not describe the content itself (but links to an Asset object which does).

Definition at line 73 of file reel_asset.h.

Constructor & Destructor Documentation

◆ ReelAsset()

ReelAsset::ReelAsset ( std::string  id,
Fraction  edit_rate,
int64_t  intrinsic_duration,
int64_t  entry_point 
)

Construct a ReelAsset

Parameters
idID of this ReelAsset (which is that of the MXF, if there is one)
edit_rateEdit rate for the asset
intrinsic_durationIntrinsic duration of this asset
entry_pointEntry point to use in that asset

Definition at line 60 of file reel_asset.cc.

Member Function Documentation

◆ actual_duration()

int64_t ReelAsset::actual_duration ( ) const
Returns
<Duration>, or <IntrinsicDuration> - <EntryPoint> if <Duration> is not present

Definition at line 164 of file reel_asset.cc.

◆ cpl_node_attribute()

pair< string, string > ReelAsset::cpl_node_attribute ( Standard  ) const
protectedvirtual
Returns
Any attribute that should be used on the asset's node in the CPL

Reimplemented in dcp::ReelStereoPictureAsset.

Definition at line 113 of file reel_asset.cc.

◆ cpl_node_name()

virtual std::string dcp::ReelAsset::cpl_node_name ( Standard  ) const
protectedpure virtual

◆ cpl_node_namespace()

pair< string, string > ReelAsset::cpl_node_namespace ( ) const
protectedvirtual
Returns
Any namespace that should be used on the asset's node in the CPL

Reimplemented in dcp::ReelSMPTEClosedCaptionAsset, dcp::ReelInteropClosedCaptionAsset, and dcp::ReelAtmosAsset.

Definition at line 120 of file reel_asset.cc.


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