|author||wm4 <wm4@nowhere>||2018-03-22 17:05:01 +0100|
|committer||wm4 <wm4@nowhere>||2018-03-26 19:47:08 +0200|
client API: add a new way to pass X11 Display etc. to render API
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.
Diffstat (limited to 'DOCS/client-api-changes.rst')
1 files changed, 10 insertions, 0 deletions
diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst
index e029b29979..38fbc284b0 100644
@@ -33,6 +33,11 @@ API changes
--- mpv 0.29.0 ---
+ 1.100 - bump API number to avoid confusion with mpv release versions
+ - actually apply the GL_MP_MPGetNativeDisplay change for the new render
+ API. This also means compatibility for anything but x11 and wayland
+ through the old opengl-cb GL_MP_MPGetNativeDisplay method is now
1.29 - the behavior of mpv_terminate_destroy() and mpv_detach_destroy()
changes subtly (see documentation in the header file). In particular,
mpv_detach_destroy() will not leave the player running in all
@@ -55,6 +60,11 @@ API changes
mpv_opengl_cb_report_flip => mpv_render_context_report_swap
mpv_opengl_cb_uninit_gl => mpv_render_context_free
The VO opengl-cb is also renamed to "libmpv".
+ Also, the GL_MP_MPGetNativeDisplay pseudo extension is not used by the
+ render API anymore, and the old opengl-cb API only handles the "x11"
+ and "wl" names anymore. Support for everything else has been removed.
+ The new render API uses proper API parameters, e.g. for X11 you pass
+ MPV_RENDER_PARAM_X11_DISPLAY directly.
- deprecate the qthelper.hpp header file. This provided some C++ helper
utility functions for Qt with use of libmpv. There is no reason to
keep this in the mpv git repository, nor to make it part of the libmpv