MythTV  master
Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
MythVDPAUHelper Class Reference

A simple wrapper around VDPAU functionality. More...

#include <mythvdpauhelper.h>

Inheritance diagram for MythVDPAUHelper:
Inheritance graph
[legend]
Collaboration diagram for MythVDPAUHelper:
Collaboration graph
[legend]

Public Types

enum  VDPMixerFeature { VDPMixerNone = 0x00, VDPMixerTemporal = 0x01, VDPMixerSpatial = 0x02 }
 

Signals

void DisplayPreempted (void)
 

Public Member Functions

 MythVDPAUHelper (AVVDPAUDeviceContext *Context)
 
 ~MythVDPAUHelper (void) override
 
bool IsValid (void) const
 
void SetPreempted (void)
 
bool IsFeatureAvailable (uint Feature)
 
bool IsAttributeAvailable (uint Attribute)
 
VdpOutputSurface CreateOutputSurface (QSize Size)
 
VdpVideoMixer CreateMixer (QSize Size, VdpChromaType ChromaType=VDP_CHROMA_TYPE_420, MythDeintType Deinterlacer=DEINT_BASIC)
 
void MixerRender (VdpVideoMixer Mixer, VdpVideoSurface Source, VdpOutputSurface Dest, FrameScanType Scan, int TopFieldFirst, QVector< AVBufferRef * > &Frames)
 
void SetCSCMatrix (VdpVideoMixer Mixer, MythVideoColourSpace *ColourSpace)
 
void DeleteOutputSurface (VdpOutputSurface Surface)
 
void DeleteMixer (VdpVideoMixer Mixer)
 
QSize GetSurfaceParameters (VdpVideoSurface Surface, VdpChromaType &Chroma)
 

Static Public Member Functions

static bool HaveVDPAU (bool Reinit=false)
 
static bool CheckH264Decode (AVCodecContext *Context)
 
static const VDPAUProfilesGetProfiles (void)
 
static void GetDecoderList (QStringList &Decoders)
 

Protected Member Functions

 MythVDPAUHelper (void)
 
bool H264DecodeCheck (VdpDecoderProfile Profile, AVCodecContext *Context)
 
bool HEVCSupported (void)
 
bool ProfileCheck (VdpDecoderProfile Profile, uint32_t &Level, uint32_t &Macros, uint32_t &Width, uint32_t &Height)
 

Private Member Functions

bool InitProcs (void)
 

Private Attributes

bool m_valid { false }
 
bool m_createdDevice { false }
 
VdpDevice m_device { 0 }
 
MythXDisplaym_display { nullptr }
 
VdpGetProcAddress * m_vdpGetProcAddress { nullptr }
 
VdpGetErrorString * m_vdpGetErrorString { nullptr }
 
VdpGetInformationString * m_vdpGetInformationString { nullptr }
 
VdpDeviceDestroy * m_vdpDeviceDestroy { nullptr }
 
VdpDecoderQueryCapabilities * m_vdpDecoderQueryCapabilities { nullptr }
 
VdpDecoderCreate * m_vdpDecoderCreate { nullptr }
 
VdpDecoderDestroy * m_vdpDecoderDestroy { nullptr }
 
VdpVideoMixerCreate * m_vdpVideoMixerCreate { nullptr }
 
VdpVideoMixerDestroy * m_vdpVideoMixerDestroy { nullptr }
 
VdpVideoMixerRender * m_vdpVideoMixerRender { nullptr }
 
VdpVideoMixerSetAttributeValues * m_vdpVideoMixerSetAttributeValues { nullptr }
 
VdpVideoMixerSetFeatureEnables * m_vdpVideoMixerSetFeatureEnables { nullptr }
 
VdpVideoMixerQueryFeatureSupport * m_vdpVideoMixerQueryFeatureSupport { nullptr }
 
VdpVideoMixerQueryAttributeSupport * m_vdpVideoMixerQueryAttributeSupport { nullptr }
 
VdpOutputSurfaceCreate * m_vdpOutputSurfaceCreate { nullptr }
 
VdpOutputSurfaceDestroy * m_vdpOutputSurfaceDestroy { nullptr }
 
VdpVideoSurfaceGetParameters * m_vdpVideoSurfaceGetParameters { nullptr }
 
VdpPreemptionCallbackRegister * m_vdpPreemptionCallbackRegister { nullptr }
 

Detailed Description

A simple wrapper around VDPAU functionality.

Definition at line 52 of file mythvdpauhelper.h.

Member Enumeration Documentation

◆ VDPMixerFeature

Enumerator
VDPMixerNone 
VDPMixerTemporal 
VDPMixerSpatial 

Definition at line 57 of file mythvdpauhelper.h.

Constructor & Destructor Documentation

◆ MythVDPAUHelper() [1/2]

MythVDPAUHelper::MythVDPAUHelper ( AVVDPAUDeviceContext *  Context)
explicit

Definition at line 236 of file mythvdpauhelper.cpp.

◆ ~MythVDPAUHelper()

MythVDPAUHelper::~MythVDPAUHelper ( void  )
override

