Skip to content

Commit faae10e

Browse files
ngphibangdanieldegrasse
authored andcommitted
drivers: video: Add index field to video buffer
Introduce an index field to the video buffer structure to help track individual buffers throughout the workflow. This is particularly useful in scenarios where buffers are wrapped in a pool, such as in GStreamer. The index allows efficient identification of the currently dequeued buffer without needing to iterate through the entire pool and compare buffer addresses. Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
1 parent efe7677 commit faae10e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/zephyr/drivers/video.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ struct video_buffer {
149149
void *driver_data;
150150
/** pointer to the start of the buffer. */
151151
uint8_t *buffer;
152+
/** index of the buffer, optionally set by the application */
153+
uint8_t index;
152154
/** size of the buffer in bytes. */
153155
uint32_t size;
154156
/** number of bytes occupied by the valid data in the buffer. */

0 commit comments

Comments
 (0)