diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-03-29 22:23:27 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-03-30 14:16:07 -0700 |
commit | e3e2c794efcff035615ac93f8a4cd9ab2cef4d97 (patch) | |
tree | ed2a56b914f67fb99034c8bd6a7e2b6473693d5d /options | |
parent | af9c6c11339c685c217a8ed5a75bb10049a460c2 (diff) | |
download | mpv-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')
-rw-r--r-- | options/options.c | 5 | ||||
-rw-r--r-- | options/options.h | 1 |
2 files changed, 6 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 diff --git a/options/options.h b/options/options.h index ac852b6484..1e95e78e80 100644 --- a/options/options.h +++ b/options/options.h @@ -347,6 +347,7 @@ typedef struct MPOpts { struct macos_opts *macos_opts; struct android_opts *android_opts; struct dvd_opts *dvd_opts; + struct vaapi_opts *vaapi_opts; int cuda_device; } MPOpts; |