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

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

#include <stereo_j2k_picture_asset_writer.h>

Inheritance diagram for dcp::StereoJ2KPictureAssetWriter:
dcp::J2KPictureAssetWriter dcp::AssetWriter

Classes

struct  ASDCPState
 

Public Member Functions

J2KFrameInfo write (uint8_t const *data, int size) override
 
void fake_write (J2KFrameInfo const &info) override
 
bool finalize () override
 
- Public Member Functions inherited from dcp::J2KPictureAssetWriter
J2KFrameInfo 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

 StereoJ2KPictureAssetWriter (J2KPictureAsset *, boost::filesystem::path file, bool)
 
void start (uint8_t const *, int)
 

Private Attributes

std::shared_ptr< ASDCPState > _state
 
dcp::Eye _next_eye = Eye::LEFT
 

Friends

class StereoJ2KPictureAsset
 

Additional Inherited Members

- Protected Member Functions inherited from dcp::J2KPictureAssetWriter
 J2KPictureAssetWriter (J2KPictureAsset *, boost::filesystem::path, bool)
 
- Protected Member Functions inherited from dcp::AssetWriter
 AssetWriter (MXF *mxf, boost::filesystem::path file)
 
- Protected Attributes inherited from dcp::J2KPictureAssetWriter
J2KPictureAsset_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 StereoJ2KPictureAssets.

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

Frames can be written to the StereoJ2KPictureAsset by calling write() with a JPEG2000 image (a verbatim .j2c file). finalize() should be called after the last frame has been written, but if it is not, it will be called by the destructor (though in that case any error during finalization will be ignored).

Definition at line 59 of file stereo_j2k_picture_asset_writer.h.

Member Function Documentation

◆ finalize()

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

Reimplemented from dcp::AssetWriter.

Definition at line 149 of file stereo_j2k_picture_asset_writer.cc.

◆ write()

J2KFrameInfo StereoJ2KPictureAssetWriter::write ( uint8_t const *  data,
int  size 
)
overridevirtual

Write a frame for one eye. Frames must be written left, then right, then left etc.

Parameters
dataJPEG2000 data.
sizeSize of data.

Implements dcp::J2KPictureAssetWriter.

Definition at line 91 of file stereo_j2k_picture_asset_writer.cc.


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