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 ++++++-- options/options.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'options') 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} }; diff --git a/options/options.h b/options/options.h index fc37e98f8a..1d79d55c31 100644 --- a/options/options.h +++ b/options/options.h @@ -50,7 +50,7 @@ typedef struct mp_vo_opts { // vo_wayland, vo_drm struct sws_opts *sws_opts; // vo_opengl, vo_opengl_cb - int hwdec_preload_api; + char *gl_hwdec_interop; // vo_drm char *drm_connector_spec; int drm_mode_id; -- cgit v1.2.3