summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/hwdec.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2022-08-27 09:53:31 -0700
committerPhilip Langdale <github.philipl@overt.org>2022-10-11 10:07:48 -0700
commit064059e6c36329e1b1fd567d0efdfbaf13ec53c4 (patch)
tree154a9afe75e3288499da84ffb9157166c81c60bb /video/out/gpu/hwdec.c
parentd050e350fee8b3bef3f77e9c161bf35aea8faa2e (diff)
downloadmpv-064059e6c36329e1b1fd567d0efdfbaf13ec53c4.tar.bz2
mpv-064059e6c36329e1b1fd567d0efdfbaf13ec53c4.tar.xz
vo_gpu/hwdec: rename and introduce legacy names for some interops
We've had some annoying names for interops, which we can't simply rename because that would break config files and command lines. So we need to put a little more effort in and add a concept of legacy names that allow us to continue loading them, but with a warning. The two I'm renaming here are: * vaapi-egl -> vaapi (vaapi works with Vulkan too) * drmprime-drm -> drmprime-overlay (actually describes what it does) * cuda-nvdec -> cuda (cuda interop is not nvdec specific)
Diffstat (limited to 'video/out/gpu/hwdec.c')
-rw-r--r--video/out/gpu/hwdec.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/video/out/gpu/hwdec.c b/video/out/gpu/hwdec.c
index 8bc60b502c..6fe6a69f4f 100644
--- a/video/out/gpu/hwdec.c
+++ b/video/out/gpu/hwdec.c
@@ -25,7 +25,7 @@
#include "options/m_config.h"
#include "hwdec.h"
-extern const struct ra_hwdec_driver ra_hwdec_vaegl;
+extern const struct ra_hwdec_driver ra_hwdec_vaapi;
extern const struct ra_hwdec_driver ra_hwdec_videotoolbox;
extern const struct ra_hwdec_driver ra_hwdec_vdpau;
extern const struct ra_hwdec_driver ra_hwdec_dxva2egl;
@@ -36,12 +36,12 @@ extern const struct ra_hwdec_driver ra_hwdec_dxva2dxgi;
extern const struct ra_hwdec_driver ra_hwdec_cuda;
extern const struct ra_hwdec_driver ra_hwdec_rpi_overlay;
extern const struct ra_hwdec_driver ra_hwdec_drmprime;
-extern const struct ra_hwdec_driver ra_hwdec_drmprime_drm;
+extern const struct ra_hwdec_driver ra_hwdec_drmprime_overlay;
extern const struct ra_hwdec_driver ra_hwdec_aimagereader;
const struct ra_hwdec_driver *const ra_hwdec_drivers[] = {
#if HAVE_VAAPI_EGL || HAVE_VAAPI_LIBPLACEBO
- &ra_hwdec_vaegl,
+ &ra_hwdec_vaapi,
#endif
#if HAVE_VIDEOTOOLBOX_GL || HAVE_IOS_GL
&ra_hwdec_videotoolbox,
@@ -73,7 +73,7 @@ const struct ra_hwdec_driver *const ra_hwdec_drivers[] = {
&ra_hwdec_rpi_overlay,
#endif
#if HAVE_DRM
- &ra_hwdec_drmprime_drm,
+ &ra_hwdec_drmprime_overlay,
&ra_hwdec_drmprime,
#endif
#if HAVE_ANDROID_MEDIA_NDK
@@ -189,6 +189,8 @@ static int ra_hwdec_validate_opt_full(struct mp_log *log, bool include_modes,
mp_info(log, " %s\n", drv->name);
} else if (bstr_equals0(param, drv->name)) {
return 1;
+ } else if (bstr_equals0(param, drv->legacy_name)) {
+ return 1;
}
}
if (help) {
@@ -279,6 +281,12 @@ void ra_hwdec_ctx_init(struct ra_hwdec_ctx *ctx, struct mp_hwdec_devices *devs,
if (strcmp(type, drv->name) == 0) {
load_add_hwdec(ctx, devs, drv, false);
break;
+ } else if (strcmp(type, drv->legacy_name) == 0) {
+ MP_WARN(ctx, "gpu-hwdec-interop was selected with the legacy name '%s'. "
+ "Please change it to '%s' in your config file or command line.\n",
+ drv->legacy_name, drv->name);
+ load_add_hwdec(ctx, devs, drv, false);
+ break;
}
}
}