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

A single frame of a 2D (monoscopic) picture asset. More...

#include <mono_j2k_picture_frame.h>

Inheritance diagram for dcp::MonoJ2KPictureFrame:
dcp::Data

Public Member Functions

 MonoJ2KPictureFrame (boost::filesystem::path path)
 
 MonoJ2KPictureFrame (uint8_t const *data, int size)
 
 MonoJ2KPictureFrame (MonoJ2KPictureFrame const &)=delete
 
MonoJ2KPictureFrameoperator= (MonoJ2KPictureFrame const &)=delete
 
std::shared_ptr< OpenJPEGImagexyz_image (int reduce=0) const
 
uint8_t const * data () const override
 
uint8_t * data () override
 
int size () const override
 
- Public Member Functions inherited from dcp::Data
void write (boost::filesystem::path file) const
 
void write_via_temp (boost::filesystem::path temp, boost::filesystem::path final) const
 

Private Member Functions

 MonoJ2KPictureFrame (ASDCP::JP2K::MXFReader *reader, int n, std::shared_ptr< DecryptionContext >, bool check_hmac)
 

Private Attributes

std::shared_ptr< ASDCP::JP2K::FrameBuffer > _buffer
 

Friends

class AssetReader< ASDCP::JP2K::MXFReader, MonoJ2KPictureFrame >
 

Detailed Description

A single frame of a 2D (monoscopic) picture asset.

Definition at line 70 of file mono_j2k_picture_frame.h.

Constructor & Destructor Documentation

◆ MonoJ2KPictureFrame() [1/2]

MonoJ2KPictureFrame::MonoJ2KPictureFrame ( boost::filesystem::path  path)
explicit

Make a picture frame from a JPEG2000 file.

Parameters
pathPath to JPEG2000 file.

Definition at line 61 of file mono_j2k_picture_frame.cc.

◆ MonoJ2KPictureFrame() [2/2]

MonoJ2KPictureFrame::MonoJ2KPictureFrame ( ASDCP::JP2K::MXFReader *  reader,
int  n,
std::shared_ptr< DecryptionContext c,
bool  check_hmac 
)
private

Make a picture frame from a 2D (monoscopic) asset.

Parameters
readerReader for the asset's MXF file.
nFrame within the asset, not taking EntryPoint into account.
cContext for decryption, or 0.
check_hmactrue to check the HMAC and give an error if it is not as expected.

Definition at line 84 of file mono_j2k_picture_frame.cc.

Member Function Documentation

◆ data() [1/2]

uint8_t const * MonoJ2KPictureFrame::data ( ) const
overridevirtual
Returns
Pointer to JPEG2000 data

Implements dcp::Data.

Definition at line 106 of file mono_j2k_picture_frame.cc.

◆ data() [2/2]

uint8_t * MonoJ2KPictureFrame::data ( )
overridevirtual
Returns
Pointer to JPEG2000 data

Implements dcp::Data.

Definition at line 113 of file mono_j2k_picture_frame.cc.

◆ size()

int MonoJ2KPictureFrame::size ( ) const
overridevirtual
Returns
Size of JPEG2000 data in bytes

Implements dcp::Data.

Definition at line 120 of file mono_j2k_picture_frame.cc.

◆ xyz_image()

shared_ptr< OpenJPEGImage > MonoJ2KPictureFrame::xyz_image ( int  reduce = 0) const
Parameters
reducea factor by which to reduce the resolution of the image, expressed as a power of two (pass 0 for no reduction).

Definition at line 127 of file mono_j2k_picture_frame.cc.


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