MythTV  master
mythvaapiinterop.cpp
Go to the documentation of this file.
1 // MythTV
2 #ifdef USING_DRM_VIDEO
4 #endif
5 
6 #include "mythvideoout.h"
7 #include "mythplayerui.h"
8 #include "mythvideocolourspace.h"
9 #include "fourcc.h"
10 #include "mythvaapiinterop.h"
11 #include "mythvaapidrminterop.h"
12 #include "mythvaapiglxinterop.h"
13 
14 extern "C" {
15 #include "libavfilter/buffersrc.h"
16 #include "libavfilter/buffersink.h"
17 #include "libavutil/hwcontext_vaapi.h"
18 }
19 
20 #define LOC QString("VAAPIInterop: ")
21 
39 {
40  if (!Context)
41  return;
42 
43  OpenGLLocker locker(Context);
44  bool egl = Context->IsEGL();
45  bool opengles = Context->isOpenGLES();
46  bool wayland = qgetenv("XDG_SESSION_TYPE").contains("wayland");
47 
48  // best first
50 
51 #ifdef USING_DRM_VIDEO
53  vaapitypes.emplace_back(DRM_DRMPRIME);
54 #endif
55 
56 #ifdef USING_EGL
57  // zero copy
58  if (egl && MythVAAPIInteropDRM::IsSupported(Context))
59  vaapitypes.emplace_back(GL_VAAPIEGLDRM);
60 #endif
61  // 1x copy
62  if (!egl && !wayland && MythVAAPIInteropGLXPixmap::IsSupported(Context))
63  vaapitypes.emplace_back(GL_VAAPIGLXPIX);
64  // 2x copy
65  if (!egl && !opengles && !wayland)
66  vaapitypes.emplace_back(GL_VAAPIGLXCOPY);
67 
68  if (!vaapitypes.empty())
69  Types[FMT_VAAPI] = vaapitypes;
70 }
71 
73 {
74  if (!(Player && Context))
75  return nullptr;
76 
77  const auto & types = Player->GetInteropTypes();
78  if (const auto & vaapi = types.find(FMT_VAAPI); vaapi != types.cend())
79  {
80  for (auto type : vaapi->second)
81  {
82 #ifdef USING_EGL
83  if ((type == GL_VAAPIEGLDRM) || (type == DRM_DRMPRIME))
84  return new MythVAAPIInteropDRM(Player, Context, type);
85 #endif
86  if (type == GL_VAAPIGLXPIX)
87  return new MythVAAPIInteropGLXPixmap(Player, Context);
88  if (type == GL_VAAPIGLXCOPY)
89  return new MythVAAPIInteropGLXCopy(Player, Context);
90  }
91  }
92  return nullptr;
93 }
94 
103  : MythOpenGLInterop(Context, Type, Player)
104 {
105 }
106 
108 {
110  if (m_vaDisplay)
111  if (vaTerminate(m_vaDisplay) != VA_STATUS_SUCCESS)
112  LOG(VB_GENERAL, LOG_WARNING, LOC + "Error closing VAAPI display");
113 }
114 
116 {
117  return m_vaDisplay;
118 }
119 
121 {
122  return m_vaVendor;
123 }
124 
126 {
127  if (!m_vaDisplay)
128  return;
129  int major = 0;
130  int minor = 0;
131  if (vaInitialize(m_vaDisplay, &major, &minor) != VA_STATUS_SUCCESS)
132  {
133  LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to initialise VAAPI display");
134  vaTerminate(m_vaDisplay);
135  m_vaDisplay = nullptr;
136  }
137  else
138  {
139  m_vaVendor = vaQueryVendorString(m_vaDisplay);
140  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Created VAAPI %1.%2 display for %3 (%4)")
141  .arg(major).arg(minor).arg(TypeToString(m_type), m_vaVendor));
142  }
143 }
144 
146 {
147  if (m_filterGraph)
148  LOG(VB_GENERAL, LOG_INFO, LOC + "Destroying VAAPI deinterlacer");
149  avfilter_graph_free(&m_filterGraph);
150  m_filterGraph = nullptr;
151  m_filterSink = nullptr;
152  m_filterSource = nullptr;
154  m_deinterlacer2x = false;
155  m_firstField = true;
158  av_buffer_unref(&m_vppFramesContext);
159 }
160 
162 {
163  VASurfaceID result = 0;
164  if (!Frame)
165  return result;
166 
167  if ((Frame->m_pixFmt != AV_PIX_FMT_VAAPI) || (Frame->m_type != FMT_VAAPI) ||
168  !Frame->m_buffer || !Frame->m_priv[1])
169  return result;
170 
171  // Sanity check the context
172  if (m_openglContext != Context)
173  {
174  LOG(VB_GENERAL, LOG_ERR, LOC + "Mismatched OpenGL contexts!");
175  return result;
176  }
177 
178  // Check size
179  QSize surfacesize(Frame->m_width, Frame->m_height);
180  if (m_textureSize != surfacesize)
181  {
182  if (!m_textureSize.isEmpty())
183  LOG(VB_GENERAL, LOG_WARNING, LOC + "Video texture size changed!");
184  m_textureSize = surfacesize;
185  }
186 
187  // Retrieve surface
188  auto id = static_cast<VASurfaceID>(reinterpret_cast<uintptr_t>(Frame->m_buffer));
189  if (id)
190  result = id;
191  return result;
192 }
193 
194 bool MythVAAPIInterop::SetupDeinterlacer(MythDeintType Deinterlacer, bool DoubleRate,
195  AVBufferRef *FramesContext,
196  int Width, int Height,
197  // Outputs
198  AVFilterGraph *&Graph,
199  AVFilterContext *&Source,
200  AVFilterContext *&Sink)
201 {
202  if (!FramesContext)
203  {
204  LOG(VB_GENERAL, LOG_ERR, LOC + "No hardware frames context");
205  return false;
206  }
207 
208  int ret = 0;
209  QString args;
210  QString deinterlacer = "bob";
211  if (DEINT_MEDIUM == Deinterlacer)
212  deinterlacer = "motion_adaptive";
213  else if (DEINT_HIGH == Deinterlacer)
214  deinterlacer = "motion_compensated";
215 
216  // N.B. set auto to 0 otherwise we confuse playback if VAAPI does not deinterlace
217  QString filters = QString("deinterlace_vaapi=mode=%1:rate=%2:auto=0")
218  .arg(deinterlacer, DoubleRate ? "field" : "frame");
219  const AVFilter *buffersrc = avfilter_get_by_name("buffer");
220  const AVFilter *buffersink = avfilter_get_by_name("buffersink");
221  AVFilterInOut *outputs = avfilter_inout_alloc();
222  AVFilterInOut *inputs = avfilter_inout_alloc();
223  AVBufferSrcParameters* params = nullptr;
224 
225  Graph = avfilter_graph_alloc();
226  if (!outputs || !inputs || !Graph)
227  {
228  ret = AVERROR(ENOMEM);
229  goto end;
230  }
231 
232  /* buffer video source: the decoded frames from the decoder will be inserted here. */
233  args = QString("video_size=%1x%2:pix_fmt=%3:time_base=1/1")
234  .arg(Width).arg(Height).arg(AV_PIX_FMT_VAAPI);
235 
236  ret = avfilter_graph_create_filter(&Source, buffersrc, "in",
237  args.toLocal8Bit().constData(), nullptr, Graph);
238  if (ret < 0)
239  {
240  LOG(VB_GENERAL, LOG_ERR, LOC + "avfilter_graph_create_filter failed for buffer source");
241  goto end;
242  }
243 
244  params = av_buffersrc_parameters_alloc();
245  params->hw_frames_ctx = FramesContext;
246  ret = av_buffersrc_parameters_set(Source, params);
247 
248  if (ret < 0)
249  {
250  LOG(VB_GENERAL, LOG_ERR, LOC + "av_buffersrc_parameters_set failed");
251  goto end;
252  }
253  av_freep(reinterpret_cast<void*>(&params));
254 
255  /* buffer video sink: to terminate the filter chain. */
256  ret = avfilter_graph_create_filter(&Sink, buffersink, "out",
257  nullptr, nullptr, Graph);
258  if (ret < 0)
259  {
260  LOG(VB_GENERAL, LOG_ERR, LOC + "avfilter_graph_create_filter failed for buffer sink");
261  goto end;
262  }
263 
264  /*
265  * Set the endpoints for the filter graph. The filter_graph will
266  * be linked to the graph described by filters_descr.
267  */
268 
269  /*
270  * The buffer source output must be connected to the input pad of
271  * the first filter described by filters_descr; since the first
272  * filter input label is not specified, it is set to "in" by
273  * default.
274  */
275  outputs->name = av_strdup("in");
276  outputs->filter_ctx = Source;
277  outputs->pad_idx = 0;
278  outputs->next = nullptr;
279 
280  /*
281  * The buffer sink input must be connected to the output pad of
282  * the last filter described by filters_descr; since the last
283  * filter output label is not specified, it is set to "out" by
284  * default.
285  */
286  inputs->name = av_strdup("out");
287  inputs->filter_ctx = Sink;
288  inputs->pad_idx = 0;
289  inputs->next = nullptr;
290 
291  ret = avfilter_graph_parse_ptr(Graph, filters.toLocal8Bit(),
292  &inputs, &outputs, nullptr);
293  if (ret < 0)
294  {
295  LOG(VB_GENERAL, LOG_ERR, LOC + QString("avfilter_graph_parse_ptr failed for %1")
296  .arg(filters));
297  goto end;
298  }
299 
300  ret = avfilter_graph_config(Graph, nullptr);
301  if (ret < 0)
302  {
303  LOG(VB_GENERAL, LOG_ERR, LOC +
304  QString("VAAPI deinterlacer config failed - '%1' unsupported?").arg(deinterlacer));
305  goto end;
306  }
307 
308  LOG(VB_GENERAL, LOG_INFO, LOC + QString("Created deinterlacer '%1'")
309  .arg(MythVideoFrame::DeinterlacerName(Deinterlacer | DEINT_DRIVER, DoubleRate, FMT_VAAPI)));
310 
311 end:
312  if (ret < 0)
313  {
314  avfilter_graph_free(&Graph);
315  Graph = nullptr;
316  }
317  avfilter_inout_free(&inputs);
318  avfilter_inout_free(&outputs);
319  return ret >= 0;
320 }
321 
322 VASurfaceID MythVAAPIInterop::Deinterlace(MythVideoFrame *Frame, VASurfaceID Current, FrameScanType Scan)
323 {
324  VASurfaceID result = Current;
325  if (!Frame)
326  return result;
327 
328  while (!m_filterError && is_interlaced(Scan))
329  {
330  // N.B. for DRM the use of a shader deint is checked before we get here
331  MythDeintType deinterlacer = DEINT_NONE;
332  bool doublerate = true;
333  // no CPU or GLSL deinterlacing so pick up these options as well
334  // N.B. Override deinterlacer_allowed to pick up any preference
335  MythDeintType doublepref = Frame->GetDoubleRateOption(DEINT_DRIVER | DEINT_SHADER | DEINT_CPU, DEINT_ALL);
336  MythDeintType singlepref = Frame->GetSingleRateOption(DEINT_DRIVER | DEINT_SHADER | DEINT_CPU, DEINT_ALL);
337 
338  if (doublepref)
339  {
340  deinterlacer = doublepref;
341  }
342  else if (singlepref)
343  {
344  deinterlacer = singlepref;
345  doublerate = false;
346  }
347 
348  if ((m_deinterlacer == deinterlacer) && (m_deinterlacer2x == doublerate))
349  break;
350 
352 
353  if (deinterlacer != DEINT_NONE)
354  {
355  auto* frames = reinterpret_cast<AVBufferRef*>(Frame->m_priv[1]);
356  if (!frames)
357  break;
358 
359  AVBufferRef* hwdeviceref = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_VAAPI);
360  if (!hwdeviceref)
361  break;
362 
363  auto* hwdevicecontext = reinterpret_cast<AVHWDeviceContext*>(hwdeviceref->data);
364  hwdevicecontext->free = [](AVHWDeviceContext* /*unused*/) { LOG(VB_PLAYBACK, LOG_INFO, LOC + "VAAPI VPP device context finished"); };
365 
366  auto *vaapidevicectx = reinterpret_cast<AVVAAPIDeviceContext*>(hwdevicecontext->hwctx);
367  vaapidevicectx->display = m_vaDisplay; // re-use the existing display
368 
369  if (av_hwdevice_ctx_init(hwdeviceref) < 0)
370  {
371  av_buffer_unref(&hwdeviceref);
372  m_filterError = true;
373  break;
374  }
375 
376  AVBufferRef *newframes = av_hwframe_ctx_alloc(hwdeviceref);
377  if (!newframes)
378  {
379  m_filterError = true;
380  av_buffer_unref(&hwdeviceref);
381  break;
382  }
383 
384  auto* dstframes = reinterpret_cast<AVHWFramesContext*>(newframes->data);
385  auto* srcframes = reinterpret_cast<AVHWFramesContext*>(frames->data);
386 
387  m_filterWidth = srcframes->width;
388  m_filterHeight = srcframes->height;
389  static constexpr int kVppPoolSize = 2; // seems to be enough
390  dstframes->sw_format = srcframes->sw_format;
391  dstframes->width = m_filterWidth;
392  dstframes->height = m_filterHeight;
393  dstframes->initial_pool_size = kVppPoolSize;
394  dstframes->format = AV_PIX_FMT_VAAPI;
395  dstframes->free = [](AVHWFramesContext* /*unused*/) { LOG(VB_PLAYBACK, LOG_INFO, LOC + "VAAPI VPP frames context finished"); };
396 
397  if (av_hwframe_ctx_init(newframes) < 0)
398  {
399  m_filterError = true;
400  av_buffer_unref(&hwdeviceref);
401  av_buffer_unref(&newframes);
402  break;
403  }
404 
405  m_vppFramesContext = newframes;
406  LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("New VAAPI frame pool with %1 %2x%3 surfaces")
407  .arg(kVppPoolSize).arg(m_filterWidth).arg(m_filterHeight));
408  av_buffer_unref(&hwdeviceref);
409 
410  if (!MythVAAPIInterop::SetupDeinterlacer(deinterlacer, doublerate, m_vppFramesContext,
413  {
414  LOG(VB_GENERAL, LOG_ERR, LOC + QString("Failed to create VAAPI deinterlacer %1 - disabling")
415  .arg(MythVideoFrame::DeinterlacerName(deinterlacer | DEINT_DRIVER, doublerate, FMT_VAAPI)));
417  m_filterError = true;
418  }
419  else
420  {
421  m_deinterlacer = deinterlacer;
422  m_deinterlacer2x = doublerate;
424  break;
425  }
426  }
427  break;
428  }
429 
430  if (!is_interlaced(Scan) && m_deinterlacer)
432 
433  if (m_deinterlacer)
434  {
435  // deinterlacing the pause frame repeatedly is unnecessary and, due to the
436  // buffering in the VAAPI frames context, causes the image to 'jiggle' when using
437  // double rate deinterlacing. If we are confident this is a pause frame we have seen,
438  // return the last deinterlaced frame.
439  if (Frame->m_pauseFrame && m_lastFilteredFrame && (m_lastFilteredFrameCount == Frame->m_frameCounter))
440  return m_lastFilteredFrame;
441 
442  Frame->m_deinterlaceInuse = m_deinterlacer | DEINT_DRIVER;
443  Frame->m_deinterlaceInuse2x = m_deinterlacer2x;
444 
445  // 'pump' the filter with frames until it starts returning usefull output.
446  // This minimises discontinuities at start up (where we would otherwise
447  // show a couple of progressive frames first) and memory consumption for the DRM
448  // interop as we only cache OpenGL textures for the deinterlacer's frame
449  // pool.
450  int retries = 3;
451  while ((result == Current) && retries--)
452  {
453  while (true)
454  {
455  int ret = 0;
456  MythAVFrame sinkframe;
457  sinkframe->format = AV_PIX_FMT_VAAPI;
458 
459  // only ask for a frame if we are expecting another
461  {
462  ret = av_buffersink_get_frame(m_filterSink, sinkframe);
463  if (ret >= 0)
464  {
465  // we have a filtered frame
466  result = m_lastFilteredFrame = static_cast<VASurfaceID>(reinterpret_cast<uintptr_t>(sinkframe->data[3]));
467  m_lastFilteredFrameCount = Frame->m_frameCounter;
468  m_firstField = true;
469  break;
470  }
471  if (ret != AVERROR(EAGAIN))
472  break;
473  }
474 
475  // add another frame
476  MythAVFrame sourceframe;
477  sourceframe->top_field_first =
478  static_cast<int>(Frame->m_interlacedReverse ? !Frame->m_topFieldFirst : Frame->m_topFieldFirst);
479  sourceframe->interlaced_frame = 1;
480  sourceframe->data[3] = Frame->m_buffer;
481  auto* buffer = reinterpret_cast<AVBufferRef*>(Frame->m_priv[0]);
482  sourceframe->buf[0] = buffer ? av_buffer_ref(buffer) : nullptr;
483  sourceframe->width = m_filterWidth;
484  sourceframe->height = m_filterHeight;
485  sourceframe->format = AV_PIX_FMT_VAAPI;
486  // N.B. This is required after changes in FFmpeg. Using the vpp
487  // frames context doesn't seem correct - but using the 'master'
488  // context does not work
489  sourceframe->hw_frames_ctx = av_buffer_ref(m_vppFramesContext);
490  ret = av_buffersrc_add_frame(m_filterSource, sourceframe);
491  sourceframe->data[3] = nullptr;
492  sourceframe->buf[0] = nullptr;
493  if (ret < 0)
494  break;
495 
496  // try again
497  ret = av_buffersink_get_frame(m_filterSink, sinkframe);
498  if (ret >= 0)
499  {
500  // we have a filtered frame
501  result = m_lastFilteredFrame = static_cast<VASurfaceID>(reinterpret_cast<uintptr_t>(sinkframe->data[3]));
502  m_lastFilteredFrameCount = Frame->m_frameCounter;
503  m_firstField = false;
504  break;
505  }
506  break;
507  }
508  }
509  }
510  return result;
511 }
MythVAAPIInterop::m_vppFramesContext
AVBufferRef * m_vppFramesContext
Definition: mythvaapiinterop.h:79
MythVAAPIInterop::m_lastFilteredFrame
VASurfaceID m_lastFilteredFrame
Definition: mythvaapiinterop.h:86
MythVAAPIInterop::m_vaVendor
QString m_vaVendor
Definition: mythvaapiinterop.h:74
Source
static QString Source(const QNetworkRequest &request)
Definition: netstream.cpp:138
build_compdb.args
args
Definition: build_compdb.py:11
MythVAAPIInterop::m_filterSource
AVFilterContext * m_filterSource
Definition: mythvaapiinterop.h:81
mythvaapiinterop.h
MythVAAPIInterop::m_deinterlacer
MythDeintType m_deinterlacer
Definition: mythvaapiinterop.h:76
mythvideoout.h
MythInteropGPU::m_type
InteropType m_type
Definition: mythinteropgpu.h:67
mythplayerui.h
MythVAAPIInterop::GetVAAPITypes
static void GetVAAPITypes(MythRenderOpenGL *Context, MythInteropGPU::InteropMap &Types)
Return a list of interops that are supported by the current render device.
Definition: mythvaapiinterop.cpp:38
MythVAAPIInterop::MythVAAPIInterop
MythVAAPIInterop(MythPlayerUI *Player, MythRenderOpenGL *Context, InteropType Type)
Definition: mythvaapiinterop.cpp:102
MythVAAPIInterop::m_lastFilteredFrameCount
uint64_t m_lastFilteredFrameCount
Definition: mythvaapiinterop.h:87
Frame
Definition: zmdefines.h:93
MythAVFrame
MythAVFrame little utility class that act as a safe way to allocate an AVFrame which can then be allo...
Definition: mythaverror.h:52
MythVAAPIInterop::m_filterHeight
int m_filterHeight
Definition: mythvaapiinterop.h:85
types
static const struct wl_interface * types[]
Definition: idle_inhibit_unstable_v1.c:39
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MythVAAPIInterop::SetupDeinterlacer
static bool SetupDeinterlacer(MythDeintType Deinterlacer, bool DoubleRate, AVBufferRef *FramesContext, int Width, int Height, AVFilterGraph *&Graph, AVFilterContext *&Source, AVFilterContext *&Sink)
Definition: mythvaapiinterop.cpp:194
MythVAAPIInterop::InitaliseDisplay
void InitaliseDisplay(void)
Definition: mythvaapiinterop.cpp:125
MythInteropGPU::TypeToString
static QString TypeToString(InteropType Type)
Definition: mythinteropgpu.cpp:22
MythVAAPIInterop::DestroyDeinterlacer
virtual void DestroyDeinterlacer(void)
Definition: mythvaapiinterop.cpp:145
MythDeintType
MythDeintType
Definition: mythframe.h:67
MythInteropGPU::InteropMap
std::map< VideoFrameType, InteropTypes > InteropMap
Definition: mythinteropgpu.h:44
MythVAAPIInterop
Definition: mythvaapiinterop.h:48
MythPlayerUI
Definition: mythplayerui.h:12
MythInteropGPU::GL_VAAPIEGLDRM
@ GL_VAAPIEGLDRM
Definition: mythinteropgpu.h:30
MythVAAPIInteropGLXCopy
Definition: mythvaapiglxinterop.h:29
mythvaapiglxinterop.h
MythInteropGPU::DRM_DRMPRIME
@ DRM_DRMPRIME
Definition: mythinteropgpu.h:38
mythvideocolourspace.h
MythVAAPIInterop::m_firstField
bool m_firstField
Definition: mythvaapiinterop.h:78
FMT_VAAPI
@ FMT_VAAPI
Definition: mythframe.h:58
minor
#define minor(X)
Definition: compat.h:78
MythOpenGLInterop
Definition: mythopenglinterop.h:17
MythVAAPIInterop::GetDisplay
VADisplay GetDisplay(void)
Definition: mythvaapiinterop.cpp:115
Source
Definition: channelsettings.cpp:93
MythOpenGLInterop::m_openglContext
MythRenderOpenGL * m_openglContext
Definition: mythopenglinterop.h:41
MythInteropGPU::InteropType
InteropType
Definition: mythinteropgpu.h:25
DEINT_ALL
@ DEINT_ALL
Definition: mythframe.h:76
mythdisplaydrm.h
DEINT_DRIVER
@ DEINT_DRIVER
Definition: mythframe.h:75
MythVAAPIInterop::CreateVAAPI
static MythVAAPIInterop * CreateVAAPI(MythPlayerUI *Player, MythRenderOpenGL *Context)
Definition: mythvaapiinterop.cpp:72
DEINT_SHADER
@ DEINT_SHADER
Definition: mythframe.h:74
MythVAAPIInterop::~MythVAAPIInterop
~MythVAAPIInterop() override
Definition: mythvaapiinterop.cpp:107
LOC
#define LOC
Definition: mythvaapiinterop.cpp:20
MythEGL::IsEGL
bool IsEGL(void)
Definition: mythegl.cpp:29
DEINT_NONE
@ DEINT_NONE
Definition: mythframe.h:69
DEINT_HIGH
@ DEINT_HIGH
Definition: mythframe.h:72
DEINT_CPU
@ DEINT_CPU
Definition: mythframe.h:73
mythvaapidrminterop.h
MythVAAPIInterop::VerifySurface
VASurfaceID VerifySurface(MythRenderOpenGL *Context, MythVideoFrame *Frame)
Definition: mythvaapiinterop.cpp:161
MythVAAPIInterop::m_filterError
bool m_filterError
Definition: mythvaapiinterop.h:83
MythVAAPIInterop::m_deinterlacer2x
bool m_deinterlacer2x
Definition: mythvaapiinterop.h:77
MythVAAPIInterop::PostInitDeinterlacer
virtual void PostInitDeinterlacer(void)
Definition: mythvaapiinterop.h:70
DEINT_MEDIUM
@ DEINT_MEDIUM
Definition: mythframe.h:71
MythVAAPIInterop::m_filterGraph
AVFilterGraph * m_filterGraph
Definition: mythvaapiinterop.h:82
MythRenderOpenGL
Definition: mythrenderopengl.h:96
MythVAAPIInterop::m_filterSink
AVFilterContext * m_filterSink
Definition: mythvaapiinterop.h:80
MythVAAPIInteropGLXPixmap
Definition: mythvaapiglxinterop.h:49
MythDisplayDRM::DirectRenderingAvailable
static bool DirectRenderingAvailable()
Definition: mythdisplaydrm.cpp:17
MythVAAPIInteropDRM::IsSupported
static bool IsSupported(MythRenderOpenGL *Context)
Definition: mythvaapidrminterop.cpp:374
MythVAAPIInterop::GetVendor
QString GetVendor(void)
Definition: mythvaapiinterop.cpp:120
MythInteropGPU::GL_VAAPIGLXPIX
@ GL_VAAPIGLXPIX
Definition: mythinteropgpu.h:29
MythVAAPIInteropGLXPixmap::IsSupported
static bool IsSupported(MythRenderOpenGL *Context)
Definition: mythvaapiglxinterop.cpp:481
MythVideoFrame::DeinterlacerName
static QString DeinterlacerName(MythDeintType Deint, bool DoubleRate, VideoFrameType Format=FMT_NONE)
Definition: mythframe.cpp:462
MythVAAPIInterop::m_filterWidth
int m_filterWidth
Definition: mythvaapiinterop.h:84
FrameScanType
FrameScanType
Definition: videoouttypes.h:94
MythVAAPIInterop::Deinterlace
VASurfaceID Deinterlace(MythVideoFrame *Frame, VASurfaceID Current, FrameScanType Scan)
Definition: mythvaapiinterop.cpp:322
Player
Definition: zmliveplayer.h:34
MythVideoFrame
Definition: mythframe.h:88
MythInteropGPU::GL_VAAPIGLXCOPY
@ GL_VAAPIGLXCOPY
Definition: mythinteropgpu.h:28
MythInteropGPU::m_textureSize
QSize m_textureSize
Definition: mythinteropgpu.h:62
is_interlaced
bool is_interlaced(FrameScanType Scan)
Definition: videoouttypes.h:188
MythVAAPIInterop::m_vaDisplay
VADisplay m_vaDisplay
Definition: mythvaapiinterop.h:73
MythVAAPIInteropDRM
Definition: mythvaapidrminterop.h:15
MythInteropGPU::InteropTypes
std::vector< InteropType > InteropTypes
Definition: mythinteropgpu.h:43
fourcc.h
OpenGLLocker
Definition: mythrenderopengl.h:255