MythTV  master
Classes | Macros | Functions | Variables
mythrender_vdpau.cpp File Reference
#include "mythrender_vdpau.h"
#include <chrono>
#include <cmath>
#include <thread>
#include <QSize>
#include <utility>
#include "mthread.h"
#include "mythlogging.h"
#include "mythmainwindow.h"
Include dependency graph for mythrender_vdpau.cpp:

Go to the source code of this file.

Classes

class  VDPAUColor
 
class  VDPAULayer
 
class  VDPAUResource
 
class  VDPAUOutputSurface
 
class  VDPAUVideoSurface
 
class  VDPAUBitmapSurface
 
class  VDPAUDecoder
 
class  VDPAUVideoMixer
 

Macros

#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1   (VdpVideoMixerFeature)11
 
#define NUM_SCALING_LEVELS   9
 
#define LOC   QString("VDPAU: ")
 
#define LOCK_RENDER   QMutexLocker locker1(&m_render_lock);
 
#define LOCK_DECODE   QMutexLocker locker2(&m_decode_lock);
 
#define LOCK_ALL   LOCK_RENDER; LOCK_DECODE;
 
#define INIT_ST
 
#define CHECK_ST
 
#define CHECK_STATUS(arg1)
 
#define GET_PROC(FUNC_ID, PROC)
 
#define CREATE_CHECK(arg1, arg2)
 
#define CHECK_VIDEO_SURFACES(arg1)
 
#define COLOR_BLACK   {0.0, 0.0, 0.0, 0.0}
 

Functions

static void vdpau_preemption_callback (VdpDevice device, void *myth_render)
 
static const char * dummy_get_error_string (VdpStatus)
 

Variables

static const VdpOutputSurfaceRenderBlendState VDPBlends [3]
 

Macro Definition Documentation

◆ VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1

#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1   (VdpVideoMixerFeature)11

Definition at line 18 of file mythrender_vdpau.cpp.

◆ NUM_SCALING_LEVELS

#define NUM_SCALING_LEVELS   9

Definition at line 20 of file mythrender_vdpau.cpp.

◆ LOC

#define LOC   QString("VDPAU: ")

Definition at line 22 of file mythrender_vdpau.cpp.

◆ LOCK_RENDER

#define LOCK_RENDER   QMutexLocker locker1(&m_render_lock);

Definition at line 24 of file mythrender_vdpau.cpp.

◆ LOCK_DECODE

#define LOCK_DECODE   QMutexLocker locker2(&m_decode_lock);

Definition at line 25 of file mythrender_vdpau.cpp.

◆ LOCK_ALL

#define LOCK_ALL   LOCK_RENDER; LOCK_DECODE;

Definition at line 26 of file mythrender_vdpau.cpp.

◆ INIT_ST

#define INIT_ST
Value:
VdpStatus vdp_st; \
bool ok = true;

Definition at line 28 of file mythrender_vdpau.cpp.

◆ CHECK_ST

#define CHECK_ST
Value:
ok &= (vdp_st == VDP_STATUS_OK); \
if (!ok) \
{ \
LOG(VB_GENERAL, LOG_ERR, LOC + QString("Error at %1:%2 (#%3, %4)") \
.arg(__FILE__).arg( __LINE__).arg(vdp_st) \
.arg(vdp_get_error_string(vdp_st))); \
}
#define LOC

Definition at line 32 of file mythrender_vdpau.cpp.

◆ CHECK_STATUS

#define CHECK_STATUS (   arg1)
Value:
if (m_preempted) \
{ \
m_render_lock.lock(); \
m_decode_lock.lock(); \
Preempted(); \
m_decode_lock.unlock(); \
m_render_lock.unlock(); \
} \
if (m_errored) \
return arg1;

Definition at line 41 of file mythrender_vdpau.cpp.

◆ GET_PROC

#define GET_PROC (   FUNC_ID,
  PROC 
)
Value:
vdp_st = vdp_get_proc_address( \
m_device, FUNC_ID, (void **)&(PROC)); \
CHECK_ST

Definition at line 53 of file mythrender_vdpau.cpp.

◆ CREATE_CHECK

#define CREATE_CHECK (   arg1,
  arg2 
)
Value:
if (ok) \
{ \
ok = arg1; \
if (!ok) \
LOG(VB_GENERAL, LOG_ERR, LOC + (arg2)); \
}
#define LOC

Definition at line 58 of file mythrender_vdpau.cpp.

◆ CHECK_VIDEO_SURFACES

#define CHECK_VIDEO_SURFACES (   arg1)
Value:
if (m_reset_video_surfaces) \
ResetVideoSurfaces(); \
if (m_reset_video_surfaces) \
return arg1;

Definition at line 66 of file mythrender_vdpau.cpp.

◆ COLOR_BLACK

#define COLOR_BLACK   {0.0, 0.0, 0.0, 0.0}

Definition at line 72 of file mythrender_vdpau.cpp.

Function Documentation

◆ vdpau_preemption_callback()

static void vdpau_preemption_callback ( VdpDevice  device,
void *  myth_render 
)
static

Definition at line 268 of file mythrender_vdpau.cpp.

Referenced by MythRenderVDPAU::RegisterCallback().

◆ dummy_get_error_string()

static const char* dummy_get_error_string ( VdpStatus  )
static

Definition at line 1590 of file mythrender_vdpau.cpp.

Referenced by MythRenderVDPAU::CreateDevice().

Variable Documentation

◆ VDPBlends

const VdpOutputSurfaceRenderBlendState VDPBlends[3]
static

Definition at line 74 of file mythrender_vdpau.cpp.

Referenced by MythRenderVDPAU::DrawBitmap(), and MythRenderVDPAU::DrawLayer().