From 7e3d8e7134096972989c8fae636e29af10ccaa79 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 25 Apr 2016 12:09:09 +0200 Subject: vd_lavc: simplify RPI and Mediacodec wrappers Use the recently added lavc_suffix mechanism to select the wrapper decoder. With all hwdec callbacks being optional, and RPI/Mediacodec having only dummy callbacks, all the callbacks can be removed as well. The result is that the vd_lavc_hwdec struct for both of them is tiny. It's better to move them to vd_lavc.c directly, because they are so trivial and small. --- video/decode/vd_lavc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'video/decode/vd_lavc.c') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index dc8c896aa5..24c98f2ef1 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -127,8 +127,18 @@ extern const struct vd_lavc_hwdec mp_vd_lavc_vaapi_copy; extern const struct vd_lavc_hwdec mp_vd_lavc_dxva2; extern const struct vd_lavc_hwdec mp_vd_lavc_dxva2_copy; extern const struct vd_lavc_hwdec mp_vd_lavc_d3d11va_copy; -extern const struct vd_lavc_hwdec mp_vd_lavc_rpi; -extern const struct vd_lavc_hwdec mp_vd_lavc_mediacodec; + +static const struct vd_lavc_hwdec mp_vd_lavc_rpi = { + .type = HWDEC_RPI, + .lavc_suffix = "_mmal", + .image_format = IMGFMT_MMAL, +}; + +static const struct vd_lavc_hwdec mp_vd_lavc_mediacodec = { + .type = HWDEC_MEDIACODEC, + .lavc_suffix = "_mediacodec", + .image_format = IMGFMT_NV12, +}; static const struct vd_lavc_hwdec *const hwdec_list[] = { #if HAVE_RPI -- cgit v1.2.3