Definition at line 279 of file mythvdpauhelper.cpp.

◆ MythVDPAUHelper() [2/2]

MythVDPAUHelper::MythVDPAUHelper ( void  )
protected

Definition at line 256 of file mythvdpauhelper.cpp.

Member Function Documentation

◆ HaveVDPAU()

bool MythVDPAUHelper::HaveVDPAU ( bool  Reinit = false)
static

◆ CheckH264Decode()

bool MythVDPAUHelper::CheckH264Decode ( AVCodecContext *  Context)
static

Definition at line 348 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUContext::GetSupportedCodec().

◆ GetProfiles()

const VDPAUProfiles & MythVDPAUHelper::GetProfiles ( void  )
static

◆ GetDecoderList()

void MythVDPAUHelper::GetDecoderList ( QStringList &  Decoders)
static

Definition at line 214 of file mythvdpauhelper.cpp.

Referenced by MythCodecContext::GetDecoderDescription().

◆ IsValid()

bool MythVDPAUHelper::IsValid ( void  ) const

◆ SetPreempted()

void MythVDPAUHelper::SetPreempted ( void  )

Definition at line 322 of file mythvdpauhelper.cpp.

Referenced by vdpau_preemption_callback().

◆ IsFeatureAvailable()

bool MythVDPAUHelper::IsFeatureAvailable ( uint  Feature)

Definition at line 564 of file mythvdpauhelper.cpp.

◆ IsAttributeAvailable()

bool MythVDPAUHelper::IsAttributeAvailable ( uint  Attribute)

Definition at line 576 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::Acquire().

◆ CreateOutputSurface()

VdpOutputSurface MythVDPAUHelper::CreateOutputSurface ( QSize  Size)

Definition at line 406 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::InitVDPAU().

◆ CreateMixer()

VdpVideoMixer MythVDPAUHelper::CreateMixer ( QSize  Size,
VdpChromaType  ChromaType = VDP_CHROMA_TYPE_420,
MythDeintType  Deinterlacer = DEINT_BASIC 
)

Definition at line 430 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::InitVDPAU().

◆ MixerRender()

void MythVDPAUHelper::MixerRender ( VdpVideoMixer  Mixer,
VdpVideoSurface  Source,
VdpOutputSurface  Dest,
FrameScanType  Scan,
int  TopFieldFirst,
QVector< AVBufferRef * > &  Frames 
)

Definition at line 485 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::Acquire().

◆ SetCSCMatrix()

void MythVDPAUHelper::SetCSCMatrix ( VdpVideoMixer  Mixer,
MythVideoColourSpace ColourSpace 
)

Definition at line 551 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::UpdateColourSpace().

◆ DeleteOutputSurface()

void MythVDPAUHelper::DeleteOutputSurface ( VdpOutputSurface  Surface)

Definition at line 420 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::Cleanup().

◆ DeleteMixer()

void MythVDPAUHelper::DeleteMixer ( VdpVideoMixer  Mixer)

Definition at line 541 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::Cleanup().

◆ GetSurfaceParameters()

QSize MythVDPAUHelper::GetSurfaceParameters ( VdpVideoSurface  Surface,
VdpChromaType &  Chroma 
)

Definition at line 588 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::InitVDPAU().

◆ DisplayPreempted

void MythVDPAUHelper::DisplayPreempted ( void  )
signal

◆ H264DecodeCheck()

bool MythVDPAUHelper::H264DecodeCheck ( VdpDecoderProfile  Profile,
AVCodecContext *  Context 
)
protected

Definition at line 386 of file mythvdpauhelper.cpp.

Referenced by CheckH264Decode().

◆ HEVCSupported()

bool MythVDPAUHelper::HEVCSupported ( void  )
protected

Definition at line 327 of file mythvdpauhelper.cpp.

Referenced by GetProfiles().

◆ ProfileCheck()

bool MythVDPAUHelper::ProfileCheck ( VdpDecoderProfile  Profile,
uint32_t &  Level,
uint32_t &  Macros,
uint32_t &  Width,
uint32_t &  Height 
)
protected

Definition at line 86 of file mythvdpauhelper.cpp.

Referenced by GetProfiles().

◆ InitProcs()

bool MythVDPAUHelper::InitProcs ( void  )
private

Definition at line 288 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUHelper().

Member Data Documentation

◆ m_valid

bool MythVDPAUHelper::m_valid { false }
private

◆ m_createdDevice

bool MythVDPAUHelper::m_createdDevice { false }
private

Definition at line 104 of file mythvdpauhelper.h.

Referenced by ~MythVDPAUHelper().

◆ m_device

VdpDevice MythVDPAUHelper::m_device { 0 }
private

◆ m_display

MythXDisplay* MythVDPAUHelper::m_display { nullptr }
private

Definition at line 106 of file mythvdpauhelper.h.

Referenced by MythVDPAUHelper(), and ~MythVDPAUHelper().

◆ m_vdpGetProcAddress

VdpGetProcAddress* MythVDPAUHelper::m_vdpGetProcAddress { nullptr }
private

Definition at line 108 of file mythvdpauhelper.h.

