From e3e2c794efcff035615ac93f8a4cd9ab2cef4d97 Mon Sep 17 00:00:00 2001 From: Rostislav Pehlivanov Date: Thu, 29 Mar 2018 22:23:27 +0100 Subject: 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 --- options/options.c | 5 +++++ options/options.h | 1 + 2 files changed, 6 insertions(+) (limited to 'options') 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; -- cgit v1.2.3