summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2018-03-29 22:23:27 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-03-30 14:16:07 -0700
commite3e2c794efcff035615ac93f8a4cd9ab2cef4d97 (patch)
treeed2a56b914f67fb99034c8bd6a7e2b6473693d5d /options/options.c
parentaf9c6c11339c685c217a8ed5a75bb10049a460c2 (diff)
downloadmpv-e3e2c794efcff035615ac93f8a4cd9ab2cef4d97.tar.bz2
mpv-e3e2c794efcff035615ac93f8a4cd9ab2cef4d97.tar.xz
vaapi: add option to select a non-default device path
On machines with multiple GPUs, /dev/dri/renderD128 isn't guaranteed to point to a valid vaapi device. This just adds the option to specify what path to use. The old fallback /dev/dri/card0 is gone but that's not a loss as its a legacy interface no longer accepted as valid by libva. Fixes #4320
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c
index a2322e7bb1..679133dbb3 100644
--- a/options/options.c
+++ b/options/options.c
@@ -89,6 +89,7 @@ extern const struct m_sub_options angle_conf;
extern const struct m_sub_options cocoa_conf;
extern const struct m_sub_options macos_conf;
extern const struct m_sub_options android_conf;
+extern const struct m_sub_options vaapi_conf;
static const struct m_sub_options screenshot_conf = {
.opts = image_writer_opts,
@@ -756,6 +757,10 @@ const m_option_t mp_opts[] = {
0, INT_MAX, ({"auto", -1})),
#endif
+#if HAVE_VAAPI
+ OPT_SUBSTRUCT("vaapi", vaapi_opts, vaapi_conf, 0),
+#endif
+
#if HAVE_ENCODING
OPT_SUBSTRUCT("", encode_opts, encode_config, 0),
#endif