summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Scally <dan.scally@ideasonboard.com>2023-01-16 07:58:12 +0000
committerDaniel Scally <dan.scally@ideasonboard.com>2023-01-16 13:10:03 +0000
commit006aa232ac92e3ccde06a3b1536d6e02e8496766 (patch)
tree200d7bb51f485d4a7c084f3fd587fdc0d8a1328f /include
parent66f0f93b78474109aa946ec5cd429d0d13d052f0 (diff)
libcamera: Add new libcamera source
Provide the integration of a libcamera source within uvc-gadget. This adds C++ support to the project and adds libcamera as an optional external dependency. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/uvcgadget/libcamera-source.h29
-rw-r--r--include/uvcgadget/meson.build1
2 files changed, 30 insertions, 0 deletions
diff --git a/include/uvcgadget/libcamera-source.h b/include/uvcgadget/libcamera-source.h
new file mode 100644
index 0000000..8e08dcd
--- /dev/null
+++ b/include/uvcgadget/libcamera-source.h
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * libcamera video source
+ *
+ * Copyright (C) 2022 Ideas on Board Oy.
+ * Copyright (C) 2022 Kieran Bingham
+ *
+ * Contact: Kieran Bingham <kieran.bingham@ideasonboard.com>
+ */
+#ifndef __LIBCAMERA_SOURCE_H__
+#define __LIBCAMERA_SOURCE_H__
+
+#include "video-source.h"
+
+struct events;
+struct video_source;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct video_source *libcamera_source_create(const char *devname);
+void libcamera_source_init(struct video_source *src, struct events *events);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif /* __LIBCAMERA_SOURCE_H__ */
diff --git a/include/uvcgadget/meson.build b/include/uvcgadget/meson.build
index d5aaf17..a9e4384 100644
--- a/include/uvcgadget/meson.build
+++ b/include/uvcgadget/meson.build
@@ -3,6 +3,7 @@
uvcgadget_public_headers = files([
'configfs.h',
'events.h',
+ 'libcamera-source.h',
'list.h',
'stream.h',
'timer.h',