summaryrefslogtreecommitdiffstats
path: root/video/hwdec.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-12-01 08:01:08 +0100
committerwm4 <wm4@nowhere>2017-12-01 08:05:16 +0100
commita0d9e15342ad48f51841d4fbfe3ae47e10e45592 (patch)
treee08465a5e54136e55ab2a35b2382fb9d8d06d634 /video/hwdec.c
parentafd5f3227ec38fea70bf7abfcd107a9493aa21fc (diff)
downloadmpv-a0d9e15342ad48f51841d4fbfe3ae47e10e45592.tar.bz2
mpv-a0d9e15342ad48f51841d4fbfe3ae47e10e45592.tar.xz
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.
Diffstat (limited to 'video/hwdec.c')
-rw-r--r--video/hwdec.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/video/hwdec.c b/video/hwdec.c
index 31df1522ce..04f7d46d9a 100644
--- a/video/hwdec.c
+++ b/video/hwdec.c
@@ -107,14 +107,19 @@ 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,
};