mirror of https://github.com/mpv-player/mpv
52dd38a48a
Hardware decoding things often need access to additional handles from the windowing system, such as the X11 or Wayland display when using vaapi. The opengl-cb had nothing dedicated for this, and used the weird GL_MP_MPGetNativeDisplay GL extension (which was mpv specific and not officially registered with OpenGL). This was awkward, and a pain due to having to emulate GL context behavior (like needing a TLS variable to store context for the pseudo GL extension function). In addition (and not inherently due to this), we could pass only one resource from mpv builtin context backends to hwdecs. It was also all GL specific. Replace this with a newer mechanism. It works for all RA backends, not just GL. the API user can explicitly pass the objects at init time via mpv_render_context_create(). Multiple resources are naturally possible. The API uses MPV_RENDER_PARAM_* defines, but internally we use strings. This is done for 2 reasons: 1. trying to leave libmpv and internal mechanisms decoupled, 2. not having to add public API for some of the internal resource types (especially D3D/GL interop stuff). To remain sane, drop support for obscure half-working opengl-cb things, like the DRM interop (was missing necessary things), the RPI window thing (nobody used it), and obscure D3D interop things (not needed with ANGLE, others were undocumented). In order not to break ABI and the C API, we don't remove the associated structs from opengl_cb.h. The parts which are still needed (in particular DRM interop) needs to be ported to the render API. |
||
---|---|---|
.. | ||
angle_dynamic.c | ||
angle_dynamic.h | ||
common.c | ||
common.h | ||
context.c | ||
context.h | ||
context_android.c | ||
context_angle.c | ||
context_cocoa.c | ||
context_drm_egl.c | ||
context_dxinterop.c | ||
context_glx.c | ||
context_mali_fbdev.c | ||
context_rpi.c | ||
context_vdpau.c | ||
context_wayland.c | ||
context_win.c | ||
context_x11egl.c | ||
cuda_dynamic.c | ||
cuda_dynamic.h | ||
egl_helpers.c | ||
egl_helpers.h | ||
formats.c | ||
formats.h | ||
gl_headers.h | ||
hwdec_cuda.c | ||
hwdec_d3d11egl.c | ||
hwdec_d3d11eglrgb.c | ||
hwdec_drmprime_drm.c | ||
hwdec_dxva2egl.c | ||
hwdec_dxva2gldx.c | ||
hwdec_ios.m | ||
hwdec_osx.c | ||
hwdec_rpi.c | ||
hwdec_vaegl.c | ||
hwdec_vdpau.c | ||
libmpv_gl.c | ||
ra_gl.c | ||
ra_gl.h | ||
utils.c | ||
utils.h |