summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl.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.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.c')
-rw-r--r--video/out/vo_opengl.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index 7f65a1eafc..be187f63c3 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -411,14 +411,9 @@ static int preinit(struct vo *vo)
hwdec_devices_set_loader(vo->hwdec_devs, call_request_hwdec_api, vo);
- int hwdec = vo->opts->hwdec_preload_api;
- if (hwdec == HWDEC_NONE)
- hwdec = vo->global->opts->hwdec_api;
- if (hwdec != HWDEC_NONE) {
- p->hwdec = gl_hwdec_load_api(p->vo->log, p->gl, vo->global,
- vo->hwdec_devs, hwdec);
- gl_video_set_hwdec(p->renderer, p->hwdec);
- }
+ p->hwdec = gl_hwdec_load(p->vo->log, p->gl, vo->global,
+ vo->hwdec_devs, vo->opts->gl_hwdec_interop);
+ gl_video_set_hwdec(p->renderer, p->hwdec);
return 0;