aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hwaccel_internal.h
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2025-03-13 16:26:40 +0000
committerLynne <dev@lynne.ee>2025-03-17 08:51:23 +0100
commitcaff29dbb18feeb87cb00fc4c33d20cf01667be0 (patch)
treee99f15bb25ccf6961daf31ca082ed17320085c2f /libavcodec/hwaccel_internal.h
parent23eb499b282ab1952461872ddea008adc7f95413 (diff)
downloadffmpeg-caff29dbb18feeb87cb00fc4c33d20cf01667be0.tar.gz
FFHWAccel: add buffer_ref argument to start_frame
This commit adds a reference to the buffer as an argument to start_frame, and adapts all existing code. This allows for asynchronous hardware accelerators to skip copying packet data by referencing it.
Diffstat (limited to 'libavcodec/hwaccel_internal.h')
-rw-r--r--libavcodec/hwaccel_internal.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/hwaccel_internal.h b/libavcodec/hwaccel_internal.h
index 77df4e0904..7224406815 100644
--- a/libavcodec/hwaccel_internal.h
+++ b/libavcodec/hwaccel_internal.h
@@ -52,11 +52,13 @@ typedef struct FFHWAccel {
* Otherwise, this means the whole frame is available at this point.
*
* @param avctx the codec context
+ * @param buf_ref the frame data buffer reference (optional)
* @param buf the frame data buffer base
* @param buf_size the size of the frame in bytes
* @return zero if successful, a negative value otherwise
*/
- int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
+ int (*start_frame)(AVCodecContext *avctx, const AVBufferRef *buf_ref,
+ const uint8_t *buf, uint32_t buf_size);
/**
* Callback for parameter data (SPS/PPS/VPS etc).