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

#include <mythvaapidrminterop.h>

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

Public Member Functions

 MythVAAPIInteropDRM (MythPlayerUI *Player, MythRenderOpenGL *Context, InteropType Type)
 
 ~MythVAAPIInteropDRM () override
 
vector< MythVideoTextureOpenGL * > Acquire (MythRenderOpenGL *Context, MythVideoColourSpace *ColourSpace, MythVideoFrame *Frame, FrameScanType Scan) override
 
void DeleteTextures () override
 
- Public Member Functions inherited from MythVAAPIInterop
VASurfaceID VerifySurface (MythRenderOpenGL *Context, MythVideoFrame *Frame)
 
VADisplay GetDisplay (void)
 
QString GetVendor (void)
 
- Public Member Functions inherited from MythOpenGLInterop
 ~MythOpenGLInterop () override
 
- Public Member Functions inherited from MythInteropGPU
 MythInteropGPU (MythRender *Context, InteropType Type, MythPlayerUI *Player=nullptr)
 
 ~MythInteropGPU () override
 
InteropType GetType ()
 
MythPlayerUIGetPlayer ()
 
void SetDefaultFree (FreeAVHWDeviceContext FreeContext)
 
void SetDefaultUserOpaque (void *UserOpaque)
 
FreeAVHWDeviceContext GetDefaultFree ()
 
void * GetDefaultUserOpaque ()
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter (const QString &debugName, bool logDebug=true)
 Creates reference counter with an initial value of 1. More...
 
virtual int IncrRef (void)
 Increments reference count. More...
 
virtual int DecrRef (void)
 Decrements reference count and deletes on 0. More...
 
- Public Member Functions inherited from MythEGLDMABUF
 MythEGLDMABUF (MythRenderOpenGL *Context)
 
 ~MythEGLDMABUF ()=default
 
std::vector< MythVideoTextureOpenGL * > CreateTextures (AVDRMFrameDescriptor *Desc, MythRenderOpenGL *Context, MythVideoFrame *Frame, bool UseSeparate, FrameScanType Scan=kScan_Progressive)
 

Static Public Member Functions

static bool IsSupported (MythRenderOpenGL *Context)
 
- Static Public Member Functions inherited from MythVAAPIInterop
static void GetVAAPITypes (MythRenderOpenGL *Context, MythInteropGPU::InteropMap &Types)
 Return a list of interops that are supported by the current render device. More...
 
static MythVAAPIInteropCreateVAAPI (MythPlayerUI *Player, MythRenderOpenGL *Context)
 
static bool SetupDeinterlacer (MythDeintType Deinterlacer, bool DoubleRate, AVBufferRef *FramesContext, int Width, int Height, AVFilterGraph *&Graph, AVFilterContext *&Source, AVFilterContext *&Sink)
 
- Static Public Member Functions inherited from MythOpenGLInterop
static void GetTypes (MythRender *Render, MythInteropGPU::InteropMap &Types)
 
static vector< MythVideoTextureOpenGL * > Retrieve (MythRenderOpenGL *Context, MythVideoColourSpace *ColourSpace, MythVideoFrame *Frame, FrameScanType Scan)
 
- Static Public Member Functions inherited from MythInteropGPU
static InteropMap GetTypes (MythRender *Render)
 
static QString TypeToString (InteropType Type)
 
static QString TypesToString (const InteropMap &Types)
 
static MythInteropGPUCreateDummy ()
 
- Static Public Member Functions inherited from ReferenceCounter
static void PrintDebug (void)
 Print out any leaks if that level of debugging is enabled. More...
 
- Static Public Member Functions inherited from MythEGLDMABUF
static bool HaveDMABuf (MythRenderOpenGL *Context)
 
static void ClearDMATextures (MythRenderOpenGL *Context, std::vector< MythVideoTextureOpenGL * > &Textures)
 

Protected Member Functions

void DestroyDeinterlacer () override
 
void PostInitDeinterlacer () override
 
- Protected Member Functions inherited from MythVAAPIInterop
 MythVAAPIInterop (MythPlayerUI *Player, MythRenderOpenGL *Context, InteropType Type)
 
 ~MythVAAPIInterop () override
 
void InitaliseDisplay (void)
 
VASurfaceID Deinterlace (MythVideoFrame *Frame, VASurfaceID Current, FrameScanType Scan)
 
- Protected Member Functions inherited from MythOpenGLInterop
 MythOpenGLInterop (MythRenderOpenGL *Context, InteropType Type, MythPlayerUI *Player=nullptr)
 
