diff options
author | wm4 <wm4@nowhere> | 2017-10-31 15:18:57 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-10-31 15:20:09 +0100 |
commit | 7fd1359fcf72f28eb7bc24392f50f1fdbd75b956 (patch) | |
tree | 9230dbb69afdaa531bedaa0b72bcd1e5db9bee3c /video/decode/vd_lavc.c | |
parent | e0f42bdc5d7208a7aebc4e0f75a4f4ba18ed49f2 (diff) | |
download | mpv-7fd1359fcf72f28eb7bc24392f50f1fdbd75b956.tar.bz2 mpv-7fd1359fcf72f28eb7bc24392f50f1fdbd75b956.tar.xz |
videotoolbox: use generic code for dummy hwdevice init
And move the remaining code (just 2 struct constant definitions) to
vd_lavc.c.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index e3b5018d7c..3b22159f2b 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -126,8 +126,6 @@ const struct m_sub_options vd_lavc_conf = { extern const struct vd_lavc_hwdec mp_vd_lavc_mediacodec; extern const struct vd_lavc_hwdec mp_vd_lavc_mediacodec_copy; -extern const struct vd_lavc_hwdec mp_vd_lavc_videotoolbox; -extern const struct vd_lavc_hwdec mp_vd_lavc_videotoolbox_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; @@ -251,6 +249,25 @@ static const struct vd_lavc_hwdec mp_vd_lavc_vdpau_copy = { }; #endif +#if HAVE_VIDEOTOOLBOX_HWACCEL +static const struct vd_lavc_hwdec mp_vd_lavc_videotoolbox = { + .type = HWDEC_VIDEOTOOLBOX, + .image_format = IMGFMT_VIDEOTOOLBOX, + .generic_hwaccel = true, + .set_hwframes = true, +}; +static const struct vd_lavc_hwdec mp_vd_lavc_videotoolbox_copy = { + .type = HWDEC_VIDEOTOOLBOX_COPY, + .copying = true, + .image_format = IMGFMT_VIDEOTOOLBOX, + .generic_hwaccel = true, + .create_standalone_dev = true, + .create_standalone_dev_type = AV_HWDEVICE_TYPE_VIDEOTOOLBOX, + .set_hwframes = true, + .delay_queue = HWDEC_DELAY_QUEUE_COUNT, +}; +#endif + static const struct vd_lavc_hwdec *const hwdec_list[] = { #if HAVE_RPI &mp_vd_lavc_rpi, |