summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r--video/decode/vd_lavc.c21
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,