vdr-plugin-softhddevice-drm-gles 1.6.2
grab.cpp File Reference

Grabbing Interface. More...

#include <libavutil/imgutils.h>
#include <libswscale/swscale.h>
#include <sys/mman.h>
#include <drm_fourcc.h>
#include "drmbuffer.h"
#include "grab.h"
#include "logger.h"
#include "videorender.h"

Go to the source code of this file.

Macros

#define OPAQUE   0xff
 
#define TRANSPARENT   0x00
 
#define UNMULTIPLY(color, alpha)   ((0xff * color) / alpha)
 
#define BLEND(back, front, alpha)   ((front * alpha) + (back * (255 - alpha))) / 255
 

Functions

enum AVPixelFormat DrmFormatToAVFormat (cDrmBuffer *buf)
 Convert a DRM format to a ffmpeg AV format.
 
static uint8_tBufToRgb (cDrmBuffer *buf, int *size, int dstW, int dstH, enum AVPixelFormat dstPixFmt)
 Convert a DRM buffer to rgb format image.
 
static uint8_tScaleRgb24 (uint8_t *src, int *size, int srcW, int srcH, int dstW, int dstH)
 Scale an image.
 
static void AlphaBlend (uint8_t *result, uint8_t *front, uint8_t *back, const unsigned int width, const unsigned int height)
 Blend two images.
 
static int BlitVideo (uint8_t *dst, uint8_t *src, int dstW, int dstH, int dstX, int dstY, int srcW, int srcH)
 Blit the video on black background.
 
uint8_tCreateJpeg (uint8_t *image, int *size, int quality, int width, int height)
 Call rgb to jpeg for C Plugin.
 

Detailed Description

Grabbing Interface.

This file defines cGrabBuffer and cSoftHdGrab, which are used to handle grab requests.

Definition in file grab.cpp.