- Protected Member Functions inherited from ReferenceCounter
virtual ~ReferenceCounter (void)
 Called on destruction, will warn if object deleted with references in place. More...
 

Private Member Functions

void CleanupReferenceFrames ()
 
void RotateReferenceFrames (AVBufferRef *Buffer)
 
vector< MythVideoTextureOpenGL * > GetReferenceFrames ()
 
vector< MythVideoTextureOpenGL * > AcquireVAAPI (VASurfaceID Id, MythRenderOpenGL *Context, MythVideoFrame *Frame)
 
vector< MythVideoTextureOpenGL * > AcquirePrime (VASurfaceID Id, MythRenderOpenGL *Context, MythVideoFrame *Frame)
 Export the given VideoFrame as a DRM PRIME descriptor. More...
 
AVDRMFrameDescriptor * GetDRMFrameDescriptor (VASurfaceID Id)
 
void CleanupDRMPRIME ()
 
bool TestPrimeInterop ()
 

Static Private Member Functions

static VideoFrameType VATypeToMythType (uint32_t Fourcc)
 

Private Attributes

QFile m_drmFile { }
 
QVector< AVBufferRef * > m_referenceFrames { }
 
bool m_usePrime { false }
 
QHash< unsigned long long, AVDRMFrameDescriptor * > m_drmFrames { }
 

Additional Inherited Members

- Public Types inherited from MythInteropGPU
enum  InteropType {
  Unsupported = 0, GL_VAAPIGLXCOPY, GL_VAAPIGLXPIX, GL_VAAPIEGLDRM,
  GL_VTB, GL_VTBSURFACE, GL_MEDIACODEC, GL_VDPAU,
  GL_NVDEC, GL_MMAL, GL_DRMPRIME, DRM_DRMPRIME,
  DUMMY
}
 
using InteropTypes = std::vector< InteropType >
 
using InteropMap = std::map< VideoFrameType, InteropTypes >
 
- Protected Attributes inherited from MythVAAPIInterop
VADisplay m_vaDisplay { nullptr }
 
QString m_vaVendor { }
 
MythDeintType m_deinterlacer { DEINT_NONE }
 
bool m_deinterlacer2x { false }
 
bool m_firstField { true }
 
AVBufferRef * m_vppFramesContext { nullptr }
 
AVFilterContext * m_filterSink { nullptr }
 
AVFilterContext * m_filterSource { nullptr }
 
AVFilterGraph * m_filterGraph { nullptr }
 
bool m_filterError { false }
 
int m_filterWidth { 0 }
 
int m_filterHeight { 0 }
 
VASurfaceID m_lastFilteredFrame { 0 }
 
uint64_t m_lastFilteredFrameCount { 0 }
 
- Protected Attributes inherited from MythOpenGLInterop
MythRenderOpenGLm_openglContext { nullptr }
 
QHash< unsigned long long, vector< MythVideoTextureOpenGL * > > m_openglTextures
 
- Protected Attributes inherited from MythInteropGPU
MythRenderm_context { nullptr }
 
QSize m_textureSize { }
 
uint64_t m_discontinuityCounter { 0 }
 
FreeAVHWDeviceContext m_defaultFree { nullptr }
 
void * m_defaultUserOpaque { nullptr }
 
MythPlayerUIm_player { nullptr }
 
InteropType m_type { Unsupported }
 
- Protected Attributes inherited from ReferenceCounter
bool m_logDebug
 This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More...
 
QAtomicInt m_referenceCount {1}
 

Detailed Description

Definition at line 15 of file mythvaapidrminterop.h.

Constructor & Destructor Documentation

◆ MythVAAPIInteropDRM()

MythVAAPIInteropDRM::MythVAAPIInteropDRM ( MythPlayerUI Player,
MythRenderOpenGL Context,
InteropType  Type 
)

Definition at line 17 of file mythvaapidrminterop.cpp.

◆ ~MythVAAPIInteropDRM()

MythVAAPIInteropDRM::~MythVAAPIInteropDRM ( )
override

Definition at line 49 of file mythvaapidrminterop.cpp.

Member Function Documentation

◆ Acquire()

vector< MythVideoTextureOpenGL * > MythVAAPIInteropDRM::Acquire ( MythRenderOpenGL Context,
MythVideoColourSpace ColourSpace,
MythVideoFrame Frame,
FrameScanType  Scan 
)
overridevirtual

Reimplemented from MythOpenGLInterop.

Definition at line 165 of file mythvaapidrminterop.cpp.

◆ IsSupported()

