summaryrefslogtreecommitdiff
path: root/lib/libcamera-source.cpp
diff options
context:
space:
mode:
authorDaniel Scally <dan.scally@ideasonboard.com>2023-01-10 11:58:04 +0000
committerDaniel Scally <dan.scally@ideasonboard.com>2023-01-16 13:10:16 +0000
commit4d9897c5aa5376f89e0d5ed1534536f680939e0d (patch)
tree9d2f1ecb449d218849831279f776121e987bd755 /lib/libcamera-source.cpp
parent3f6aee6a13233e9ffcbb133ab9490aead7e2ced3 (diff)
lib: Add video_source_type enumeration
Add an enum to struct video_source that details the type of source we're dealing with. This will be used to make decisions about buffer allocation and handling in a more explicit way. Use the video_source_type associated with a video_source to decide on the appropriate allocation function and buffer handler at stream on time. This is a more explicit method than relying on the presence of the .alloc_buffers op and allows more flexibility. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Diffstat (limited to 'lib/libcamera-source.cpp')
-rw-r--r--lib/libcamera-source.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libcamera-source.cpp b/lib/libcamera-source.cpp
index c53c915..7b4e212 100644
--- a/lib/libcamera-source.cpp
+++ b/lib/libcamera-source.cpp
@@ -390,6 +390,7 @@ struct video_source *libcamera_source_create(const char *devname)
}
src->src.ops = &libcamera_source_ops;
+ src->src.type = VIDEO_SOURCE_DMABUF;
src->cm = std::make_unique<CameraManager>();
src->cm->start();