summaryrefslogtreecommitdiffstats
path: root/video/hwdec.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/hwdec.h')
-rw-r--r--video/hwdec.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/hwdec.h b/video/hwdec.h
index 149cd81bae..a7d2cf8c4b 100644
--- a/video/hwdec.h
+++ b/video/hwdec.h
@@ -9,6 +9,15 @@ struct mp_hwdec_ctx {
// API-specific, not needed by all backends.
struct mp_vdpau_ctx *vdpau_ctx;
struct mp_vaapi_ctx *vaapi_ctx;
+
+ // Optional.
+ // Allocates a software image from the pool, downloads the hw image from
+ // mpi, and returns it.
+ // pool can be NULL (then just use straight allocation).
+ // Return NULL on error or if mpi has the wrong format.
+ struct mp_image *(*download_image)(struct mp_hwdec_ctx *ctx,
+ struct mp_image *mpi,
+ struct mp_image_pool *swpool);
};
// Used to communicate hardware decoder API handles from VO to video decoder.