libdcp
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
dcp::MonoPictureAssetWriter Class Reference

A helper class for writing to MonoPictureAssets. More...

#include <mono_picture_asset_writer.h>

Inheritance diagram for dcp::MonoPictureAssetWriter:
dcp::PictureAssetWriter dcp::AssetWriter

Classes

struct  ASDCPState
 

Public Member Functions

FrameInfo write (uint8_t const *, int) override
 
void fake_write (int size) override
 
bool finalize () override
 
- Public Member Functions inherited from dcp::PictureAssetWriter
FrameInfo write (Data const &data)
 
- Public Member Functions inherited from dcp::AssetWriter
 AssetWriter (AssetWriter const &)=delete
 
AssetWriteroperator= (AssetWriter const &)=delete
 
int64_t frames_written () const
 

Private Member Functions

 MonoPictureAssetWriter (PictureAsset *a, boost::filesystem::path file, bool)
 
void start (uint8_t const *, int)
 

Private Attributes

std::shared_ptr< ASDCPState > _state
 

Friends

class MonoPictureAsset
 

Additional Inherited Members

- Protected Member Functions inherited from dcp::PictureAssetWriter
 PictureAssetWriter (PictureAsset *, boost::filesystem::path, bool)
 
- Protected Member Functions inherited from dcp::AssetWriter
 AssetWriter (MXF *mxf, boost::filesystem::path file)
 
- Protected Attributes inherited from dcp::PictureAssetWriter
PictureAsset_picture_asset = nullptr
 
bool _overwrite = false
 
- Protected Attributes inherited from dcp::AssetWriter
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

A helper class for writing to MonoPictureAssets.

Objects of this class can only be created with MonoPictureAsset::start_write().

Frames can be written to the MonoPictureAsset by calling write() with a JPEG2000 image (a verbatim .j2c file). finalize() must be called after the last frame has been written. The action of finalize() can't be done in MonoPictureAssetWriter's destructor as it may throw an exception.

Definition at line 64 of file mono_picture_asset_writer.h.

Constructor & Destructor Documentation

◆ MonoPictureAssetWriter()

MonoPictureAssetWriter::MonoPictureAssetWriter ( PictureAsset asset,
boost::filesystem::path  file,
bool  overwrite 
)
private
Parameters
aAsset to write to. ‘a’ must not be deleted while this writer class still exists, or bad things will happen.

Definition at line 69 of file mono_picture_asset_writer.cc.

Member Function Documentation

◆ finalize()

bool MonoPictureAssetWriter::finalize ( )
overridevirtual
Returns
true if anything was written by this writer

Reimplemented from dcp::AssetWriter.

Definition at line 127 of file mono_picture_asset_writer.cc.


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