From 6fe259939e375ed8e8bd604e93cabbf664a20de5 Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Tue, 22 Nov 2022 10:54:51 +0000 Subject: video-source: add fill_buffer We are preparing to allow video sources whose data is generated in userspace. To this end, add a fill_buffer function to video_source. Reviewed-by: Daniel Scally Reviewed-by: Kieran Bingham Signed-off-by: Paul Elder Signed-off-by: Kieran Bingham --- include/uvcgadget/video-source.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/uvcgadget') diff --git a/include/uvcgadget/video-source.h b/include/uvcgadget/video-source.h index 60f7ddd..b1a3cf4 100644 --- a/include/uvcgadget/video-source.h +++ b/include/uvcgadget/video-source.h @@ -26,6 +26,7 @@ struct video_source_ops { int(*stream_on)(struct video_source *src); int(*stream_off)(struct video_source *src); int(*queue_buffer)(struct video_source *src, struct video_buffer *buf); + void(*fill_buffer)(struct video_source *src, struct video_buffer *buf); }; typedef void(*video_source_buffer_handler_t)(void *, struct video_source *, @@ -53,5 +54,7 @@ int video_source_stream_on(struct video_source *src); int video_source_stream_off(struct video_source *src); int video_source_queue_buffer(struct video_source *src, struct video_buffer *buf); +void video_source_fill_buffer(struct video_source *src, + struct video_buffer *buf); #endif /* __VIDEO_SOURCE_H__ */ -- cgit v1.2.3