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/hwdec.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'video/hwdec.c') diff --git a/video/hwdec.c b/video/hwdec.c index 79714f60e0..b52b082a38 100644 --- a/video/hwdec.c +++ b/video/hwdec.c @@ -34,21 +34,6 @@ void hwdec_devices_destroy(struct mp_hwdec_devices *devs) talloc_free(devs); } -struct mp_hwdec_ctx *hwdec_devices_get(struct mp_hwdec_devices *devs, - enum hwdec_type type) -{ - struct mp_hwdec_ctx *res = NULL; - pthread_mutex_lock(&devs->lock); - for (int n = 0; n < devs->num_hwctxs; n++) { - if (type && devs->hwctxs[n]->type == type) { - res = devs->hwctxs[n]; - break; - } - } - pthread_mutex_unlock(&devs->lock); - return res; -} - struct AVBufferRef *hwdec_devices_get_lavc(struct mp_hwdec_devices *devs, int av_hwdevice_type) { @@ -109,15 +94,6 @@ void hwdec_devices_request_all(struct mp_hwdec_devices *devs) devs->load_api(devs->load_api_ctx); } -void *hwdec_devices_load(struct mp_hwdec_devices *devs, enum hwdec_type type) -{ - if (!devs) - return NULL; - hwdec_devices_request_all(devs); - struct mp_hwdec_ctx *hwctx = hwdec_devices_get(devs, type); - return hwctx ? hwctx->ctx : NULL; -} - char *hwdec_devices_get_names(struct mp_hwdec_devices *devs) { char *res = NULL; -- cgit v1.2.3