summaryrefslogtreecommitdiff
path: root/lib/video-source.c
diff options
context:
space:
mode:
authorDaniel Scally <dan.scally@ideasonboard.com>2023-01-13 16:27:10 +0000
committerDaniel Scally <dan.scally@ideasonboard.com>2023-01-16 13:10:16 +0000
commitafd7ad5f9dbef7f31162b9a49b9f85c0a309a3a0 (patch)
tree23899ca2c135c2245ef3f6821227bb7bfad8923e /lib/video-source.c
parent4d9897c5aa5376f89e0d5ed1534536f680939e0d (diff)
lib/video-source: Add video_source_import_buffers
We need to be able to place encoded data into the sink device's bufs. To facilitate that add a video_source operation that allows the source to import buffers from the sink. Add a .import_buffers() callback so that the libcamera-source can access a sink's buffers. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Diffstat (limited to 'lib/video-source.c')
-rw-r--r--lib/video-source.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/video-source.c b/lib/video-source.c
index 17f008a..78020f2 100644
--- a/lib/video-source.c
+++ b/lib/video-source.c
@@ -45,6 +45,12 @@ int video_source_export_buffers(struct video_source *src,
return src->ops->export_buffers(src, buffers);
}
+int video_source_import_buffers(struct video_source *src,
+ struct video_buffer_set *buffers)
+{
+ return src->ops->import_buffers(src, buffers);
+}
+
int video_source_free_buffers(struct video_source *src)
{
return src->ops->free_buffers(src);