diff options
author | wm4 <wm4@nowhere> | 2017-01-17 14:51:08 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-01-17 15:48:56 +0100 |
commit | 9d68d8fb0f806f25408435c09ac5dbbe34b95462 (patch) | |
tree | 843619ba2650487042d661f37b203cb6853495af /options | |
parent | e94890a5d650d3db4c038adf0b0d1a5e9cce3462 (diff) | |
download | mpv-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 'options')
-rw-r--r-- | options/options.c | 8 | ||||
-rw-r--r-- | options/options.h | 2 |
2 files changed, 7 insertions, 3 deletions
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; |