summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-11-29 12:39:20 +0100
committersfan5 <sfan5@live.de>2021-12-15 12:29:10 +0100
commit72915e8b76b2e5da9ddc90e892a544b6de512f39 (patch)
tree620a9384ee691e8a0925e018a9b81504a209454e
parent0bb15c7a133a0c213f5098d54b37c5d79718b79e (diff)
downloadmpv-72915e8b76b2e5da9ddc90e892a544b6de512f39.tar.bz2
mpv-72915e8b76b2e5da9ddc90e892a544b6de512f39.tar.xz
{player,video}: remove references to obsolete opengl-cb API
-rw-r--r--DOCS/man/options.rst10
-rw-r--r--libmpv/render_gl.h3
-rw-r--r--player/client.c3
-rw-r--r--player/video.c6
-rw-r--r--video/out/gpu/ra.h4
-rw-r--r--video/out/opengl/common.c18
-rw-r--r--video/out/opengl/common.h2
-rw-r--r--video/out/opengl/libmpv_gl.c16
-rw-r--r--video/out/vo.h2
9 files changed, 14 insertions, 50 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index c0af0be971..000e9185e5 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -1677,9 +1677,7 @@ Video
slow hardware. This works only with the following VOs:
- ``gpu``: requires at least OpenGL 4.4 or Vulkan.
-
- (In particular, this can't be made work with ``opengl-cb``, but the libmpv
- render API has optional support.)
+ - ``libmpv``: The libmpv render API has optional support.
Using video filters of any kind that write to the image data (or output
newly allocated frames) will silently disable the DR code path.
@@ -6666,9 +6664,9 @@ Miscellaneous
other hand, setting a too high value can reduce responsiveness with low
FPS value.
- For client API users using the render API (or the deprecated ``opengl-cb``
- API), this option is interesting, because you can stop the render API
- from limiting your FPS (see ``mpv_render_context_render()`` documentation).
+ This option is interesting for client API users using the render API
+ because you can stop it from limiting your FPS
+ (see ``mpv_render_context_render()`` documentation).
This applies only to audio timing modes (e.g. ``--video-sync=audio``). In
other modes (``--video-sync=display-...``), video timing relies on vsync
diff --git a/libmpv/render_gl.h b/libmpv/render_gl.h
index cb141df564..5bc892903c 100644
--- a/libmpv/render_gl.h
+++ b/libmpv/render_gl.h
@@ -121,8 +121,7 @@ typedef struct mpv_opengl_init_params {
*/
void *get_proc_address_ctx;
/**
- * This should not be used. It is deprecated and will be removed or ignored
- * when the opengl_cb API is removed.
+ * This should not be used. It is deprecated and ignored.
*/
const char *extra_exts;
} mpv_opengl_init_params;
diff --git a/player/client.c b/player/client.c
index 27f42afd74..0c6e829015 100644
--- a/player/client.c
+++ b/player/client.c
@@ -2181,10 +2181,9 @@ mp_client_api_acquire_render_context(struct mp_client_api *ca)
return res;
}
-// Emulation of old opengl_cb API.
+// Stubs of the old opengl_cb API.
#include "libmpv/opengl_cb.h"
-#include "libmpv/render_gl.h"
void mpv_opengl_cb_set_update_callback(mpv_opengl_cb_context *ctx,
mpv_opengl_cb_update_fn callback,
diff --git a/player/video.c b/player/video.c
index 734835d850..cae23df1c8 100644
--- a/player/video.c
+++ b/player/video.c
@@ -176,9 +176,9 @@ int init_video_decoder(struct MPContext *mpctx, struct track *track)
// If possible, set this as parent so the decoder gets the hwdec and DR
// interfaces.
- // Note: at least mpv_opengl_cb_uninit_gl() relies on being able to get
- // rid of all references to the VO by destroying the VO chain. Thus,
- // decoders not linked to vo_chain must not use the hwdec context.
+ // Note: We rely on being able to get rid of all references to the VO by
+ // destroying the VO chain. Thus, decoders not linked to vo_chain
+ // must not use the hwdec context.
if (track->vo_c)
parent = track->vo_c->filter->f;
diff --git a/video/out/gpu/ra.h b/video/out/gpu/ra.h
index 4067b52425..cc7fd570f1 100644
--- a/video/out/gpu/ra.h
+++ b/video/out/gpu/ra.h
@@ -47,8 +47,8 @@ struct ra {
};
// For passing through windowing system specific parameters and such. The
-// names are always internal (except for legacy opengl-cb uses; the libmpv
-// render API uses mpv_render_param_type and maps them to names internally).
+// names are always internal (the libmpv render API uses mpv_render_param_type
+// and maps them to names internally).
// For example, a name="x11" entry has a X11 display as (Display*)data.
struct ra_native_resource {
const char *name;
diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c
index b0d37bec44..d5883d4a4d 100644
--- a/video/out/opengl/common.c
+++ b/video/out/opengl/common.c
@@ -479,24 +479,6 @@ static const struct gl_functions gl_functions[] = {
{0}
},
},
- // These don't exist - they are for the sake of mpv internals, and libmpv
- // interaction (see libmpv/opengl_cb.h).
- // This is not used by the render API, only the deprecated opengl-cb API.
- {
- .extension = "GL_MP_MPGetNativeDisplay",
- .functions = (const struct gl_function[]) {
- DEF_FN(MPGetNativeDisplay),
- {0}
- },
- },
- // Same, but using the old name.
- {
- .extension = "GL_MP_D3D_interfaces",
- .functions = (const struct gl_function[]) {
- DEF_FN_NAME(MPGetNativeDisplay, "glMPGetD3DInterface"),
- {0}
- },
- },
{
.extension = "GL_ANGLE_translated_shader_source",
.functions = (const struct gl_function[]) {
diff --git a/video/out/opengl/common.h b/video/out/opengl/common.h
index f89fcc953b..1292be45b2 100644
--- a/video/out/opengl/common.h
+++ b/video/out/opengl/common.h
@@ -242,8 +242,6 @@ struct GL {
void (GLAPIENTRY *DebugMessageCallback)(MP_GLDEBUGPROC callback,
const void *userParam);
-
- void *(GLAPIENTRY *MPGetNativeDisplay)(const char *name);
};
#endif /* MPLAYER_GL_COMMON_H */
diff --git a/video/out/opengl/libmpv_gl.c b/video/out/opengl/libmpv_gl.c
index ae6ec66ca4..e916a3c45d 100644
--- a/video/out/opengl/libmpv_gl.c
+++ b/video/out/opengl/libmpv_gl.c
@@ -25,7 +25,7 @@ static int init(struct libmpv_gpu_context *ctx, mpv_render_param *params)
mpgl_load_functions2(p->gl, init_params->get_proc_address,
init_params->get_proc_address_ctx,
- init_params->extra_exts, ctx->log);
+ NULL, ctx->log);
if (!p->gl->version && !p->gl->es) {
MP_FATAL(ctx, "OpenGL not initialized.\n");
return MPV_ERROR_UNSUPPORTED;
@@ -42,7 +42,7 @@ static int init(struct libmpv_gpu_context *ctx, mpv_render_param *params)
static const struct ra_swapchain_fns empty_swapchain_fns = {0};
struct ra_gl_ctx_params gl_params = {
- // vo_opengl_cb is essentially like a gigantic external swapchain where
+ // vo_libmpv is essentially like a gigantic external swapchain where
// the user is in charge of presentation / swapping etc. But we don't
// actually need to provide any of these functions, since we can just
// not call them to begin with - so just set it to an empty object to
@@ -63,18 +63,6 @@ static int init(struct libmpv_gpu_context *ctx, mpv_render_param *params)
ctx->ra = p->ra_ctx->ra;
- // Legacy API user loading for opengl-cb. Explicitly inactive for render API.
- if (get_mpv_render_param(params, (mpv_render_param_type)-1, NULL) ==
- ctx->global && p->gl->MPGetNativeDisplay)
- {
- void *x11 = p->gl->MPGetNativeDisplay("x11");
- if (x11)
- ra_add_native_resource(ctx->ra, "x11", x11);
- void *wl = p->gl->MPGetNativeDisplay("wl");
- if (wl)
- ra_add_native_resource(ctx->ra, "wl", wl);
- }
-
return 0;
}
diff --git a/video/out/vo.h b/video/out/vo.h
index 8e17b3cf42..7ab19a96f1 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -80,7 +80,7 @@ enum mp_voctrl {
// be updated and redrawn. Optional; emulated if not available.
VOCTRL_REDRAW_FRAME,
- // Only used internally in vo_opengl_cb
+ // Only used internally in vo_libmpv
VOCTRL_PREINIT,
VOCTRL_UNINIT,
VOCTRL_RECONFIG,