vdr-plugin-softhddevice-drm-gles 1.6.7
cGrabBuffer Class Reference

Grabbing Buffer. More...

#include <grab.h>

Public Member Functions

 cGrabBuffer (const char *identifier)
 
void FreeInput (void)
 Free the grab input buffer.
 
void Clear (void)
 Clear the grab buffer (input and output data)
 
void Set (cDrmBuffer *)
 Set the grab buffer and the dimensions how it is presented on the screen.
 
bool IsSet (void)
 
uint8_tConvertToRgb (int *)
 Convert a grabbed buffer to rgb format image.
 
void SetOutputData (uint8_t *result)
 
uint8_tGetOutputData (void)
 
void SetOutputSize (int size)
 
int GetOutputSize (void)
 
int GetOutputX (void)
 
int GetOutputY (void)
 
int GetOutputWidth (void)
 
int GetOutputHeight (void)
 

Private Attributes

uint8_tm_pOutputData = nullptr
 pointer to grabbed image
 
int m_outputSize = 0
 size of grabbed data
 
cRect m_outputRect
 rect of the grabbed data
 
uint32_t m_width = 0
 
uint32_t m_height = 0
 
uint32_t m_pixFmt = 0
 
uint64_t m_modifier = 0
 
int m_numPlanes = 0
 
uint8_tm_pPlane [4] = {}
 
uint32_t m_offset [4] = {}
 
uint32_t m_pitch [4] = {}
 
uint32_t m_size [4] = {}
 
const charm_identifier
 

Detailed Description

Grabbing Buffer.

Holds the data for a grabbed buffer. The grab is triggered by VDR/ cSoftHdDevice, data is set by the renderer and composed by cSoftHdDevice again.

Definition at line 32 of file grab.h.

Constructor & Destructor Documentation

◆ cGrabBuffer()

cGrabBuffer::cGrabBuffer ( const char identifier)
inline

Definition at line 34 of file grab.h.

Member Function Documentation

◆ Clear()

void cGrabBuffer::Clear ( void  )

Clear the grab buffer (input and output data)

Definition at line 429 of file grab.cpp.

References FreeInput(), m_outputRect, m_outputSize, and m_pOutputData.

Referenced by cVideoRender::ClearGrabBuffers().

◆ ConvertToRgb()

uint8_t * cGrabBuffer::ConvertToRgb ( int size)

Convert a grabbed buffer to rgb format image.

Conversion is done with ffmpegs swscale

Parameters
[out]sizesize of the return data
Returns
a pointer to the image data

Definition at line 523 of file grab.cpp.

References DrmFormatToAVFormat(), GetOutputHeight(), GetOutputWidth(), L_GRAB, LOGDEBUG2, LOGERROR, m_height, m_identifier, m_modifier, m_numPlanes, m_offset, m_pitch, m_pixFmt, m_pPlane, m_width, Sand128ToPlanarY8(), Sand30ToPlanarC16(), and Sand30ToPlanarY16().

◆ FreeInput()

void cGrabBuffer::FreeInput ( void  )

Free the grab input buffer.

Definition at line 397 of file grab.cpp.

References L_GRAB, LOGDEBUG2, m_height, m_identifier, m_modifier, m_numPlanes, m_offset, m_outputRect, m_pitch, m_pixFmt, m_pPlane, m_size, m_width, and plane.

Referenced by Clear().

◆ GetOutputData()

uint8_t * cGrabBuffer::GetOutputData ( void  )
inline

Definition at line 44 of file grab.h.

References m_pOutputData.

◆ GetOutputHeight()

int cGrabBuffer::GetOutputHeight ( void  )
inline

Definition at line 50 of file grab.h.

References m_outputRect.

Referenced by ConvertToRgb().

◆ GetOutputSize()

int cGrabBuffer::GetOutputSize ( void  )
inline

Definition at line 46 of file grab.h.

References m_outputSize.

◆ GetOutputWidth()

int cGrabBuffer::GetOutputWidth ( void  )
inline

Definition at line 49 of file grab.h.

References m_outputRect.

