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

Parent class for classes which can write MXF-based assets. More...

#include <asset_writer.h>

Inheritance diagram for dcp::AssetWriter:
dcp::AtmosAssetWriter dcp::PictureAssetWriter dcp::SoundAssetWriter dcp::MonoPictureAssetWriter dcp::StereoPictureAssetWriter

Public Member Functions

 AssetWriter (AssetWriter const &)=delete
 
AssetWriteroperator= (AssetWriter const &)=delete
 
virtual bool finalize ()
 
int64_t frames_written () const
 

Protected Member Functions

 AssetWriter (MXF *mxf, boost::filesystem::path file)
 

Protected Attributes

MXF_mxf = nullptr
 
boost::filesystem::path _file
 
int64_t _frames_written = 0
 
bool _finalized = false
 
bool _started = false
 
std::shared_ptr< EncryptionContext_crypto_context
 

Detailed Description

Parent class for classes which can write MXF-based assets.

The AssetWriter lasts for the duration of the write and is then discarded. They can only be created by calling start_write() on an appropriate Asset object.

Definition at line 61 of file asset_writer.h.

Constructor & Destructor Documentation

◆ AssetWriter()

AssetWriter::AssetWriter ( MXF mxf,
boost::filesystem::path  file 
)
protected

Create an AssetWriter.

Parameters
mxfMXF that we are writing.
fileFile to write to.

Definition at line 55 of file asset_writer.cc.

Member Function Documentation

◆ finalize()

bool AssetWriter::finalize ( )
virtual
Returns
true if anything was written by this writer

Reimplemented in dcp::StereoPictureAssetWriter, dcp::SoundAssetWriter, dcp::MonoPictureAssetWriter, and dcp::AtmosAssetWriter.

Definition at line 65 of file asset_writer.cc.

Member Data Documentation

◆ _file

boost::filesystem::path dcp::AssetWriter::_file
protected

File that we are writing to

Definition at line 82 of file asset_writer.h.

◆ _finalized

bool dcp::AssetWriter::_finalized = false
protected

true if finalize() has been called on this object

Definition at line 88 of file asset_writer.h.

◆ _frames_written

int64_t dcp::AssetWriter::_frames_written = 0
protected

Number of ‘frames’ written so far; the definition of a frame varies depending on the subclass.

Definition at line 86 of file asset_writer.h.

◆ _mxf

MXF* dcp::AssetWriter::_mxf = nullptr
protected

MXF that we are writing

Definition at line 80 of file asset_writer.h.

◆ _started

bool dcp::AssetWriter::_started = false
protected

true if something has been written to this asset

Definition at line 90 of file asset_writer.h.


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