summaryrefslogtreecommitdiffstats
path: root/video/decode/lavc.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-04-07 18:26:58 +0200
committerwm4 <wm4@nowhere>2016-04-07 18:47:32 +0200
commit8a67606c20958fa21db0b5ba9a17f379bc01786c (patch)
treebd571e5bad63320ae7aaa25ba23309ac2dc2957b /video/decode/lavc.h
parentf009d16f362694b6f49571b76f8b0331966824b5 (diff)
downloadmpv-8a67606c20958fa21db0b5ba9a17f379bc01786c.tar.bz2
mpv-8a67606c20958fa21db0b5ba9a17f379bc01786c.tar.xz
vd_lavc: let hardware decoder request delaying frames explicitly
Until now, the presence of the process_image() callback was used to set a delay queue with a hardcoded size. Change this to a vd_lavc_hwdec field instead, so the decoder can explicitly set this if it's really needed. Do this so process_image() can be used in the VideoToolbox glue code for something entirely unrelated.
Diffstat (limited to 'video/decode/lavc.h')
-rw-r--r--video/decode/lavc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/decode/lavc.h b/video/decode/lavc.h
index 44c5c27a0f..826edbff83 100644
--- a/video/decode/lavc.h
+++ b/video/decode/lavc.h
@@ -49,6 +49,11 @@ struct vd_lavc_hwdec {
// If not-0: the IMGFMT_ format that should be accepted in the libavcodec
// get_format callback.
int image_format;
+ // Setting this will queue the given number of frames before calling
+ // process_image() or returning them to the renderer. This can increase
+ // efficiency by not blocking on the hardware pipeline by reading back
+ // immediately after decoding.
+ int delay_queue;
int (*probe)(struct vd_lavc_hwdec *hwdec, struct mp_hwdec_info *info,
const char *codec);
int (*init)(struct lavc_ctx *ctx);