1#ifndef MYTHVDPAUHELPER_H
2#define MYTHVDPAUHELPER_H
19#define pointer Xpointer
20#if defined(_X11_XLIB_H_) && !defined(Bool)
23#include "libavutil/hwcontext_vdpau.h"
24#include "vdpau/vdpau_x11.h"
32#include "libavcodec/avcodec.h"
42 uint32_t Macroblocks, uint32_t Level);
43 bool Supported(
int Width,
int Height,
int Level)
const;
49using VDPAUProfile = QPair<MythCodecContext::CodecProfile, VDPAUCodec>;
66 static bool HaveVDPAU(
bool Reinit =
false);
79 VdpVideoMixer
CreateMixer(QSize Size, VdpChromaType ChromaType = VDP_CHROMA_TYPE_420,
81 void MixerRender(VdpVideoMixer Mixer, VdpVideoSurface
Source, VdpOutputSurface Dest,
82 FrameScanType Scan,
int TopFieldFirst, QVector<AVBufferRef*>& Frames);
94 bool H264DecodeCheck (VdpDecoderProfile Profile, AVCodecContext *Context);
96 bool ProfileCheck (VdpDecoderProfile Profile, uint32_t &Level,
97 uint32_t &Macros, uint32_t &Width, uint32_t &Height);
A simple wrapper around VDPAU functionality.
void DeleteOutputSurface(VdpOutputSurface Surface)
VdpOutputSurface CreateOutputSurface(QSize Size)
VdpVideoMixerDestroy * m_vdpVideoMixerDestroy
VdpVideoMixerSetFeatureEnables * m_vdpVideoMixerSetFeatureEnables
void MixerRender(VdpVideoMixer Mixer, VdpVideoSurface Source, VdpOutputSurface Dest, FrameScanType Scan, int TopFieldFirst, QVector< AVBufferRef * > &Frames)
VdpOutputSurfaceDestroy * m_vdpOutputSurfaceDestroy
static bool CheckH264Decode(AVCodecContext *Context)
VdpVideoMixerCreate * m_vdpVideoMixerCreate
QSize GetSurfaceParameters(VdpVideoSurface Surface, VdpChromaType &Chroma)
VdpDecoderQueryCapabilities * m_vdpDecoderQueryCapabilities
void DeleteMixer(VdpVideoMixer Mixer)
~MythVDPAUHelper(void) override
static bool HaveVDPAU(bool Reinit=false)
VdpDecoderDestroy * m_vdpDecoderDestroy
bool IsFeatureAvailable(uint Feature)
VdpVideoMixerQueryAttributeSupport * m_vdpVideoMixerQueryAttributeSupport
void SetCSCMatrix(VdpVideoMixer Mixer, MythVideoColourSpace *ColourSpace)
static void GetDecoderList(QStringList &Decoders)
VdpGetErrorString * m_vdpGetErrorString
VdpVideoMixerSetAttributeValues * m_vdpVideoMixerSetAttributeValues
VdpVideoMixer CreateMixer(QSize Size, VdpChromaType ChromaType=VDP_CHROMA_TYPE_420, MythDeintType Deinterlacer=DEINT_BASIC)
VdpDeviceDestroy * m_vdpDeviceDestroy
void DisplayPreempted(void)
VdpVideoMixerRender * m_vdpVideoMixerRender
VdpDecoderCreate * m_vdpDecoderCreate
static const VDPAUProfiles & GetProfiles(void)
VdpVideoSurfaceGetParameters * m_vdpVideoSurfaceGetParameters
bool H264DecodeCheck(VdpDecoderProfile Profile, AVCodecContext *Context)
VdpVideoMixerQueryFeatureSupport * m_vdpVideoMixerQueryFeatureSupport
bool ProfileCheck(VdpDecoderProfile Profile, uint32_t &Level, uint32_t &Macros, uint32_t &Width, uint32_t &Height)
bool IsAttributeAvailable(uint Attribute)
VdpOutputSurfaceCreate * m_vdpOutputSurfaceCreate
VdpGetProcAddress * m_vdpGetProcAddress
VdpGetInformationString * m_vdpGetInformationString
VdpPreemptionCallbackRegister * m_vdpPreemptionCallbackRegister
MythVideoColourSpace contains a QMatrix4x4 that can convert YCbCr data to RGB.
uint32_t m_maxMacroBlocks
bool Supported(int Width, int Height, int Level) const
VDPAUCodec(MythCodecContext::CodecProfile Profile, QSize Size, uint32_t Macroblocks, uint32_t Level)
std::vector< VDPAUProfile > VDPAUProfiles
QPair< MythCodecContext::CodecProfile, VDPAUCodec > VDPAUProfile