summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-06-25 00:09:15 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-06-25 16:11:03 +0100
commit6410d1d37c1ea9d1d168840a7ba063facb0bc9d6 (patch)
treed23c636895d51df3b4b6fe128f322132203a3a26
parentcbdc93e9d1666010d49e06940158a37c61cc6fa7 (diff)
libcamera/base: Move class helpers to the base library
Move the class support infrastructure to the base library. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--include/libcamera/base/class.h (renamed from include/libcamera/class.h)6
-rw-r--r--include/libcamera/base/meson.build1
-rw-r--r--include/libcamera/buffer.h3
-rw-r--r--include/libcamera/camera.h3
-rw-r--r--include/libcamera/camera_manager.h3
-rw-r--r--include/libcamera/controls.h3
-rw-r--r--include/libcamera/framebuffer_allocator.h2
-rw-r--r--include/libcamera/internal/buffer.h3
-rw-r--r--include/libcamera/internal/byte_stream_buffer.h3
-rw-r--r--include/libcamera/internal/camera_sensor.h3
-rw-r--r--include/libcamera/internal/file.h3
-rw-r--r--include/libcamera/internal/log.h3
-rw-r--r--include/libcamera/internal/media_object.h2
-rw-r--r--include/libcamera/internal/pipeline_handler.h3
-rw-r--r--include/libcamera/internal/v4l2_subdevice.h3
-rw-r--r--include/libcamera/internal/v4l2_videodevice.h3
-rw-r--r--include/libcamera/meson.build1
-rw-r--r--include/libcamera/request.h3
-rw-r--r--src/android/camera_buffer.h3
-rw-r--r--src/android/camera_capabilities.h3
-rw-r--r--src/android/camera_hal_config.h2
-rw-r--r--src/libcamera/base/class.cpp (renamed from src/libcamera/class.cpp)2
-rw-r--r--src/libcamera/base/meson.build1
-rw-r--r--src/libcamera/meson.build1
24 files changed, 38 insertions, 25 deletions
diff --git a/include/libcamera/class.h b/include/libcamera/base/class.h
index f384a488..a07dac05 100644
--- a/include/libcamera/class.h
+++ b/include/libcamera/base/class.h
@@ -4,8 +4,8 @@
*
* class.h - Utilities and helpers for classes
*/
-#ifndef __LIBCAMERA_CLASS_H__
-#define __LIBCAMERA_CLASS_H__
+#ifndef __LIBCAMERA_BASE_CLASS_H__
+#define __LIBCAMERA_BASE_CLASS_H__
#include <memory>
@@ -102,4 +102,4 @@ private:
} /* namespace libcamera */
-#endif /* __LIBCAMERA_CLASS_H__ */
+#endif /* __LIBCAMERA_BASE_CLASS_H__ */
diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
index 9f0ba6b0..2db756c5 100644
--- a/include/libcamera/base/meson.build
+++ b/include/libcamera/base/meson.build
@@ -3,6 +3,7 @@
libcamera_base_include_dir = libcamera_include_dir / 'base'
libcamera_base_headers = files([
+ 'class.h',
'utils.h',
])
diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h
index e0af0090..323d1cba 100644
--- a/include/libcamera/buffer.h
+++ b/include/libcamera/buffer.h
@@ -10,7 +10,8 @@
#include <stdint.h>
#include <vector>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/file_descriptor.h>
namespace libcamera {
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
index d7164180..ea091400 100644
--- a/include/libcamera/camera.h
+++ b/include/libcamera/camera.h
@@ -12,7 +12,8 @@
#include <stdint.h>
#include <string>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/controls.h>
#include <libcamera/object.h>
#include <libcamera/request.h>
diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h
index c2f0b786..5deede03 100644
--- a/include/libcamera/camera_manager.h
+++ b/include/libcamera/camera_manager.h
@@ -12,7 +12,8 @@
#include <sys/types.h>
#include <vector>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/object.h>
#include <libcamera/signal.h>
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index 1c9b37e6..f62b6cf0 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -14,7 +14,8 @@
#include <unordered_map>
#include <vector>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/geometry.h>
#include <libcamera/span.h>
diff --git a/include/libcamera/framebuffer_allocator.h b/include/libcamera/framebuffer_allocator.h
index 0c85631a..cbc9ce10 100644
--- a/include/libcamera/framebuffer_allocator.h
+++ b/include/libcamera/framebuffer_allocator.h
@@ -11,7 +11,7 @@
#include <memory>
#include <vector>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
namespace libcamera {
diff --git a/include/libcamera/internal/buffer.h b/include/libcamera/internal/buffer.h
index 9da1fbd1..91dd2496 100644
--- a/include/libcamera/internal/buffer.h
+++ b/include/libcamera/internal/buffer.h
@@ -10,7 +10,8 @@
#include <sys/mman.h>
#include <vector>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/buffer.h>
#include <libcamera/span.h>
diff --git a/include/libcamera/internal/byte_stream_buffer.h b/include/libcamera/internal/byte_stream_buffer.h
index 866cb9b0..7eefb1a7 100644
--- a/include/libcamera/internal/byte_stream_buffer.h
+++ b/include/libcamera/internal/byte_stream_buffer.h
@@ -11,7 +11,8 @@
#include <stdint.h>
#include <type_traits>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/span.h>
namespace libcamera {
diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h
index e133ebf4..7bc54061 100644
--- a/include/libcamera/internal/camera_sensor.h
+++ b/include/libcamera/internal/camera_sensor.h
@@ -11,7 +11,8 @@
#include <string>
#include <vector>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/controls.h>
#include <libcamera/geometry.h>
#include <libcamera/ipa/core_ipa_interface.h>
diff --git a/include/libcamera/internal/file.h b/include/libcamera/internal/file.h
index f0b313a5..44621ceb 100644
--- a/include/libcamera/internal/file.h
+++ b/include/libcamera/internal/file.h
@@ -11,7 +11,8 @@
#include <string>
#include <sys/types.h>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/span.h>
namespace libcamera {
diff --git a/include/libcamera/internal/log.h b/include/libcamera/internal/log.h
index 9c2beab6..82e55a62 100644
--- a/include/libcamera/internal/log.h
+++ b/include/libcamera/internal/log.h
@@ -10,8 +10,7 @@
#include <chrono>
#include <sstream>
-#include <libcamera/class.h>
-
+#include <libcamera/base/class.h>
#include <libcamera/base/utils.h>
namespace libcamera {
diff --git a/include/libcamera/internal/media_object.h b/include/libcamera/internal/media_object.h
index 1c82c279..2f5d33e1 100644
--- a/include/libcamera/internal/media_object.h
+++ b/include/libcamera/internal/media_object.h
@@ -12,7 +12,7 @@
#include <linux/media.h>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
namespace libcamera {
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index 31dadf28..8beb6b76 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -15,7 +15,8 @@
#include <sys/types.h>
#include <vector>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/controls.h>
#include <libcamera/object.h>
#include <libcamera/stream.h>
diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h
index d2b9ca55..d07dd6b4 100644
--- a/include/libcamera/internal/v4l2_subdevice.h
+++ b/include/libcamera/internal/v4l2_subdevice.h
@@ -11,7 +11,8 @@
#include <string>
#include <vector>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/geometry.h>
#include "libcamera/internal/formats.h"
diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
index 7938343b..227d015e 100644
--- a/include/libcamera/internal/v4l2_videodevice.h
+++ b/include/libcamera/internal/v4l2_videodevice.h
@@ -16,8 +16,9 @@
#include <linux/videodev2.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/buffer.h>
-#include <libcamera/class.h>
#include <libcamera/geometry.h>
#include <libcamera/pixel_format.h>
#include <libcamera/signal.h>
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index 4ac864b7..21a43388 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -5,7 +5,6 @@ libcamera_public_headers = files([
'buffer.h',
'camera.h',
'camera_manager.h',
- 'class.h',
'compiler.h',
'controls.h',
'file_descriptor.h',
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index 5596901d..00c646fe 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -13,7 +13,8 @@
#include <string>
#include <unordered_set>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/controls.h>
#include <libcamera/signal.h>
diff --git a/src/android/camera_buffer.h b/src/android/camera_buffer.h
index c88124b2..e850c4e3 100644
--- a/src/android/camera_buffer.h
+++ b/src/android/camera_buffer.h
@@ -9,7 +9,8 @@
#include <hardware/camera3.h>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/span.h>
class CameraBuffer final : public libcamera::Extensible
diff --git a/src/android/camera_capabilities.h b/src/android/camera_capabilities.h
index f511607b..4f5be825 100644
--- a/src/android/camera_capabilities.h
+++ b/src/android/camera_capabilities.h
@@ -11,8 +11,9 @@
#include <memory>
#include <vector>
+#include <libcamera/base/class.h>
+
#include <libcamera/camera.h>
-#include <libcamera/class.h>
#include <libcamera/formats.h>
#include <libcamera/geometry.h>
diff --git a/src/android/camera_hal_config.h b/src/android/camera_hal_config.h
index 97dc69c1..a79d5d6c 100644
--- a/src/android/camera_hal_config.h
+++ b/src/android/camera_hal_config.h
@@ -10,7 +10,7 @@
#include <map>
#include <string>
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
struct CameraConfigData {
int facing = -1;
diff --git a/src/libcamera/class.cpp b/src/libcamera/base/class.cpp
index 28c35633..165beafc 100644
--- a/src/libcamera/class.cpp
+++ b/src/libcamera/base/class.cpp
@@ -5,7 +5,7 @@
* class.cpp - Utilities and helpers for classes
*/
-#include <libcamera/class.h>
+#include <libcamera/base/class.h>
/**
* \file class.h
diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
index 6d9ec374..302a2886 100644
--- a/src/libcamera/base/meson.build
+++ b/src/libcamera/base/meson.build
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: CC0-1.0
libcamera_base_sources = files([
+ 'class.cpp',
'utils.cpp',
])
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index b70688d8..e1252ce4 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -10,7 +10,6 @@ libcamera_sources = files([
'camera_manager.cpp',
'camera_sensor.cpp',
'camera_sensor_properties.cpp',
- 'class.cpp',
'controls.cpp',
'control_serializer.cpp',
'control_validator.cpp',