Go to the documentation of this file. 1 #ifndef MYTHVDPAUHELPER_H
2 #define MYTHVDPAUHELPER_H
18 #define Cursor XCursor // Prevent conflicts with Qt6.
19 #define pointer Xpointer // Prevent conflicts with Qt6.
20 #if defined(_X11_XLIB_H_) && !defined(Bool)
23 #include "libavutil/hwcontext_vdpau.h"
24 #include "vdpau/vdpau_x11.h"
25 #undef None // X11/X.h defines this. Causes compile failure in Qt6.
28 #undef Bool // Interferes with cmake moc file compilation
29 #undef True // Interferes with cmake moc file compilation
30 #undef False // Interferes with cmake moc file compilation
31 #undef Always // X11/X.h defines this. Causes compile failure in Qt6.
32 #include "libavcodec/avcodec.h"
42 uint32_t Macroblocks, uint32_t Level);
43 bool Supported(
int Width,
int Height,
int Level)
const;
49 using 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);
129 #endif // MYTHVDPAUHELPER_H
static const VDPAUProfiles & GetProfiles(void)
VdpVideoMixerQueryAttributeSupport * m_vdpVideoMixerQueryAttributeSupport
~MythVDPAUHelper(void) override
VdpVideoMixerQueryFeatureSupport * m_vdpVideoMixerQueryFeatureSupport
VdpOutputSurfaceDestroy * m_vdpOutputSurfaceDestroy
VdpDecoderQueryCapabilities * m_vdpDecoderQueryCapabilities
void SetCSCMatrix(VdpVideoMixer Mixer, MythVideoColourSpace *ColourSpace)
uint32_t m_maxMacroBlocks
std::vector< VDPAUProfile > VDPAUProfiles
VdpGetErrorString * m_vdpGetErrorString
static bool HaveVDPAU(bool Reinit=false)
VdpVideoMixerDestroy * m_vdpVideoMixerDestroy
bool IsFeatureAvailable(uint Feature)
bool IsAttributeAvailable(uint Attribute)
VdpOutputSurface CreateOutputSurface(QSize Size)
void DeleteOutputSurface(VdpOutputSurface Surface)
static void GetDecoderList(QStringList &Decoders)
void DisplayPreempted(void)
A simple wrapper around VDPAU functionality.
VdpVideoMixerRender * m_vdpVideoMixerRender
void DeleteMixer(VdpVideoMixer Mixer)
QSize GetSurfaceParameters(VdpVideoSurface Surface, VdpChromaType &Chroma)
VdpGetProcAddress * m_vdpGetProcAddress
QPair< MythCodecContext::CodecProfile, VDPAUCodec > VDPAUProfile
VdpVideoMixerSetFeatureEnables * m_vdpVideoMixerSetFeatureEnables
VdpVideoMixer CreateMixer(QSize Size, VdpChromaType ChromaType=VDP_CHROMA_TYPE_420, MythDeintType Deinterlacer=DEINT_BASIC)
VdpGetInformationString * m_vdpGetInformationString
VdpDeviceDestroy * m_vdpDeviceDestroy
bool ProfileCheck(VdpDecoderProfile Profile, uint32_t &Level, uint32_t &Macros, uint32_t &Width, uint32_t &Height)
VdpDecoderCreate * m_vdpDecoderCreate
VdpVideoMixerCreate * m_vdpVideoMixerCreate
bool H264DecodeCheck(VdpDecoderProfile Profile, AVCodecContext *Context)
static bool CheckH264Decode(AVCodecContext *Context)
void MixerRender(VdpVideoMixer Mixer, VdpVideoSurface Source, VdpOutputSurface Dest, FrameScanType Scan, int TopFieldFirst, QVector< AVBufferRef * > &Frames)
VDPAUCodec(MythCodecContext::CodecProfile Profile, QSize Size, uint32_t Macroblocks, uint32_t Level)
VdpVideoMixerSetAttributeValues * m_vdpVideoMixerSetAttributeValues
bool Supported(int Width, int Height, int Level) const
VdpDecoderDestroy * m_vdpDecoderDestroy
VdpVideoSurfaceGetParameters * m_vdpVideoSurfaceGetParameters
VdpOutputSurfaceCreate * m_vdpOutputSurfaceCreate
VdpPreemptionCallbackRegister * m_vdpPreemptionCallbackRegister
MythVideoColourSpace contains a QMatrix4x4 that can convert YCbCr data to RGB.