Referenced by ConvertToRgb().

◆ GetOutputX()

int cGrabBuffer::GetOutputX ( void  )
inline

Definition at line 47 of file grab.h.

References m_outputRect.

◆ GetOutputY()

int cGrabBuffer::GetOutputY ( void  )
inline

Definition at line 48 of file grab.h.

References m_outputRect.

◆ IsSet()

bool cGrabBuffer::IsSet ( void  )
inline

Definition at line 39 of file grab.h.

References m_outputRect.

◆ Set()

void cGrabBuffer::Set ( cDrmBuffer src)

Set the grab buffer and the dimensions how it is presented on the screen.

Parameters
srcoriginal drm buffer, where the parameters and data is copied from

Definition at line 443 of file grab.cpp.

References L_GRAB, LOGDEBUG2, LOGERROR, m_height, m_identifier, m_modifier, m_numPlanes, m_offset, m_outputRect, m_pitch, m_pixFmt, m_pPlane, m_size, m_width, and plane.

Referenced by cVideoRender::CreateGrabBuffers().

◆ SetOutputData()

void cGrabBuffer::SetOutputData ( uint8_t result)
inline

Definition at line 43 of file grab.h.

References m_pOutputData.

◆ SetOutputSize()

void cGrabBuffer::SetOutputSize ( int  size)
inline

Definition at line 45 of file grab.h.

References m_outputSize.

Member Data Documentation

◆ m_height

uint32_t cGrabBuffer::m_height = 0
private

Definition at line 60 of file grab.h.

Referenced by ConvertToRgb(), FreeInput(), and Set().

◆ m_identifier

const char* cGrabBuffer::m_identifier
private

Definition at line 69 of file grab.h.

Referenced by ConvertToRgb(), FreeInput(), and Set().

◆ m_modifier

uint64_t cGrabBuffer::m_modifier = 0
private

Definition at line 62 of file grab.h.

Referenced by ConvertToRgb(), FreeInput(), and Set().

◆ m_numPlanes

int cGrabBuffer::m_numPlanes = 0
private

Definition at line 63 of file grab.h.

Referenced by ConvertToRgb(), FreeInput(), and Set().

◆ m_offset

uint32_t cGrabBuffer::m_offset[4] = {}
private

Definition at line 65 of file grab.h.

Referenced by ConvertToRgb(), FreeInput(), and Set().

◆ m_outputRect

cRect cGrabBuffer::m_outputRect
private

rect of the grabbed data

Definition at line 56 of file grab.h.

Referenced by Clear(), FreeInput(), GetOutputHeight(), GetOutputWidth(), GetOutputX(), GetOutputY(), IsSet(), and Set().

◆ m_outputSize

int cGrabBuffer::m_outputSize = 0
private

size of grabbed data

Definition at line 55 of file grab.h.

Referenced by Clear(), GetOutputSize(), and SetOutputSize().

◆ m_pitch

uint32_t cGrabBuffer::m_pitch[4] = {}
private

Definition at line 66 of file grab.h.

Referenced by ConvertToRgb(), FreeInput(), and Set().

◆ m_pixFmt

uint32_t cGrabBuffer::m_pixFmt = 0
private

Definition at line 61 of file grab.h.

Referenced by ConvertToRgb(), FreeInput(), and Set().

◆ m_pOutputData

uint8_t* cGrabBuffer::m_pOutputData = nullptr
private

pointer to grabbed image

Definition at line 54 of file grab.h.

Referenced by Clear(), GetOutputData(), and SetOutputData().

◆ m_pPlane

uint8_t* cGrabBuffer::m_pPlane[4] = {}
private

Definition at line 64 of file grab.h.

Referenced by ConvertToRgb(), FreeInput(), and Set().

◆ m_size

uint32_t cGrabBuffer::m_size[4] = {}
private

Definition at line 67 of file grab.h.

Referenced by FreeInput(), and Set().

◆ m_width

uint32_t cGrabBuffer::m_width = 0
private

Definition at line 59 of file grab.h.

Referenced by ConvertToRgb(), FreeInput(), and Set().


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