Referenced by MythVDPAUHelper().

◆ m_vdpGetErrorString

VdpGetErrorString* MythVDPAUHelper::m_vdpGetErrorString { nullptr }
private

Definition at line 109 of file mythvdpauhelper.h.

Referenced by InitProcs(), and MythVDPAUHelper().

◆ m_vdpGetInformationString

VdpGetInformationString* MythVDPAUHelper::m_vdpGetInformationString { nullptr }
private

Definition at line 110 of file mythvdpauhelper.h.

Referenced by HEVCSupported(), and InitProcs().

◆ m_vdpDeviceDestroy

VdpDeviceDestroy* MythVDPAUHelper::m_vdpDeviceDestroy { nullptr }
private

Definition at line 111 of file mythvdpauhelper.h.

Referenced by InitProcs(), and ~MythVDPAUHelper().

◆ m_vdpDecoderQueryCapabilities

VdpDecoderQueryCapabilities* MythVDPAUHelper::m_vdpDecoderQueryCapabilities { nullptr }
private

Definition at line 112 of file mythvdpauhelper.h.

Referenced by InitProcs(), and ProfileCheck().

◆ m_vdpDecoderCreate

VdpDecoderCreate* MythVDPAUHelper::m_vdpDecoderCreate { nullptr }
private

Definition at line 113 of file mythvdpauhelper.h.

Referenced by H264DecodeCheck(), and InitProcs().

◆ m_vdpDecoderDestroy

VdpDecoderDestroy* MythVDPAUHelper::m_vdpDecoderDestroy { nullptr }
private

Definition at line 114 of file mythvdpauhelper.h.

Referenced by H264DecodeCheck(), and InitProcs().

◆ m_vdpVideoMixerCreate

VdpVideoMixerCreate* MythVDPAUHelper::m_vdpVideoMixerCreate { nullptr }
private

Definition at line 115 of file mythvdpauhelper.h.

Referenced by CreateMixer(), and InitProcs().

◆ m_vdpVideoMixerDestroy

VdpVideoMixerDestroy* MythVDPAUHelper::m_vdpVideoMixerDestroy { nullptr }
private

Definition at line 116 of file mythvdpauhelper.h.

Referenced by DeleteMixer(), and InitProcs().

◆ m_vdpVideoMixerRender

VdpVideoMixerRender* MythVDPAUHelper::m_vdpVideoMixerRender { nullptr }
private

Definition at line 117 of file mythvdpauhelper.h.

Referenced by InitProcs(), and MixerRender().

◆ m_vdpVideoMixerSetAttributeValues

VdpVideoMixerSetAttributeValues* MythVDPAUHelper::m_vdpVideoMixerSetAttributeValues { nullptr }
private

Definition at line 118 of file mythvdpauhelper.h.

Referenced by InitProcs(), and SetCSCMatrix().

◆ m_vdpVideoMixerSetFeatureEnables

VdpVideoMixerSetFeatureEnables* MythVDPAUHelper::m_vdpVideoMixerSetFeatureEnables { nullptr }
private

Definition at line 119 of file mythvdpauhelper.h.

Referenced by CreateMixer(), and InitProcs().

◆ m_vdpVideoMixerQueryFeatureSupport

VdpVideoMixerQueryFeatureSupport* MythVDPAUHelper::m_vdpVideoMixerQueryFeatureSupport { nullptr }
private

Definition at line 120 of file mythvdpauhelper.h.

Referenced by InitProcs(), and IsFeatureAvailable().

◆ m_vdpVideoMixerQueryAttributeSupport

VdpVideoMixerQueryAttributeSupport* MythVDPAUHelper::m_vdpVideoMixerQueryAttributeSupport { nullptr }
private

Definition at line 121 of file mythvdpauhelper.h.

Referenced by InitProcs(), and IsAttributeAvailable().

◆ m_vdpOutputSurfaceCreate

VdpOutputSurfaceCreate* MythVDPAUHelper::m_vdpOutputSurfaceCreate { nullptr }
private

Definition at line 122 of file mythvdpauhelper.h.

Referenced by CreateOutputSurface(), and InitProcs().

◆ m_vdpOutputSurfaceDestroy

VdpOutputSurfaceDestroy* MythVDPAUHelper::m_vdpOutputSurfaceDestroy { nullptr }
private

Definition at line 123 of file mythvdpauhelper.h.

Referenced by DeleteOutputSurface(), and InitProcs().

◆ m_vdpVideoSurfaceGetParameters

VdpVideoSurfaceGetParameters* MythVDPAUHelper::m_vdpVideoSurfaceGetParameters { nullptr }
private

Definition at line 124 of file mythvdpauhelper.h.

Referenced by GetSurfaceParameters(), and InitProcs().

◆ m_vdpPreemptionCallbackRegister

VdpPreemptionCallbackRegister* MythVDPAUHelper::m_vdpPreemptionCallbackRegister { nullptr }
private

Definition at line 125 of file mythvdpauhelper.h.

Referenced by InitProcs(), MythVDPAUHelper(), and ~MythVDPAUHelper().


The documentation for this class was generated from the following files: