Go to the documentation of this file. 1 #ifndef MYTHVAAPIINTEROP_H
2 #define MYTHVAAPIINTEROP_H
11 struct AVFilterContext;
15 #include "va/va_version.h"
16 #if VA_CHECK_VERSION(0,34,0)
17 #include "va/va_compat.h"
19 #define Cursor XCursor // Prevent conflicts with Qt6.
20 #define pointer Xpointer // Prevent conflicts with Qt6.
21 #if defined(_X11_XLIB_H_) && !defined(Bool)
24 #include "va/va_x11.h"
25 #undef None // X11/X.h defines this. Causes compile failure in Qt6.
28 #include "va/va_glx.h"
29 #include "va/va_drm.h"
30 #include "va/va_drmcommon.h"
31 #undef Bool // Interferes with cmake moc file compilation
33 #ifndef VA_FOURCC_I420
34 #define VA_FOURCC_I420 0x30323449
42 ok &= (va_status == VA_STATUS_SUCCESS); \
44 LOG(VB_GENERAL, LOG_ERR, LOC + QString("Error at %1:%2 (#%3, %4)") \
45 .arg(__FILE__).arg( __LINE__).arg(va_status) \
46 .arg(vaErrorStr(va_status)))
59 AVBufferRef *FramesContext,
int Width,
int Height,
60 AVFilterGraph *&Graph, AVFilterContext *&
Source,
61 AVFilterContext *&Sink);
AVBufferRef * m_vppFramesContext
VASurfaceID m_lastFilteredFrame
AVFilterContext * m_filterSource
MythDeintType m_deinterlacer
static void GetVAAPITypes(MythRenderOpenGL *Context, MythInteropGPU::InteropMap &Types)
Return a list of interops that are supported by the current render device.
MythVAAPIInterop(MythPlayerUI *Player, MythRenderOpenGL *Context, InteropType Type)
uint64_t m_lastFilteredFrameCount
static bool SetupDeinterlacer(MythDeintType Deinterlacer, bool DoubleRate, AVBufferRef *FramesContext, int Width, int Height, AVFilterGraph *&Graph, AVFilterContext *&Source, AVFilterContext *&Sink)
void InitaliseDisplay(void)
virtual void DestroyDeinterlacer(void)
std::map< VideoFrameType, InteropTypes > InteropMap
VADisplay GetDisplay(void)
static MythVAAPIInterop * CreateVAAPI(MythPlayerUI *Player, MythRenderOpenGL *Context)
~MythVAAPIInterop() override
VASurfaceID VerifySurface(MythRenderOpenGL *Context, MythVideoFrame *Frame)
virtual void PostInitDeinterlacer(void)
AVFilterGraph * m_filterGraph
AVFilterContext * m_filterSink
VASurfaceID Deinterlace(MythVideoFrame *Frame, VASurfaceID Current, FrameScanType Scan)