From 9d68d8fb0f806f25408435c09ac5dbbe34b95462 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 17 Jan 2017 14:51:08 +0100 Subject: 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. --- options/options.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'options/options.c') diff --git a/options/options.c b/options/options.c index f79df7d82f..bc9ddf8614 100644 --- a/options/options.c +++ b/options/options.c @@ -40,6 +40,7 @@ #include "stream/stream.h" #include "video/csputils.h" #include "video/hwdec.h" +#include "video/out/opengl/hwdec.h" #include "video/image_writer.h" #include "sub/osd.h" #include "audio/filter/af.h" @@ -150,7 +151,6 @@ const struct m_sub_options stream_cache_conf = { static const m_option_t mp_vo_opt_list[] = { OPT_SETTINGSLIST("vo", video_driver_list, 0, &vo_obj_list, ), - OPT_CHOICE_C("hwdec-preload", hwdec_preload_api, 0, mp_hwdec_names), OPT_SUBSTRUCT("sws", sws_opts, sws_conf, 0), OPT_FLAG("taskbar-progress", taskbar_progress, 0), OPT_FLAG("ontop", ontop, 0), @@ -199,7 +199,11 @@ static const m_option_t mp_vo_opt_list[] = { 0, drm_validate_connector_opt), OPT_INT("drm-mode", drm_mode_id, 0), #endif - +#if HAVE_GL + OPT_STRING_VALIDATE("opengl-hwdec-interop", gl_hwdec_interop, 0, + gl_hwdec_validate_opt), + OPT_REPLACED("hwdec-preload", "opengl-hwdec-interop"), +#endif {0} }; -- cgit v1.2.3