vdr-plugin-softhddevice-drm-gles 1.5.9-20e15de
cSoftHdGrab Class Reference

cSoftHdGrab - Grabber class More...

#include <grab.h>

Public Member Functions

 cSoftHdGrab (cVideoRender *render)
 
bool Active (void)
 
bool Start (bool, int, int, int, int, int)
 Start a grab in the video renderer.
 
uint8_t * Image (void)
 
int Size (void)
 

Private Member Functions

bool ProcessGrab (void)
 Start the conversion.
 
uint8_t * GetGrab (int *, int *, int *, int *, int *, Grabtype)
 Convert the cloned drm buffer data to RGB(void, pip) or ARGB (osd) and returns a pointer to the raw data.
 

Private Attributes

cVideoRenderm_pRender
 
uint8_t * m_grabbedImage
 
int m_grabbedSize
 
bool m_isActive = false
 
bool m_isJpeg = true
 
int m_quality
 
int m_grabbedWidth
 
int m_grabbedHeight
 
int m_screenWidth
 
int m_screenHeight
 

Detailed Description

cSoftHdGrab - Grabber class

Definition at line 81 of file grab.h.

Constructor & Destructor Documentation

◆ cSoftHdGrab()

cSoftHdGrab::cSoftHdGrab ( cVideoRender render)
inline

Definition at line 84 of file grab.h.

Member Function Documentation

◆ Active()

bool cSoftHdGrab::Active ( void  )
inline

Definition at line 86 of file grab.h.

References m_isActive.

Referenced by cSoftHdDevice::GrabImage().

◆ GetGrab()

uint8_t * cSoftHdGrab::GetGrab ( int *  size,
int *  width,
int *  height,
int *  x,
int *  y,
Grabtype  type 
)
private

Convert the cloned drm buffer data to RGB(void, pip) or ARGB (osd) and returns a pointer to the raw data.

Parameters
[out]sizesize of the grabbed buffer
[out]widthwidth of the grabbed buffer
[out]heightheight of the grabbed buffer
[out]xx offset of the grabbed buffer
[out]yy offset of the grabbed buffer
[in]buffertype buffer type (Grabtype)
Returns
pointer to the raw buffer data

Definition at line 376 of file grab.cpp.

References BufToRgb(), cGrabBuffer::FreeDrmBuf(), cGrabBuffer::GetData(), cGrabBuffer::GetDrmBuf(), cVideoRender::GetGrabbedOsdBuffer(), cVideoRender::GetGrabbedPipBuffer(), cVideoRender::GetGrabbedVideoBuffer(), cGrabBuffer::GetHeight(), cGrabBuffer::GetSize(), cGrabBuffer::GetWidth(), cGrabBuffer::GetX(), cGrabBuffer::GetY(), GRABOSD, GRABPIP, GrabtypeToString(), GRABVIDEO, L_GRAB, LOGDEBUG2, LOGFATAL, m_pRender, cDrmBuffer::NumPlanes(), cDrmBuffer::Offset(), cDrmBuffer::Pitch(), cDrmBuffer::Plane(), cDrmBuffer::PrimeHandle(), cGrabBuffer::SetData(), cGrabBuffer::SetSize(), and cDrmBuffer::Size().

Referenced by ProcessGrab().

◆ Image()

uint8_t * cSoftHdGrab::Image ( void  )
inline

Definition at line 88 of file grab.h.

References m_grabbedImage.

Referenced by cSoftHdDevice::GrabImage().

◆ ProcessGrab()

bool cSoftHdGrab::ProcessGrab ( void  )
private

Start the conversion.

This does the following: 1) Get grabbed video data if available, otherwise create a black screen for video 2) Get grabbed pip data if available 3) Get grabbed osd data if available 4) Blit the video data into a black background image if it is scaled 5) If available, blit the pip data onto it 6) If available, blit the osd data onto it respecting alpha values 7) Scale the result to the user requested size 8) Create a jpg or pnm image as requested

Definition at line 450 of file grab.cpp.

References AlphaBlend(), BlitVideo(), CreateJpeg(), GetGrab(), GRABOSD, GRABPIP, GRABVIDEO, L_GRAB, LOGDEBUG2, m_grabbedHeight, m_grabbedImage, m_grabbedSize, m_grabbedWidth, m_isActive, m_isJpeg, m_quality, m_screenHeight, m_screenWidth, and ScaleRgb24().

Referenced by Start().

◆ Size()

int cSoftHdGrab::Size ( void  )
inline

Definition at line 89 of file grab.h.

References m_grabbedSize.

Referenced by cSoftHdDevice::GrabImage().

◆ Start()

bool cSoftHdGrab::Start ( bool  jpeg,
int  quality,
int  width,
int  height,
int  screenWidth,
int  screenHeight 
)

Start a grab in the video renderer.

Parameters
jpegflag true, create JPEG data
qualityJPEG quality
widthwidth of requested grab image
heightheight of requested grab image
screenWidthcurrent screen width
screenHeightcurrent screen height

Definition at line 332 of file grab.cpp.

References cVideoRender::ClearGrabBuffers(), L_GRAB, LOGDEBUG2, m_grabbedHeight, m_grabbedImage, m_grabbedWidth, m_isActive, m_isJpeg, m_pRender, m_quality, m_screenHeight, m_screenWidth, ProcessGrab(), and cVideoRender::TriggerGrab().

Referenced by cSoftHdDevice::GrabImage().

Member Data Documentation

◆ m_grabbedHeight

int cSoftHdGrab::m_grabbedHeight
private

Definition at line 100 of file grab.h.

Referenced by ProcessGrab(), and Start().

◆ m_grabbedImage

uint8_t* cSoftHdGrab::m_grabbedImage
private

Definition at line 93 of file grab.h.

Referenced by Image(), ProcessGrab(), and Start().

◆ m_grabbedSize

int cSoftHdGrab::m_grabbedSize
private

Definition at line 94 of file grab.h.

Referenced by ProcessGrab(), and Size().

◆ m_grabbedWidth

int cSoftHdGrab::m_grabbedWidth
private

Definition at line 99 of file grab.h.

Referenced by ProcessGrab(), and Start().

◆ m_isActive

bool cSoftHdGrab::m_isActive = false
private

Definition at line 95 of file grab.h.

Referenced by Active(), ProcessGrab(), and Start().

◆ m_isJpeg

bool cSoftHdGrab::m_isJpeg = true
private

Definition at line 97 of file grab.h.

Referenced by ProcessGrab(), and Start().

◆ m_pRender

cVideoRender* cSoftHdGrab::m_pRender
private

Definition at line 92 of file grab.h.

Referenced by GetGrab(), and Start().

◆ m_quality

int cSoftHdGrab::m_quality
private

Definition at line 98 of file grab.h.

Referenced by ProcessGrab(), and Start().

◆ m_screenHeight

int cSoftHdGrab::m_screenHeight
private

Definition at line 102 of file grab.h.

Referenced by ProcessGrab(), and Start().

◆ m_screenWidth

int cSoftHdGrab::m_screenWidth
private

Definition at line 101 of file grab.h.

Referenced by ProcessGrab(), and Start().


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