vdr-plugin-softhddevice-drm-gles 1.5.9-20e15de
videorender.cpp File Reference

Rendering class. More...

#include <cerrno>
#include <cinttypes>
#include <cstdint>
#include <mutex>
#include <vector>
#include <libavcodec/avcodec.h>
#include <libavutil/hwcontext_drm.h>
#include <drm_fourcc.h>
#include <vdr/osd.h>
#include <vdr/thread.h>
#include <xf86drmMode.h>
#include "audio.h"
#include "config.h"
#include "drmdevice.h"
#include "event.h"
#include "grab.h"
#include "logger.h"
#include "misc.h"
#include "queue.h"
#include "softhddevice.h"
#include "threads.h"
#include "videorender.h"
#include "videostream.h"

Go to the source code of this file.

Classes

struct  sRect
 

Macros

#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 

Functions

static sRect ComputeFittedRect (AVFrame *frame, uint64_t dispX, uint64_t dispY, uint64_t dispWidth, uint64_t dispHeight)
 Fits the video frame into a given area.
 
static void ReleaseFrame (__attribute__((unused)) void *opaque, uint8_t *data)
 Callback free primedata if av_buffer is unreferenced.
 

Detailed Description

Rendering class.

This file defines cVideoRender, which includes all methods to bring the video and osd to display.

Definition in file videorender.cpp.

Macro Definition Documentation

◆ MIN

#define MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 696 of file videorender.cpp.

Function Documentation

◆ ComputeFittedRect()

static sRect ComputeFittedRect ( AVFrame *  frame,
uint64_t  dispX,
uint64_t  dispY,
uint64_t  dispWidth,
uint64_t  dispHeight 
)
static

Fits the video frame into a given area.

Parameters
frameAVFrame with frame dimensions and aspect ratio information
dispXx offset of video area
dispYy offset of video area
dispWidthwidth of video area
dispHeightheight of video area
Returns
the new computed video area or the given area if no frame was given

Definition at line 140 of file videorender.cpp.

Referenced by cVideoRender::SetPipBuffer(), and cVideoRender::SetVideoBuffer().

◆ ReleaseFrame()

static void ReleaseFrame ( __attribute__((unused)) void *  opaque,
uint8_t *  data 
)
static

Callback free primedata if av_buffer is unreferenced.

Definition at line 781 of file videorender.cpp.

Referenced by cDecodingStrategySoftware::PrepareDrmBuffer().