From a0d9e15342ad48f51841d4fbfe3ae47e10e45592 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 1 Dec 2017 08:01:08 +0100 Subject: video: refactor hw device creation for hwdec copy modes Lots of shit code for nothing. We probably could just use libavutil's code for all of this. But for now go with this, since it tends to prevent stupid terminal messages during probing (libavutil has no mechanism to selectively suppress errors specifically during probing). Ignores the "emulated" API flag (for avoiding vaapi/vdpau wrappers), but it doesn't matter that much for -copy anyway. --- video/hwdec.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'video/hwdec.c') diff --git a/video/hwdec.c b/video/hwdec.c index 31df1522ce..04f7d46d9a 100644 --- a/video/hwdec.c +++ b/video/hwdec.c @@ -107,13 +107,18 @@ char *hwdec_devices_get_names(struct mp_hwdec_devices *devs) return res; } -#if HAVE_D3D_HWACCEL -extern const struct hwcontext_fns hwcontext_fns_d3d11; -#endif - static const struct hwcontext_fns *const hwcontext_fns[] = { #if HAVE_D3D_HWACCEL &hwcontext_fns_d3d11, +#endif +#if HAVE_D3D9_HWACCEL + &hwcontext_fns_dxva2, +#endif +#if HAVE_VAAPI + &hwcontext_fns_vaapi, +#endif +#if HAVE_VDPAU + &hwcontext_fns_vdpau, #endif NULL, }; -- cgit v1.2.3