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)
 
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, VideoColourSpace *ColourSpace)
 
void DeleteOutputSurface (VdpOutputSurface Surface)
 
void DeleteMixer (VdpVideoMixer Mixer)
 
QSize GetSurfaceParameters (VdpVideoSurface Surface, VdpChromaType &Chroma)
 

Static Public Member Functions

static bool HaveVDPAU (void)
 
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 }
 
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 38 of file mythvdpauhelper.h.

Member Enumeration Documentation

◆ VDPMixerFeature

Enumerator
VDPMixerNone 
VDPMixerTemporal 
VDPMixerSpatial 

Definition at line 43 of file mythvdpauhelper.h.

Constructor & Destructor Documentation

◆ MythVDPAUHelper() [1/2]

MythVDPAUHelper::MythVDPAUHelper ( AVVDPAUDeviceContext *  Context)
explicit

Definition at line 234 of file mythvdpauhelper.cpp.

◆ ~MythVDPAUHelper()

MythVDPAUHelper::~MythVDPAUHelper ( void  )
override

Definition at line 275 of file mythvdpauhelper.cpp.

◆ MythVDPAUHelper() [2/2]

MythVDPAUHelper::MythVDPAUHelper ( void  )
protected

Definition at line 254 of file mythvdpauhelper.cpp.

Member Function Documentation

◆ HaveVDPAU()

bool MythVDPAUHelper::HaveVDPAU ( void  )
static

◆ CheckH264Decode()

bool MythVDPAUHelper::CheckH264Decode ( AVCodecContext *  Context)
static

Definition at line 340 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 212 of file mythvdpauhelper.cpp.

Referenced by MythCodecContext::GetDecoderDescription().

◆ IsValid()

bool MythVDPAUHelper::IsValid ( void  ) const

◆ SetPreempted()

void MythVDPAUHelper::SetPreempted ( void  )

Definition at line 317 of file mythvdpauhelper.cpp.

Referenced by vdpau_preemption_callback().

◆ IsFeatureAvailable()

bool MythVDPAUHelper::IsFeatureAvailable ( uint  Feature)

Definition at line 554 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::Acquire().

◆ CreateOutputSurface()

VdpOutputSurface MythVDPAUHelper::CreateOutputSurface ( QSize  Size)

Definition at line 398 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 422 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 476 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::Acquire().

◆ SetCSCMatrix()

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

Definition at line 541 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::UpdateColourSpace().

◆ DeleteOutputSurface()

void MythVDPAUHelper::DeleteOutputSurface ( VdpOutputSurface  Surface)

Definition at line 412 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::Cleanup().

◆ DeleteMixer()

void MythVDPAUHelper::DeleteMixer ( VdpVideoMixer  Mixer)

Definition at line 531 of file mythvdpauhelper.cpp.

Referenced by MythVDPAUInterop::Cleanup().

◆ GetSurfaceParameters()

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

Definition at line 566 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 378 of file mythvdpauhelper.cpp.

Referenced by CheckH264Decode().

◆ HEVCSupported()

bool MythVDPAUHelper::HEVCSupported ( void  )
protected

Definition at line 322 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 84 of file mythvdpauhelper.cpp.

Referenced by GetProfiles().

◆ InitProcs()

bool MythVDPAUHelper::InitProcs ( void  )
private

Definition at line 284 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 89 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 91 of file mythvdpauhelper.h.

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

◆ m_vdpGetProcAddress

VdpGetProcAddress* MythVDPAUHelper::m_vdpGetProcAddress { nullptr }
private

Definition at line 93 of file mythvdpauhelper.h.

Referenced by MythVDPAUHelper().

◆ m_vdpGetErrorString

VdpGetErrorString* MythVDPAUHelper::m_vdpGetErrorString { nullptr }
private

Definition at line 94 of file mythvdpauhelper.h.

Referenced by InitProcs(), and MythVDPAUHelper().

◆ m_vdpGetInformationString

VdpGetInformationString* MythVDPAUHelper::m_vdpGetInformationString { nullptr }
private

Definition at line 95 of file mythvdpauhelper.h.

