From 292724538cfbe2a6c713420f8b5be0abf75ad46c Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 2 Dec 2017 04:33:43 +0100 Subject: video: remove some more hwdec legacy stuff Finally get rid of all the HWDEC_* things, and instead rely on the libavutil equivalents. vdpau still uses a shitty hack, but fuck the vdpau code. Remove all the now unneeded remains. The vdpau preemption thing was not unused anymore; if someone cares this could probably be restored. --- video/filter/vf_vdpaupp.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'video/filter/vf_vdpaupp.c') diff --git a/video/filter/vf_vdpaupp.c b/video/filter/vf_vdpaupp.c index a583e386f2..de1979cf05 100644 --- a/video/filter/vf_vdpaupp.c +++ b/video/filter/vf_vdpaupp.c @@ -21,6 +21,8 @@ #include #include +#include + #include "common/common.h" #include "common/msg.h" #include "options/m_option.h" @@ -166,6 +168,9 @@ static int vf_open(vf_instance_t *vf) { struct vf_priv_s *p = vf->priv; + if (!vf->hwdec_devs) + return 0; + vf->reconfig = reconfig; vf->filter_ext = filter_ext; vf->filter_out = filter_out; @@ -175,9 +180,15 @@ static int vf_open(vf_instance_t *vf) p->queue = mp_refqueue_alloc(); - p->ctx = hwdec_devices_load(vf->hwdec_devs, HWDEC_VDPAU); - if (!p->ctx) + hwdec_devices_request_all(vf->hwdec_devs); + AVBufferRef *ref = + hwdec_devices_get_lavc(vf->hwdec_devs, AV_HWDEVICE_TYPE_VDPAU); + struct mp_vdpau_ctx *ctx = mp_vdpau_get_ctx_from_av(ref); + av_buffer_unref(&ref); + if (!ctx) { + uninit(vf); return 0; + } p->def_deintmode = p->opts.deint; if (!p->deint_enabled) -- cgit v1.2.3