summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl_cb.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-01-17 14:51:08 +0100
committerwm4 <wm4@nowhere>2017-01-17 15:48:56 +0100
commit9d68d8fb0f806f25408435c09ac5dbbe34b95462 (patch)
tree843619ba2650487042d661f37b203cb6853495af /video/out/vo_opengl_cb.c
parente94890a5d650d3db4c038adf0b0d1a5e9cce3462 (diff)
downloadmpv-9d68d8fb0f806f25408435c09ac5dbbe34b95462.tar.bz2
mpv-9d68d8fb0f806f25408435c09ac5dbbe34b95462.tar.xz
vo_opengl, vo_opengl_cb: better hwdec interop backend selection
Introduce the --opengl-hwdec-interop option, which replaces --hwdec-preload. The new option allows explicit selection of the interop backend. This is relatively complex, and I would have preferred not to add this, but it's probably useful to debug certain problems. In exchange, the "new" option documents that pretty much any but the simplest use of it will not be forward compatible.
Diffstat (limited to 'video/out/vo_opengl_cb.c')
-rw-r--r--video/out/vo_opengl_cb.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/video/out/vo_opengl_cb.c b/video/out/vo_opengl_cb.c
index c2c0f795e1..9ecdf5eaed 100644
--- a/video/out/vo_opengl_cb.c
+++ b/video/out/vo_opengl_cb.c
@@ -167,15 +167,9 @@ int mpv_opengl_cb_init_gl(struct mpv_opengl_cb_context *ctx, const char *exts,
m_config_cache_update(ctx->vo_opts_cache);
- int g_hwdec_api;
- mp_read_option_raw(ctx->global, "hwdec", &m_option_type_choice, &g_hwdec_api);
-
ctx->hwdec_devs = hwdec_devices_create();
- int hwdec_api = ctx->vo_opts->hwdec_preload_api;
- if (hwdec_api == HWDEC_NONE)
- hwdec_api = g_hwdec_api;
- ctx->hwdec = gl_hwdec_load_api(ctx->log, ctx->gl, ctx->global,
- ctx->hwdec_devs, hwdec_api);
+ ctx->hwdec = gl_hwdec_load(ctx->log, ctx->gl, ctx->global,
+ ctx->hwdec_devs, ctx->vo_opts->gl_hwdec_interop);
gl_video_set_hwdec(ctx->renderer, ctx->hwdec);
pthread_mutex_lock(&ctx->lock);