0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

vo_opengl: deprecate 'drm-egl' backend and introduce 'drm' instead

Just a name change. Requested.
This commit is contained in:
wm4 2016-09-27 16:29:22 +02:00
parent 45c97aea78
commit c239b7de7e
3 changed files with 24 additions and 4 deletions

View File

@ -4244,8 +4244,8 @@ The following video options are currently all specific to ``--vo=opengl`` and
X11/GLX
wayland
Wayland/EGL
drm-egl
DRM/EGL
drm
DRM/EGL (``drm-egl`` is a deprecated alias)
x11egl
X11/EGL
mali-fbdev

View File

@ -38,6 +38,7 @@ extern const struct mpgl_driver mpgl_driver_x11;
extern const struct mpgl_driver mpgl_driver_x11egl;
extern const struct mpgl_driver mpgl_driver_x11_probe;
extern const struct mpgl_driver mpgl_driver_drm_egl;
extern const struct mpgl_driver mpgl_driver_drm;
extern const struct mpgl_driver mpgl_driver_cocoa;
extern const struct mpgl_driver mpgl_driver_wayland;
extern const struct mpgl_driver mpgl_driver_w32;
@ -77,6 +78,7 @@ static const struct mpgl_driver *const backends[] = {
&mpgl_driver_x11,
#endif
#if HAVE_EGL_DRM
&mpgl_driver_drm,
&mpgl_driver_drm_egl,
#endif
#if HAVE_MALI_FBDEV

View File

@ -348,6 +348,14 @@ static int drm_egl_init(struct MPGLContext *ctx, int flags)
return 0;
}
static int drm_egl_init_deprecated(struct MPGLContext *ctx, int flags)
{
if (ctx->vo->probing)
return -1;
MP_WARN(ctx->vo, "'drm-egl' is deprecated, use 'drm' instead.\n");
return drm_egl_init(ctx, flags);
}
static int drm_egl_reconfig(struct MPGLContext *ctx)
{
struct priv *p = ctx->priv;
@ -405,8 +413,8 @@ static void drm_egl_swap_buffers(MPGLContext *ctx)
p->gbm.bo = p->gbm.next_bo;
}
const struct mpgl_driver mpgl_driver_drm_egl = {
.name = "drm-egl",
const struct mpgl_driver mpgl_driver_drm = {
.name = "drm",
.priv_size = sizeof(struct priv),
.init = drm_egl_init,
.reconfig = drm_egl_reconfig,
@ -414,3 +422,13 @@ const struct mpgl_driver mpgl_driver_drm_egl = {
.control = drm_egl_control,
.uninit = drm_egl_uninit,
};
const struct mpgl_driver mpgl_driver_drm_egl = {
.name = "drm-egl",
.priv_size = sizeof(struct priv),
.init = drm_egl_init_deprecated,
.reconfig = drm_egl_reconfig,
.swap_buffers = drm_egl_swap_buffers,
.control = drm_egl_control,
.uninit = drm_egl_uninit,
};