vdr-plugin-softhddevice-drm-gles 1.6.4-d0291bb
cHdrMetadata Class Reference

HDR Metadata. More...

#include <drmhdr.h>

Public Member Functions

 cHdrMetadata (cVideoRender *render)
 
int Build (struct hdr_output_metadata *, int, int, AVFrameSideData *, AVFrameSideData *)
 Build an HDR static metadata blob.
 
int GetColorPrimaries (void)
 
int GetColorTrc (void)
 

Private Attributes

cVideoRenderm_pRender
 pointer to cVideoRender object
 
int m_colorPrimaries = -1
 saved color primaries
 
int m_colorTrc = -1
 saved transfer charateristics
 
AVMasteringDisplayMetadata m_mdMetadata = { }
 saved mastering display metadata fron AVFrame sidedata
 
AVContentLightMetadata m_clMetadata = { }
 saved content light metadata fron AVFrame sidedata
 
struct colorspace m_hdr10
 hdr colorspace
 

Detailed Description

HDR Metadata.

Definition at line 109 of file drmhdr.h.

Constructor & Destructor Documentation

◆ cHdrMetadata()

cHdrMetadata::cHdrMetadata ( cVideoRender render)
inline

Definition at line 111 of file drmhdr.h.

Member Function Documentation

◆ Build()

int cHdrMetadata::Build ( struct hdr_output_metadata data,
int  colorPrimaries,
int  colorTrc,
AVFrameSideData sd1,
AVFrameSideData sd2 
)

Build an HDR static metadata blob.

Parameters
[out]datablob data
[in]colorPrimariescolor primaries
[in]colorTrctransfer characteristics
[in]sd1mastering display metadata from ffmpeg frame's sidedata
[in]sd2content light metadata from ffmpeg frame's sidedata
Return values
0on success
-1on error

Definition at line 58 of file drmhdr.cpp.

References cVideoRender::CanHandleHdr(), colorspace_lookup(), EncodeXYY(), EOTF_HLG, EOTF_ST2084, EOTF_TRADITIONAL_GAMMA_SDR, vector::f, L_DRM, LOGDEBUG2, m_clMetadata, m_colorPrimaries, m_colorTrc, m_hdr10, m_mdMetadata, m_pRender, and METADATA_TYPE1.

Referenced by cVideoRender::SetVideoBuffer().

◆ GetColorPrimaries()

int cHdrMetadata::GetColorPrimaries ( void  )
inline

Definition at line 113 of file drmhdr.h.

References m_colorPrimaries.

Referenced by cVideoRender::SetColorSpace().

◆ GetColorTrc()

int cHdrMetadata::GetColorTrc ( void  )
inline

Definition at line 114 of file drmhdr.h.

References m_colorTrc.

Member Data Documentation

◆ m_clMetadata

AVContentLightMetadata cHdrMetadata::m_clMetadata = { }
private

saved content light metadata fron AVFrame sidedata

Definition at line 121 of file drmhdr.h.

Referenced by Build().

◆ m_colorPrimaries

int cHdrMetadata::m_colorPrimaries = -1
private

saved color primaries

Definition at line 118 of file drmhdr.h.

Referenced by Build(), and GetColorPrimaries().

◆ m_colorTrc

int cHdrMetadata::m_colorTrc = -1
private

saved transfer charateristics

Definition at line 119 of file drmhdr.h.

Referenced by Build(), and GetColorTrc().

◆ m_hdr10

struct colorspace cHdrMetadata::m_hdr10
private

hdr colorspace

Definition at line 122 of file drmhdr.h.

Referenced by Build().

◆ m_mdMetadata

AVMasteringDisplayMetadata cHdrMetadata::m_mdMetadata = { }
private

saved mastering display metadata fron AVFrame sidedata

Definition at line 120 of file drmhdr.h.

Referenced by Build().

◆ m_pRender

cVideoRender* cHdrMetadata::m_pRender
private

pointer to cVideoRender object

Definition at line 117 of file drmhdr.h.

Referenced by Build().


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