bool MythVAAPIInteropDRM::IsSupported ( MythRenderOpenGL Context)
static

Definition at line 372 of file mythvaapidrminterop.cpp.

Referenced by MythVAAPIInterop::GetVAAPITypes().

◆ DeleteTextures()

void MythVAAPIInteropDRM::DeleteTextures ( )
overridevirtual

Reimplemented from MythOpenGLInterop.

Definition at line 63 of file mythvaapidrminterop.cpp.

Referenced by DestroyDeinterlacer(), PostInitDeinterlacer(), and ~MythVAAPIInteropDRM().

◆ DestroyDeinterlacer()

void MythVAAPIInteropDRM::DestroyDeinterlacer ( )
overrideprotectedvirtual

Reimplemented from MythVAAPIInterop.

Definition at line 90 of file mythvaapidrminterop.cpp.

Referenced by Acquire(), and ~MythVAAPIInteropDRM().

◆ PostInitDeinterlacer()

void MythVAAPIInteropDRM::PostInitDeinterlacer ( )
overrideprotectedvirtual

Reimplemented from MythVAAPIInterop.

Definition at line 101 of file mythvaapidrminterop.cpp.

◆ VATypeToMythType()

VideoFrameType MythVAAPIInteropDRM::VATypeToMythType ( uint32_t  Fourcc)
staticprivate

Definition at line 351 of file mythvaapidrminterop.cpp.

Referenced by AcquireVAAPI().

◆ CleanupReferenceFrames()

void MythVAAPIInteropDRM::CleanupReferenceFrames ( )
private

Definition at line 109 of file mythvaapidrminterop.cpp.

Referenced by Acquire(), and ~MythVAAPIInteropDRM().

◆ RotateReferenceFrames()

void MythVAAPIInteropDRM::RotateReferenceFrames ( AVBufferRef *  Buffer)
private

Definition at line 118 of file mythvaapidrminterop.cpp.

Referenced by Acquire().

◆ GetReferenceFrames()

vector< MythVideoTextureOpenGL * > MythVAAPIInteropDRM::GetReferenceFrames ( )
private

Definition at line 141 of file mythvaapidrminterop.cpp.

Referenced by Acquire().

◆ AcquireVAAPI()

vector< MythVideoTextureOpenGL * > MythVAAPIInteropDRM::AcquireVAAPI ( VASurfaceID  Id,
MythRenderOpenGL Context,
MythVideoFrame Frame 
)
private

Definition at line 284 of file mythvaapidrminterop.cpp.

Referenced by Acquire().

◆ AcquirePrime()

vector< MythVideoTextureOpenGL * > MythVAAPIInteropDRM::AcquirePrime ( VASurfaceID  Id,
MythRenderOpenGL Context,
MythVideoFrame Frame 
)
private

Export the given VideoFrame as a DRM PRIME descriptor.

This is funcionally equivalent to the 'regular' VAAPI version but is useful for testing DRM PRIME functionality on desktops.

Definition at line 407 of file mythvaapidrminterop.cpp.

Referenced by Acquire().

◆ GetDRMFrameDescriptor()

AVDRMFrameDescriptor * MythVAAPIInteropDRM::GetDRMFrameDescriptor ( VASurfaceID  Id)
private

Definition at line 427 of file mythvaapidrminterop.cpp.

Referenced by AcquirePrime().

◆ CleanupDRMPRIME()

void MythVAAPIInteropDRM::CleanupDRMPRIME ( )
private

◆ TestPrimeInterop()

bool MythVAAPIInteropDRM::TestPrimeInterop ( )
private

Definition at line 462 of file mythvaapidrminterop.cpp.

Referenced by MythVAAPIInteropDRM().

Member Data Documentation

◆ m_drmFile

QFile MythVAAPIInteropDRM::m_drmFile { }
private

Definition at line 37 of file mythvaapidrminterop.h.

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

◆ m_referenceFrames

QVector<AVBufferRef*> MythVAAPIInteropDRM::m_referenceFrames { }
private

◆ m_usePrime

bool MythVAAPIInteropDRM::m_usePrime { false }
private

Definition at line 47 of file mythvaapidrminterop.h.

Referenced by Acquire(), and MythVAAPIInteropDRM().

◆ m_drmFrames

QHash<unsigned long long, AVDRMFrameDescriptor*> MythVAAPIInteropDRM::m_drmFrames { }
private

Definition at line 48 of file mythvaapidrminterop.h.

Referenced by AcquirePrime(), and CleanupDRMPRIME().


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