diff options
author | wm4 <wm4@nowhere> | 2016-04-25 12:09:09 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-25 12:23:38 +0200 |
commit | 7e3d8e7134096972989c8fae636e29af10ccaa79 (patch) | |
tree | 0be0b873878a87e3656dead0dca3bcd01885c201 /video/decode/vd_lavc.c | |
parent | 46e49a37be8b2a8e48eb3143f9d6e7cc07de82e4 (diff) | |
download | mpv-7e3d8e7134096972989c8fae636e29af10ccaa79.tar.bz2 mpv-7e3d8e7134096972989c8fae636e29af10ccaa79.tar.xz |
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.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 14 |
1 files changed, 12 insertions, 2 deletions
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 |