vdr-plugin-softhddevice-drm-gles 1.4.0
grab.cpp
Go to the documentation of this file.
1
23#include "logger.h"
24#include "grab.h"
25
26/*****************************************************************************
27 * cSoftHdGrab class
28 ****************************************************************************/
29
34{
35 m_pBuf = NULL;
36 m_pResult = NULL;
37
38 cRect m_rect;
39 m_size = 0;
40}
41
46{
47}
48
53{
54 if (!m_pBuf)
55 return;
56
57 for (int plane = 0; plane < m_pBuf->NumPlanes(); plane++) {
58 if (m_pBuf->Size(plane)) {
59 LOGDEBUG2(L_GRAB, "grab: %s: free buf %p (plane %d)", __FUNCTION__, m_pBuf->Plane(plane), plane);
60 free(m_pBuf->Plane(plane));
61 }
62 }
63 delete m_pBuf;
64
65 m_pBuf = nullptr;
66}
uint8_t * Plane(int idx)
Definition: drmbuffer.h:89
int NumPlanes(void)
Definition: drmbuffer.h:83
uint32_t Size(int idx)
Definition: drmbuffer.h:99
int m_size
size of grabbed data
Definition: grab.h:57
uint8_t * m_pResult
pointer to grabbed image
Definition: grab.h:55
cSoftHdGrab(void)
Grabber class constructor.
Definition: grab.cpp:33
void FreeBuf(void)
Free the grab buffer.
Definition: grab.cpp:52
cRect m_rect
rect of the grabbed data
Definition: grab.h:58
struct cDrmBuffer * m_pBuf
pointer to original buffer
Definition: grab.h:56
virtual ~cSoftHdGrab(void)
Grabber class destructor.
Definition: grab.cpp:45
Grabber header file.
Logger class header file.
#define LOGDEBUG2
Definition: logger.h:50
#define L_GRAB
Definition: logger.h:71