summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-09-24 21:07:16 +0200
committerwm4 <wm4@nowhere>2015-09-24 21:07:37 +0200
commitb14c9eb748d80cff3e362c2093a8fb26bce337cf (patch)
tree2ef8fd9173877597eba2146699e44c069c46d040 /video
parentcb1c0725345d4bf7e0226aceb934f06f40cc0ee1 (diff)
downloadmpv-b14c9eb748d80cff3e362c2093a8fb26bce337cf.tar.bz2
mpv-b14c9eb748d80cff3e362c2093a8fb26bce337cf.tar.xz
client API: rename GL_MP_D3D_interfaces
This is a pseudo-OpenGL extension for letting libmpv query native windowing system handles from the API user. (It uses the OpenGL extension mechanism because I'm lazy. In theory it would be nicer to let the user pass them with mpv_opengl_cb_init_gl(), but this would require a more intrusive API change to extend its argument list.) The naming of the extension and associated function was unnecessarily Windows specific (using "D3D"), even though it would work just fine for other platforms. So deprecate the old names and introduce new ones. The old ones still work.
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/common.c10
-rw-r--r--video/out/opengl/common.h2
-rw-r--r--video/out/opengl/hwdec_dxva2.c4
3 files changed, 12 insertions, 4 deletions
diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c
index 6720e13f2a..2b6d3949ef 100644
--- a/video/out/opengl/common.c
+++ b/video/out/opengl/common.c
@@ -291,9 +291,17 @@ static const struct gl_functions gl_functions[] = {
// These don't exist - they are for the sake of mpv internals, and libmpv
// interaction (see libmpv/opengl_cb.h).
{
+ .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(MPGetD3DInterface),
+ DEF_FN_NAME(MPGetNativeDisplay, "glMPGetD3DInterface"),
{0}
},
},
diff --git a/video/out/opengl/common.h b/video/out/opengl/common.h
index 083e2ca023..0e3566d689 100644
--- a/video/out/opengl/common.h
+++ b/video/out/opengl/common.h
@@ -271,7 +271,7 @@ struct GL {
void (GLAPIENTRY *DebugMessageCallback)(MP_GLDEBUGPROC callback,
const void *userParam);
- void *(GLAPIENTRY *MPGetD3DInterface)(const char *name);
+ void *(GLAPIENTRY *MPGetNativeDisplay)(const char *name);
};
#endif /* MPLAYER_GL_COMMON_H */
diff --git a/video/out/opengl/hwdec_dxva2.c b/video/out/opengl/hwdec_dxva2.c
index f6b3ac0e74..aba442b653 100644
--- a/video/out/opengl/hwdec_dxva2.c
+++ b/video/out/opengl/hwdec_dxva2.c
@@ -23,13 +23,13 @@ static void destroy(struct gl_hwdec *hw)
static int create(struct gl_hwdec *hw)
{
GL *gl = hw->gl;
- if (hw->hwctx || !gl->MPGetD3DInterface)
+ if (hw->hwctx || !gl->MPGetNativeDisplay)
return -1;
struct priv *p = talloc_zero(hw, struct priv);
hw->priv = p;
- p->ctx.d3d9_device = gl->MPGetD3DInterface("IDirect3DDevice9");
+ p->ctx.d3d9_device = gl->MPGetNativeDisplay("IDirect3DDevice9");
if (!p->ctx.d3d9_device)
return -1;