Referenced by HEVCSupported(), and InitProcs().

◆ m_vdpDeviceDestroy

VdpDeviceDestroy* MythVDPAUHelper::m_vdpDeviceDestroy { nullptr }
private

Definition at line 96 of file mythvdpauhelper.h.

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

◆ m_vdpDecoderQueryCapabilities

VdpDecoderQueryCapabilities* MythVDPAUHelper::m_vdpDecoderQueryCapabilities { nullptr }
private

Definition at line 97 of file mythvdpauhelper.h.

Referenced by InitProcs(), and ProfileCheck().

◆ m_vdpDecoderCreate

VdpDecoderCreate* MythVDPAUHelper::m_vdpDecoderCreate { nullptr }
private

Definition at line 98 of file mythvdpauhelper.h.

Referenced by H264DecodeCheck(), and InitProcs().

◆ m_vdpDecoderDestroy

VdpDecoderDestroy* MythVDPAUHelper::m_vdpDecoderDestroy { nullptr }
private

Definition at line 99 of file mythvdpauhelper.h.

Referenced by H264DecodeCheck(), and InitProcs().

◆ m_vdpVideoMixerCreate

VdpVideoMixerCreate* MythVDPAUHelper::m_vdpVideoMixerCreate { nullptr }
private

Definition at line 100 of file mythvdpauhelper.h.

Referenced by CreateMixer(), and InitProcs().

◆ m_vdpVideoMixerDestroy

VdpVideoMixerDestroy* MythVDPAUHelper::m_vdpVideoMixerDestroy { nullptr }
private

Definition at line 101 of file mythvdpauhelper.h.

Referenced by DeleteMixer(), and InitProcs().

◆ m_vdpVideoMixerRender

VdpVideoMixerRender* MythVDPAUHelper::m_vdpVideoMixerRender { nullptr }
private

Definition at line 102 of file mythvdpauhelper.h.

Referenced by InitProcs(), and MixerRender().

◆ m_vdpVideoMixerSetAttributeValues

VdpVideoMixerSetAttributeValues* MythVDPAUHelper::m_vdpVideoMixerSetAttributeValues { nullptr }
private

Definition at line 103 of file mythvdpauhelper.h.

Referenced by InitProcs(), and SetCSCMatrix().

◆ m_vdpVideoMixerSetFeatureEnables

VdpVideoMixerSetFeatureEnables* MythVDPAUHelper::m_vdpVideoMixerSetFeatureEnables { nullptr }
private

Definition at line 104 of file mythvdpauhelper.h.

Referenced by CreateMixer(), and InitProcs().

◆ m_vdpVideoMixerQueryFeatureSupport

VdpVideoMixerQueryFeatureSupport* MythVDPAUHelper::m_vdpVideoMixerQueryFeatureSupport { nullptr }
private

Definition at line 105 of file mythvdpauhelper.h.

Referenced by InitProcs(), and IsFeatureAvailable().

◆ m_vdpOutputSurfaceCreate

VdpOutputSurfaceCreate* MythVDPAUHelper::m_vdpOutputSurfaceCreate { nullptr }
private

Definition at line 106 of file mythvdpauhelper.h.

Referenced by CreateOutputSurface(), and InitProcs().

◆ m_vdpOutputSurfaceDestroy

VdpOutputSurfaceDestroy* MythVDPAUHelper::m_vdpOutputSurfaceDestroy { nullptr }
private

Definition at line 107 of file mythvdpauhelper.h.

Referenced by DeleteOutputSurface(), and InitProcs().

◆ m_vdpVideoSurfaceGetParameters

VdpVideoSurfaceGetParameters* MythVDPAUHelper::m_vdpVideoSurfaceGetParameters { nullptr }
private

Definition at line 108 of file mythvdpauhelper.h.

Referenced by GetSurfaceParameters(), and InitProcs().

◆ m_vdpPreemptionCallbackRegister

VdpPreemptionCallbackRegister* MythVDPAUHelper::m_vdpPreemptionCallbackRegister { nullptr }
private

Definition at line 109 of file mythvdpauhelper.h.

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


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