summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-06-15 16:15:12 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-06-25 16:11:08 +0100
commit27aff949fbc1b9aabfc594bbfd6f94be55a086ec (patch)
tree9ddbc2462a685a6db3ed33f09ed7a493376439d6 /src
parent6410d1d37c1ea9d1d168840a7ba063facb0bc9d6 (diff)
libcamera/base: Move extended base functionality
Move the functionality for the following components to the new base support library: - BoundMethod - EventDispatcher - EventDispatcherPoll - Log - Message - Object - Signal - Semaphore - Thread - Timer While it would be preferable to see these split to move one component per commit, these components are all interdependent upon each other, which leaves us with one big change performing the move for all of them. Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/android/camera3_hal.cpp2
-rw-r--r--src/android/camera_capabilities.cpp3
-rw-r--r--src/android/camera_device.cpp9
-rw-r--r--src/android/camera_device.h7
-rw-r--r--src/android/camera_hal_config.cpp2
-rw-r--r--src/android/camera_hal_manager.cpp4
-rw-r--r--src/android/camera_metadata.cpp2
-rw-r--r--src/android/camera_worker.h6
-rw-r--r--src/android/jpeg/encoder_libjpeg.cpp3
-rw-r--r--src/android/jpeg/exif.cpp3
-rw-r--r--src/android/jpeg/post_processor_jpeg.cpp4
-rw-r--r--src/android/jpeg/thumbnailer.cpp4
-rw-r--r--src/android/mm/cros_camera_buffer.cpp2
-rw-r--r--src/android/mm/generic_camera_buffer.cpp3
-rw-r--r--src/android/yuv/post_processor_yuv.cpp3
-rw-r--r--src/ipa/ipu3/ipu3.cpp3
-rw-r--r--src/ipa/ipu3/ipu3_agc.cpp4
-rw-r--r--src/ipa/ipu3/ipu3_awb.cpp2
-rw-r--r--src/ipa/libipa/histogram.cpp2
-rw-r--r--src/ipa/raspberrypi/cam_helper.hpp4
-rw-r--r--src/ipa/raspberrypi/controller/controller.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/agc.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/alsc.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/awb.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/black_level.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/ccm.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/contrast.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/dpc.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/focus.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/geq.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/lux.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/noise.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/sdn.cpp2
-rw-r--r--src/ipa/raspberrypi/controller/rpi/sharpen.cpp2
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp7
-rw-r--r--src/ipa/rkisp1/rkisp1.cpp4
-rw-r--r--src/ipa/vimc/vimc.cpp3
-rw-r--r--src/libcamera/base/bound_method.cpp (renamed from src/libcamera/bound_method.cpp)11
-rw-r--r--src/libcamera/base/event_dispatcher.cpp (renamed from src/libcamera/event_dispatcher.cpp)7
-rw-r--r--src/libcamera/base/event_dispatcher_poll.cpp (renamed from src/libcamera/event_dispatcher_poll.cpp)10
-rw-r--r--src/libcamera/base/log.cpp (renamed from src/libcamera/log.cpp)7
-rw-r--r--src/libcamera/base/meson.build11
-rw-r--r--src/libcamera/base/message.cpp (renamed from src/libcamera/message.cpp)9
-rw-r--r--src/libcamera/base/object.cpp (renamed from src/libcamera/object.cpp)16
-rw-r--r--src/libcamera/base/semaphore.cpp (renamed from src/libcamera/semaphore.cpp)6
-rw-r--r--src/libcamera/base/signal.cpp (renamed from src/libcamera/signal.cpp)6
-rw-r--r--src/libcamera/base/thread.cpp (renamed from src/libcamera/thread.cpp)12
-rw-r--r--src/libcamera/base/timer.cpp (renamed from src/libcamera/timer.cpp)15
-rw-r--r--src/libcamera/buffer.cpp2
-rw-r--r--src/libcamera/byte_stream_buffer.cpp2
-rw-r--r--src/libcamera/camera.cpp5
-rw-r--r--src/libcamera/camera_manager.cpp5
-rw-r--r--src/libcamera/camera_sensor_properties.cpp4
-rw-r--r--src/libcamera/control_serializer.cpp3
-rw-r--r--src/libcamera/controls.cpp2
-rw-r--r--src/libcamera/delayed_controls.cpp3
-rw-r--r--src/libcamera/device_enumerator.cpp3
-rw-r--r--src/libcamera/device_enumerator_sysfs.cpp3
-rw-r--r--src/libcamera/device_enumerator_udev.cpp3
-rw-r--r--src/libcamera/event_notifier.cpp6
-rw-r--r--src/libcamera/file.cpp2
-rw-r--r--src/libcamera/file_descriptor.cpp2
-rw-r--r--src/libcamera/formats.cpp4
-rw-r--r--src/libcamera/framebuffer_allocator.cpp3
-rw-r--r--src/libcamera/geometry.cpp2
-rw-r--r--src/libcamera/ipa_data_serializer.cpp2
-rw-r--r--src/libcamera/ipa_manager.cpp2
-rw-r--r--src/libcamera/ipa_module.cpp2
-rw-r--r--src/libcamera/ipa_proxy.cpp2
-rw-r--r--src/libcamera/ipc_pipe.cpp2
-rw-r--r--src/libcamera/ipc_pipe_unixsocket.cpp9
-rw-r--r--src/libcamera/ipc_unixsocket.cpp3
-rw-r--r--src/libcamera/media_device.cpp2
-rw-r--r--src/libcamera/media_object.cpp3
-rw-r--r--src/libcamera/meson.build11
-rw-r--r--src/libcamera/pipeline/ipu3/cio2.h2
-rw-r--r--src/libcamera/pipeline/ipu3/frames.h2
-rw-r--r--src/libcamera/pipeline/ipu3/imgu.cpp6
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp6
-rw-r--r--src/libcamera/pipeline/raspberrypi/dma_heaps.cpp2
-rw-r--r--src/libcamera/pipeline/raspberrypi/rpi_stream.cpp4
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp6
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1_path.h3
-rw-r--r--src/libcamera/pipeline/simple/converter.cpp8
-rw-r--r--src/libcamera/pipeline/simple/converter.h4
-rw-r--r--src/libcamera/pipeline/simple/simple.cpp3
-rw-r--r--src/libcamera/pipeline/uvcvideo/uvcvideo.cpp6
-rw-r--r--src/libcamera/pipeline/vimc/vimc.cpp14
-rw-r--r--src/libcamera/pipeline_handler.cpp6
-rw-r--r--src/libcamera/process.cpp2
-rw-r--r--src/libcamera/request.cpp3
-rw-r--r--src/libcamera/stream.cpp2
-rw-r--r--src/libcamera/sysfs.cpp3
-rw-r--r--src/libcamera/v4l2_device.cpp2
-rw-r--r--src/libcamera/v4l2_pixelformat.cpp3
-rw-r--r--src/libcamera/v4l2_subdevice.cpp2
-rw-r--r--src/libcamera/v4l2_videodevice.cpp3
-rw-r--r--src/v4l2/v4l2_camera.cpp2
-rw-r--r--src/v4l2/v4l2_camera.h4
-rw-r--r--src/v4l2/v4l2_camera_proxy.cpp4
-rw-r--r--src/v4l2/v4l2_compat_manager.cpp7
101 files changed, 220 insertions, 205 deletions
diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp
index e6d435e0..da836bae 100644
--- a/src/android/camera3_hal.cpp
+++ b/src/android/camera3_hal.cpp
@@ -7,7 +7,7 @@
#include <hardware/camera_common.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "camera_device.h"
#include "camera_hal_manager.h"
diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index 00224a6d..6b5edb66 100644
--- a/src/android/camera_capabilities.cpp
+++ b/src/android/camera_capabilities.cpp
@@ -12,12 +12,13 @@
#include <hardware/camera3.h>
+#include <libcamera/base/log.h>
+
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
#include <libcamera/property_ids.h>
#include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
using namespace libcamera;
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 6243c07e..86ea22b6 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -15,16 +15,15 @@
#include <unistd.h>
#include <vector>
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/utils.h>
+
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
#include <libcamera/formats.h>
#include <libcamera/property_ids.h>
-#include <libcamera/base/utils.h>
-
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/thread.h"
-
#include "system/graphics.h"
using namespace libcamera;
diff --git a/src/android/camera_device.h b/src/android/camera_device.h
index 090fe28a..4747f577 100644
--- a/src/android/camera_device.h
+++ b/src/android/camera_device.h
@@ -14,15 +14,16 @@
#include <hardware/camera3.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/message.h>
+#include <libcamera/base/thread.h>
+
#include <libcamera/buffer.h>
#include <libcamera/camera.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
#include "libcamera/internal/buffer.h"
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
#include "camera_capabilities.h"
#include "camera_metadata.h"
diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp
index f33ba269..d84de4fd 100644
--- a/src/android/camera_hal_config.cpp
+++ b/src/android/camera_hal_config.cpp
@@ -21,7 +21,7 @@ namespace filesystem = std::experimental::filesystem;
#include <hardware/camera3.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
using namespace libcamera;
diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
index 54087d3a..4cd67544 100644
--- a/src/android/camera_hal_manager.cpp
+++ b/src/android/camera_hal_manager.cpp
@@ -7,11 +7,11 @@
#include "camera_hal_manager.h"
+#include <libcamera/base/log.h>
+
#include <libcamera/camera.h>
#include <libcamera/property_ids.h>
-#include "libcamera/internal/log.h"
-
#include "camera_device.h"
using namespace libcamera;
diff --git a/src/android/camera_metadata.cpp b/src/android/camera_metadata.cpp
index c7298d62..3fc7cf27 100644
--- a/src/android/camera_metadata.cpp
+++ b/src/android/camera_metadata.cpp
@@ -7,7 +7,7 @@
#include "camera_metadata.h"
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
using namespace libcamera;
diff --git a/src/android/camera_worker.h b/src/android/camera_worker.h
index e289ef9b..6e1aee4a 100644
--- a/src/android/camera_worker.h
+++ b/src/android/camera_worker.h
@@ -9,14 +9,14 @@
#include <memory>
+#include <libcamera/base/object.h>
+#include <libcamera/base/thread.h>
+
#include <libcamera/buffer.h>
#include <libcamera/camera.h>
-#include <libcamera/object.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
-#include "libcamera/internal/thread.h"
-
class CameraDevice;
class CaptureRequest
diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp
index f006e1d1..e6358ca9 100644
--- a/src/android/jpeg/encoder_libjpeg.cpp
+++ b/src/android/jpeg/encoder_libjpeg.cpp
@@ -16,12 +16,13 @@
#include <unistd.h>
#include <vector>
+#include <libcamera/base/log.h>
+
#include <libcamera/camera.h>
#include <libcamera/formats.h>
#include <libcamera/pixel_format.h>
#include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
using namespace libcamera;
diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp
index 747f1cfa..0ba4cb85 100644
--- a/src/android/jpeg/exif.cpp
+++ b/src/android/jpeg/exif.cpp
@@ -14,10 +14,9 @@
#include <tuple>
#include <uchar.h>
+#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/log.h"
-
using namespace libcamera;
LOG_DEFINE_CATEGORY(EXIF)
diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp
index 058ccc99..0e93f365 100644
--- a/src/android/jpeg/post_processor_jpeg.cpp
+++ b/src/android/jpeg/post_processor_jpeg.cpp
@@ -14,9 +14,9 @@
#include "encoder_libjpeg.h"
#include "exif.h"
-#include <libcamera/formats.h>
+#include <libcamera/base/log.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/formats.h>
using namespace libcamera;
using namespace std::chrono_literals;
diff --git a/src/android/jpeg/thumbnailer.cpp b/src/android/jpeg/thumbnailer.cpp
index f709d343..5cb00744 100644
--- a/src/android/jpeg/thumbnailer.cpp
+++ b/src/android/jpeg/thumbnailer.cpp
@@ -7,9 +7,9 @@
#include "thumbnailer.h"
-#include <libcamera/formats.h>
+#include <libcamera/base/log.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/formats.h>
using namespace libcamera;
diff --git a/src/android/mm/cros_camera_buffer.cpp b/src/android/mm/cros_camera_buffer.cpp
index c4157606..0008d261 100644
--- a/src/android/mm/cros_camera_buffer.cpp
+++ b/src/android/mm/cros_camera_buffer.cpp
@@ -7,7 +7,7 @@
#include "../camera_buffer.h"
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "cros-camera/camera_buffer_manager.h"
diff --git a/src/android/mm/generic_camera_buffer.cpp b/src/android/mm/generic_camera_buffer.cpp
index cca88cf3..326fdc06 100644
--- a/src/android/mm/generic_camera_buffer.cpp
+++ b/src/android/mm/generic_camera_buffer.cpp
@@ -9,8 +9,9 @@
#include <unistd.h>
+#include <libcamera/base/log.h>
+
#include "libcamera/internal/buffer.h"
-#include "libcamera/internal/log.h"
using namespace libcamera;
diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp
index b67364c8..772e805b 100644
--- a/src/android/yuv/post_processor_yuv.cpp
+++ b/src/android/yuv/post_processor_yuv.cpp
@@ -9,12 +9,13 @@
#include <libyuv/scale.h>
+#include <libcamera/base/log.h>
+
#include <libcamera/formats.h>
#include <libcamera/geometry.h>
#include <libcamera/pixel_format.h>
#include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
using namespace libcamera;
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 8b4c7351..31a3c006 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -11,6 +11,8 @@
#include <linux/intel-ipu3.h>
#include <linux/v4l2-controls.h>
+#include <libcamera/base/log.h>
+
#include <libcamera/buffer.h>
#include <libcamera/control_ids.h>
#include <libcamera/ipa/ipa_interface.h>
@@ -19,7 +21,6 @@
#include <libcamera/request.h>
#include "libcamera/internal/buffer.h"
-#include "libcamera/internal/log.h"
#include "ipu3_agc.h"
#include "ipu3_awb.h"
diff --git a/src/ipa/ipu3/ipu3_agc.cpp b/src/ipa/ipu3/ipu3_agc.cpp
index c476a60d..fd0b70f0 100644
--- a/src/ipa/ipu3/ipu3_agc.cpp
+++ b/src/ipa/ipu3/ipu3_agc.cpp
@@ -11,9 +11,9 @@
#include <cmath>
#include <numeric>
-#include <libcamera/ipa/core_ipa_interface.h>
+#include <libcamera/base/log.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/ipa/core_ipa_interface.h>
#include "libipa/histogram.h"
diff --git a/src/ipa/ipu3/ipu3_awb.cpp b/src/ipa/ipu3/ipu3_awb.cpp
index 54ce8e67..9b409c8f 100644
--- a/src/ipa/ipu3/ipu3_awb.cpp
+++ b/src/ipa/ipu3/ipu3_awb.cpp
@@ -10,7 +10,7 @@
#include <numeric>
#include <unordered_map>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
namespace libcamera {
diff --git a/src/ipa/libipa/histogram.cpp b/src/ipa/libipa/histogram.cpp
index d4d7cfdf..fb1eb2a2 100644
--- a/src/ipa/libipa/histogram.cpp
+++ b/src/ipa/libipa/histogram.cpp
@@ -8,7 +8,7 @@
#include <cmath>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
/**
* \file histogram.h
diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp
index 221898ce..a6664819 100644
--- a/src/ipa/raspberrypi/cam_helper.hpp
+++ b/src/ipa/raspberrypi/cam_helper.hpp
@@ -10,13 +10,13 @@
#include <libcamera/span.h>
+#include <libcamera/base/utils.h>
+
#include "camera_mode.h"
#include "controller/controller.hpp"
#include "controller/metadata.hpp"
#include "md_parser.hpp"
-#include <libcamera/base/utils.h>
-
#include "libcamera/internal/v4l2_videodevice.h"
namespace RPiController {
diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp
index 96b58359..d3433ad2 100644
--- a/src/ipa/raspberrypi/controller/controller.cpp
+++ b/src/ipa/raspberrypi/controller/controller.cpp
@@ -5,7 +5,7 @@
* controller.cpp - ISP controller
*/
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "algorithm.hpp"
#include "controller.hpp"
diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp
index 55e80ac7..1ed578cf 100644
--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp
@@ -9,7 +9,7 @@
#include "linux/bcm2835-isp.h"
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../awb_status.h"
#include "../device_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
index b0d24aa2..3cdc95a9 100644
--- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
@@ -6,7 +6,7 @@
*/
#include <math.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../awb_status.h"
#include "alsc.hpp"
diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp
index 1c917e4f..5cfd33a3 100644
--- a/src/ipa/raspberrypi/controller/rpi/awb.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp
@@ -5,7 +5,7 @@
* awb.cpp - AWB control algorithm
*/
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../lux_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/black_level.cpp b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
index 9ac855f5..6b3497f1 100644
--- a/src/ipa/raspberrypi/controller/rpi/black_level.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
@@ -8,7 +8,7 @@
#include <math.h>
#include <stdint.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../black_level_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/raspberrypi/controller/rpi/ccm.cpp
index dbdcbb39..821a4c7c 100644
--- a/src/ipa/raspberrypi/controller/rpi/ccm.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/ccm.cpp
@@ -5,7 +5,7 @@
* ccm.cpp - CCM (colour correction matrix) control algorithm
*/
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../awb_status.h"
#include "../ccm_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.cpp b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
index 2bc43027..ae55aad5 100644
--- a/src/ipa/raspberrypi/controller/rpi/contrast.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
@@ -6,7 +6,7 @@
*/
#include <stdint.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../contrast_status.h"
#include "../histogram.hpp"
diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp
index e533cd53..110f5056 100644
--- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp
@@ -5,7 +5,7 @@
* dpc.cpp - DPC (defective pixel correction) control algorithm
*/
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "dpc.hpp"
diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp
index bab4406f..a87ec802 100644
--- a/src/ipa/raspberrypi/controller/rpi/focus.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp
@@ -6,7 +6,7 @@
*/
#include <stdint.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../focus_status.h"
#include "focus.hpp"
diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp
index 5eff116c..bdceb1f3 100644
--- a/src/ipa/raspberrypi/controller/rpi/geq.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp
@@ -5,7 +5,7 @@
* geq.cpp - GEQ (green equalisation) control algorithm
*/
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../device_status.h"
#include "../lux_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp
index 258e44f4..f58d6939 100644
--- a/src/ipa/raspberrypi/controller/rpi/lux.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp
@@ -8,7 +8,7 @@
#include "linux/bcm2835-isp.h"
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../device_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/noise.cpp b/src/ipa/raspberrypi/controller/rpi/noise.cpp
index 156f7501..63cad639 100644
--- a/src/ipa/raspberrypi/controller/rpi/noise.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/noise.cpp
@@ -7,7 +7,7 @@
#include <math.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../device_status.h"
#include "../noise_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/sdn.cpp b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
index 959bc740..93845509 100644
--- a/src/ipa/raspberrypi/controller/rpi/sdn.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
@@ -5,7 +5,7 @@
* sdn.cpp - SDN (spatial denoise) control algorithm
*/
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../denoise_status.h"
#include "../noise_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
index 2cd861ca..b0c2e00a 100644
--- a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
@@ -7,7 +7,7 @@
#include <math.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include "../sharpen_status.h"
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 1c1e802a..a3f01449 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -13,6 +13,10 @@
#include <string.h>
#include <sys/mman.h>
+#include <linux/bcm2835-isp.h>
+
+#include <libcamera/base/log.h>
+
#include <libcamera/buffer.h>
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
@@ -25,9 +29,6 @@
#include <libcamera/span.h>
#include "libcamera/internal/buffer.h"
-#include "libcamera/internal/log.h"
-
-#include <linux/bcm2835-isp.h>
#include "agc_algorithm.hpp"
#include "agc_status.h"
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index b47ea324..cdfb4d13 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -15,6 +15,8 @@
#include <linux/rkisp1-config.h>
#include <linux/v4l2-controls.h>
+#include <libcamera/base/log.h>
+
#include <libcamera/buffer.h>
#include <libcamera/control_ids.h>
#include <libcamera/ipa/ipa_interface.h>
@@ -22,8 +24,6 @@
#include <libcamera/ipa/rkisp1_ipa_interface.h>
#include <libcamera/request.h>
-#include "libcamera/internal/log.h"
-
namespace libcamera {
LOG_DEFINE_CATEGORY(IPARkISP1)
diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
index 13681d88..e44765af 100644
--- a/src/ipa/vimc/vimc.cpp
+++ b/src/ipa/vimc/vimc.cpp
@@ -14,11 +14,12 @@
#include <iostream>
+#include <libcamera/base/log.h>
+
#include <libcamera/ipa/ipa_interface.h>
#include <libcamera/ipa/ipa_module_info.h>
#include "libcamera/internal/file.h"
-#include "libcamera/internal/log.h"
namespace libcamera {
diff --git a/src/libcamera/bound_method.cpp b/src/libcamera/base/bound_method.cpp
index 4965bb5e..3ecec51c 100644
--- a/src/libcamera/bound_method.cpp
+++ b/src/libcamera/base/bound_method.cpp
@@ -5,14 +5,13 @@
* bound_method.cpp - Method bind and invocation
*/
-#include <libcamera/bound_method.h>
-
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/semaphore.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/bound_method.h>
+#include <libcamera/base/message.h>
+#include <libcamera/base/semaphore.h>
+#include <libcamera/base/thread.h>
/**
- * \file bound_method.h
+ * \file base/bound_method.h
* \brief Method bind and invocation
*/
diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/base/event_dispatcher.cpp
index e0ce1eb3..4be89e81 100644
--- a/src/libcamera/event_dispatcher.cpp
+++ b/src/libcamera/base/event_dispatcher.cpp
@@ -5,12 +5,11 @@
* event_dispatcher.cpp - Event dispatcher
*/
-#include "libcamera/internal/event_dispatcher.h"
-
-#include "libcamera/internal/log.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/log.h>
/**
- * \file event_dispatcher.h
+ * \file base/event_dispatcher.h
*/
namespace libcamera {
diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp
index 0b6aee18..d76ca7fc 100644
--- a/src/libcamera/event_dispatcher_poll.cpp
+++ b/src/libcamera/base/event_dispatcher_poll.cpp
@@ -5,7 +5,7 @@
* event_dispatcher_poll.cpp - Poll-based event dispatcher
*/
-#include "libcamera/internal/event_dispatcher_poll.h"
+#include <libcamera/base/event_dispatcher_poll.h>
#include <algorithm>
#include <chrono>
@@ -16,15 +16,15 @@
#include <sys/eventfd.h>
#include <unistd.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
#include <libcamera/base/utils.h>
#include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
/**
- * \file event_dispatcher_poll.h
+ * \file base/event_dispatcher_poll.h
*/
namespace libcamera {
diff --git a/src/libcamera/log.cpp b/src/libcamera/base/log.cpp
index 5ff0e901..1801ae26 100644
--- a/src/libcamera/log.cpp
+++ b/src/libcamera/base/log.cpp
@@ -5,7 +5,7 @@
* log.cpp - Logging infrastructure
*/
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
#include <array>
#if HAVE_BACKTRACE
@@ -23,12 +23,11 @@
#include <libcamera/logging.h>
+#include <libcamera/base/thread.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/thread.h"
-
/**
- * \file log.h
+ * \file base/log.h
* \brief Logging infrastructure
*
* libcamera includes a logging infrastructure used through the library that
diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
index 302a2886..7a19c67c 100644
--- a/src/libcamera/base/meson.build
+++ b/src/libcamera/base/meson.build
@@ -2,10 +2,21 @@
libcamera_base_sources = files([
'class.cpp',
+ 'bound_method.cpp',
+ 'event_dispatcher.cpp',
+ 'event_dispatcher_poll.cpp',
+ 'log.cpp',
+ 'message.cpp',
+ 'object.cpp',
+ 'semaphore.cpp',
+ 'signal.cpp',
+ 'thread.cpp',
+ 'timer.cpp',
'utils.cpp',
])
libcamera_base_deps = [
+ dependency('threads'),
]
libcamera_base_lib = shared_library('libcamera-base',
diff --git a/src/libcamera/message.cpp b/src/libcamera/base/message.cpp
index bc985c07..f1d772e4 100644
--- a/src/libcamera/message.cpp
+++ b/src/libcamera/base/message.cpp
@@ -5,14 +5,13 @@
* message.cpp - Message queue support
*/
-#include "libcamera/internal/message.h"
+#include <libcamera/base/message.h>
-#include <libcamera/signal.h>
-
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
/**
- * \file message.h
+ * \file base/message.h
* \brief Message queue support
*
* The messaging API enables inter-thread communication through message
diff --git a/src/libcamera/object.cpp b/src/libcamera/base/object.cpp
index 51cac64e..25410ecd 100644
--- a/src/libcamera/object.cpp
+++ b/src/libcamera/base/object.cpp
@@ -5,21 +5,19 @@
* object.cpp - Base object
*/
-#include <libcamera/object.h>
+#include <libcamera/base/object.h>
#include <algorithm>
-#include <libcamera/signal.h>
-
+#include <libcamera/base/log.h>
+#include <libcamera/base/message.h>
+#include <libcamera/base/semaphore.h>
+#include <libcamera/base/signal.h>
+#include <libcamera/base/thread.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/semaphore.h"
-#include "libcamera/internal/thread.h"
-
/**
- * \file object.h
+ * \file base/object.h
* \brief Base object to support automatic signal disconnection
*/
diff --git a/src/libcamera/semaphore.cpp b/src/libcamera/base/semaphore.cpp
index d8988a91..7aedc6a8 100644
--- a/src/libcamera/semaphore.cpp
+++ b/src/libcamera/base/semaphore.cpp
@@ -5,11 +5,11 @@
* semaphore.cpp - General-purpose counting semaphore
*/
-#include "libcamera/internal/semaphore.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/semaphore.h>
+#include <libcamera/base/thread.h>
/**
- * \file semaphore.h
+ * \file base/semaphore.h
* \brief General-purpose counting semaphore
*/
diff --git a/src/libcamera/signal.cpp b/src/libcamera/base/signal.cpp
index 2532df3c..298b2d4b 100644
--- a/src/libcamera/signal.cpp
+++ b/src/libcamera/base/signal.cpp
@@ -5,12 +5,12 @@
* signal.cpp - Signal & slot implementation
*/
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/thread.h>
/**
- * \file signal.h
+ * \file base/signal.h
* \brief Signal & slot implementation
*/
diff --git a/src/libcamera/thread.cpp b/src/libcamera/base/thread.cpp
index 91e4737a..c7c2d6b2 100644
--- a/src/libcamera/thread.cpp
+++ b/src/libcamera/base/thread.cpp
@@ -5,7 +5,7 @@
* thread.cpp - Thread support
*/
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/thread.h>
#include <atomic>
#include <condition_variable>
@@ -14,10 +14,10 @@
#include <sys/types.h>
#include <unistd.h>
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/event_dispatcher_poll.h"
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/message.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/event_dispatcher_poll.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/message.h>
/**
* \page thread Thread Support
@@ -102,7 +102,7 @@
*/
/**
- * \file thread.h
+ * \file base/thread.h
* \brief Thread support
*/
diff --git a/src/libcamera/timer.cpp b/src/libcamera/base/timer.cpp
index 9496671e..9c54352d 100644
--- a/src/libcamera/timer.cpp
+++ b/src/libcamera/base/timer.cpp
@@ -5,21 +5,20 @@
* timer.cpp - Generic timer
*/
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/timer.h>
#include <chrono>
-#include <libcamera/camera_manager.h>
-
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/message.h>
+#include <libcamera/base/thread.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/camera_manager.h>
/**
- * \file timer.h
+ * \file base/timer.h
* \brief Generic timer
*/
diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp
index ca999429..e4c345d5 100644
--- a/src/libcamera/buffer.cpp
+++ b/src/libcamera/buffer.cpp
@@ -13,7 +13,7 @@
#include <sys/mman.h>
#include <unistd.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
/**
* \file libcamera/buffer.h
diff --git a/src/libcamera/byte_stream_buffer.cpp b/src/libcamera/byte_stream_buffer.cpp
index 7fc6f694..b67bb928 100644
--- a/src/libcamera/byte_stream_buffer.cpp
+++ b/src/libcamera/byte_stream_buffer.cpp
@@ -10,7 +10,7 @@
#include <stdint.h>
#include <string.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
/**
* \file byte_stream_buffer.h
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 1340c266..de0123ae 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -11,13 +11,14 @@
#include <atomic>
#include <iomanip>
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+
#include <libcamera/framebuffer_allocator.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
-#include "libcamera/internal/log.h"
#include "libcamera/internal/pipeline_handler.h"
-#include "libcamera/internal/thread.h"
/**
* \file camera.h
diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp
index a3784db6..fc3bd88c 100644
--- a/src/libcamera/camera_manager.cpp
+++ b/src/libcamera/camera_manager.cpp
@@ -14,12 +14,13 @@
#include <libcamera/base/utils.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/ipa_manager.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/pipeline_handler.h"
#include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
/**
* \file camera_manager.h
diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp
index fc4ea78d..7b7279ef 100644
--- a/src/libcamera/camera_sensor_properties.cpp
+++ b/src/libcamera/camera_sensor_properties.cpp
@@ -9,9 +9,9 @@
#include <map>
-#include <libcamera/control_ids.h>
+#include <libcamera/base/log.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/control_ids.h>
/**
* \file camera_sensor_properties.h
diff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp
index 09744413..dd5a2608 100644
--- a/src/libcamera/control_serializer.cpp
+++ b/src/libcamera/control_serializer.cpp
@@ -11,13 +11,14 @@
#include <memory>
#include <vector>
+#include <libcamera/base/log.h>
+
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
#include <libcamera/ipa/ipa_controls.h>
#include <libcamera/span.h>
#include "libcamera/internal/byte_stream_buffer.h"
-#include "libcamera/internal/log.h"
/**
* \file control_serializer.h
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index 7df372ad..34317fa0 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -12,10 +12,10 @@
#include <string>
#include <string.h>
+#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
#include "libcamera/internal/control_validator.h"
-#include "libcamera/internal/log.h"
/**
* \file controls.h
diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp
index 0bf81b51..90ce7e0b 100644
--- a/src/libcamera/delayed_controls.cpp
+++ b/src/libcamera/delayed_controls.cpp
@@ -7,9 +7,10 @@
#include "libcamera/internal/delayed_controls.h"
+#include <libcamera/base/log.h>
+
#include <libcamera/controls.h>
-#include "libcamera/internal/log.h"
#include "libcamera/internal/v4l2_device.h"
/**
diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
index e6ecc360..1f33faf5 100644
--- a/src/libcamera/device_enumerator.cpp
+++ b/src/libcamera/device_enumerator.cpp
@@ -11,7 +11,8 @@
#include <string.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
+
#include "libcamera/internal/media_device.h"
/**
diff --git a/src/libcamera/device_enumerator_sysfs.cpp b/src/libcamera/device_enumerator_sysfs.cpp
index ff728852..686bb809 100644
--- a/src/libcamera/device_enumerator_sysfs.cpp
+++ b/src/libcamera/device_enumerator_sysfs.cpp
@@ -17,7 +17,8 @@
#include <sys/types.h>
#include <unistd.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
+
#include "libcamera/internal/media_device.h"
namespace libcamera {
diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp
index d26fcf10..4b842773 100644
--- a/src/libcamera/device_enumerator_udev.cpp
+++ b/src/libcamera/device_enumerator_udev.cpp
@@ -17,8 +17,9 @@
#include <sys/sysmacros.h>
#include <unistd.h>
+#include <libcamera/base/log.h>
+
#include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
namespace libcamera {
diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp
index 6b0575c0..784016a9 100644
--- a/src/libcamera/event_notifier.cpp
+++ b/src/libcamera/event_notifier.cpp
@@ -9,9 +9,9 @@
#include <libcamera/camera_manager.h>
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/message.h>
+#include <libcamera/base/thread.h>
/**
* \file event_notifier.h
diff --git a/src/libcamera/file.cpp b/src/libcamera/file.cpp
index bce2b613..def0f60d 100644
--- a/src/libcamera/file.cpp
+++ b/src/libcamera/file.cpp
@@ -14,7 +14,7 @@
#include <sys/types.h>
#include <unistd.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
/**
* \file file.h
diff --git a/src/libcamera/file_descriptor.cpp b/src/libcamera/file_descriptor.cpp
index 8b505ed3..638b3bbe 100644
--- a/src/libcamera/file_descriptor.cpp
+++ b/src/libcamera/file_descriptor.cpp
@@ -11,7 +11,7 @@
#include <unistd.h>
#include <utility>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
/**
* \file file_descriptor.h
diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
index 55822f4c..59a34853 100644
--- a/src/libcamera/formats.cpp
+++ b/src/libcamera/formats.cpp
@@ -10,9 +10,9 @@
#include <algorithm>
#include <errno.h>
-#include <libcamera/formats.h>
+#include <libcamera/base/log.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/formats.h>
/**
* \file internal/formats.h
diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp
index 2fbba37a..86a57923 100644
--- a/src/libcamera/framebuffer_allocator.cpp
+++ b/src/libcamera/framebuffer_allocator.cpp
@@ -9,11 +9,12 @@
#include <errno.h>
+#include <libcamera/base/log.h>
+
#include <libcamera/buffer.h>
#include <libcamera/camera.h>
#include <libcamera/stream.h>
-#include "libcamera/internal/log.h"
#include "libcamera/internal/pipeline_handler.h"
/**
diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp
index 13644689..9bbef0b5 100644
--- a/src/libcamera/geometry.cpp
+++ b/src/libcamera/geometry.cpp
@@ -10,7 +10,7 @@
#include <sstream>
#include <stdint.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
/**
* \file geometry.h
diff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp
index 131b3bd6..fb941e6b 100644
--- a/src/libcamera/ipa_data_serializer.cpp
+++ b/src/libcamera/ipa_data_serializer.cpp
@@ -7,7 +7,7 @@
#include "libcamera/internal/ipa_data_serializer.h"
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
/**
* \file ipa_data_serializer.h
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
index 263cacd6..35c72598 100644
--- a/src/libcamera/ipa_manager.cpp
+++ b/src/libcamera/ipa_manager.cpp
@@ -12,12 +12,12 @@
#include <string.h>
#include <sys/types.h>
+#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
#include "libcamera/internal/file.h"
#include "libcamera/internal/ipa_module.h"
#include "libcamera/internal/ipa_proxy.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/pipeline_handler.h"
/**
diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp
index a4e7fb86..7ab55579 100644
--- a/src/libcamera/ipa_module.cpp
+++ b/src/libcamera/ipa_module.cpp
@@ -23,10 +23,10 @@
#include <libcamera/span.h>
+#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
#include "libcamera/internal/file.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/pipeline_handler.h"
/**
diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp
index ca980ec7..babcc48b 100644
--- a/src/libcamera/ipa_proxy.cpp
+++ b/src/libcamera/ipa_proxy.cpp
@@ -12,10 +12,10 @@
#include <sys/types.h>
#include <unistd.h>
+#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
#include "libcamera/internal/ipa_module.h"
-#include "libcamera/internal/log.h"
/**
* \file ipa_proxy.h
diff --git a/src/libcamera/ipc_pipe.cpp b/src/libcamera/ipc_pipe.cpp
index c402c8d0..28e20e03 100644
--- a/src/libcamera/ipc_pipe.cpp
+++ b/src/libcamera/ipc_pipe.cpp
@@ -7,7 +7,7 @@
#include "libcamera/internal/ipc_pipe.h"
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
/**
* \file ipc_pipe.h
diff --git a/src/libcamera/ipc_pipe_unixsocket.cpp b/src/libcamera/ipc_pipe_unixsocket.cpp
index db0e260f..4511775f 100644
--- a/src/libcamera/ipc_pipe_unixsocket.cpp
+++ b/src/libcamera/ipc_pipe_unixsocket.cpp
@@ -9,13 +9,14 @@
#include <vector>
-#include "libcamera/internal/event_dispatcher.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
#include "libcamera/internal/ipc_pipe.h"
#include "libcamera/internal/ipc_unixsocket.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
namespace libcamera {
diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp
index fdb359f7..14665970 100644
--- a/src/libcamera/ipc_unixsocket.cpp
+++ b/src/libcamera/ipc_unixsocket.cpp
@@ -12,8 +12,9 @@
#include <sys/socket.h>
#include <unistd.h>
+#include <libcamera/base/log.h>
+
#include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
/**
* \file ipc_unixsocket.h
diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp
index 9ec84e56..e12ab1ab 100644
--- a/src/libcamera/media_device.cpp
+++ b/src/libcamera/media_device.cpp
@@ -18,7 +18,7 @@
#include <linux/media.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
/**
* \file media_device.h
diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp
index 94aeb504..815edc8e 100644
--- a/src/libcamera/media_object.cpp
+++ b/src/libcamera/media_object.cpp
@@ -15,7 +15,8 @@
#include <linux/media.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
+
#include "libcamera/internal/media_device.h"
/**
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index e1252ce4..e915266a 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -2,7 +2,6 @@
libcamera_sources = files([
'bayer_format.cpp',
- 'bound_method.cpp',
'buffer.cpp',
'byte_stream_buffer.cpp',
'camera.cpp',
@@ -16,8 +15,6 @@ libcamera_sources = files([
'delayed_controls.cpp',
'device_enumerator.cpp',
'device_enumerator_sysfs.cpp',
- 'event_dispatcher.cpp',
- 'event_dispatcher_poll.cpp',
'event_notifier.cpp',
'file.cpp',
'file_descriptor.cpp',
@@ -33,23 +30,16 @@ libcamera_sources = files([
'ipc_pipe.cpp',
'ipc_pipe_unixsocket.cpp',
'ipc_unixsocket.cpp',
- 'log.cpp',
'media_device.cpp',
'media_object.cpp',
- 'message.cpp',
- 'object.cpp',
'pipeline_handler.cpp',
'pixel_format.cpp',
'process.cpp',
'pub_key.cpp',
'request.cpp',
- 'semaphore.cpp',
- 'signal.cpp',
'source_paths.cpp',
'stream.cpp',
'sysfs.cpp',
- 'thread.cpp',
- 'timer.cpp',
'transform.cpp',
'v4l2_device.cpp',
'v4l2_pixelformat.cpp',
@@ -128,7 +118,6 @@ libcamera_deps = [
libgnutls,
liblttng,
libudev,
- dependency('threads'),
]
# We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.
diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h
index d8d4a181..f28e9f1d 100644
--- a/src/libcamera/pipeline/ipu3/cio2.h
+++ b/src/libcamera/pipeline/ipu3/cio2.h
@@ -11,7 +11,7 @@
#include <queue>
#include <vector>
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
#include "libcamera/internal/v4l2_subdevice.h"
#include "libcamera/internal/v4l2_videodevice.h"
diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h
index 59e64e81..3ef7e445 100644
--- a/src/libcamera/pipeline/ipu3/frames.h
+++ b/src/libcamera/pipeline/ipu3/frames.h
@@ -12,7 +12,7 @@
#include <queue>
#include <vector>
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
namespace libcamera {
diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
index 32d143a8..e955bc34 100644
--- a/src/libcamera/pipeline/ipu3/imgu.cpp
+++ b/src/libcamera/pipeline/ipu3/imgu.cpp
@@ -13,12 +13,12 @@
#include <linux/media-bus-format.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
#include <libcamera/formats.h>
#include <libcamera/stream.h>
-#include <libcamera/base/utils.h>
-
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
namespace libcamera {
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 6b43ad2f..76c3bb3d 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -11,6 +11,9 @@
#include <queue>
#include <vector>
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
#include <libcamera/camera.h>
#include <libcamera/control_ids.h>
#include <libcamera/formats.h>
@@ -20,13 +23,10 @@
#include <libcamera/request.h>
#include <libcamera/stream.h>
-#include <libcamera/base/utils.h>
-
#include "libcamera/internal/camera_sensor.h"
#include "libcamera/internal/delayed_controls.h"
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/ipa_manager.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
index 4d5dd6cb..573ea11d 100644
--- a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
+++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
@@ -14,7 +14,7 @@
#include <sys/ioctl.h>
#include <unistd.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
/*
* /dev/dma-heap/linux,cma is the dma-heap allocator, which allows dmaheap-cma
diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
index f2430415..b3265d0e 100644
--- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
+++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
@@ -6,9 +6,9 @@
*/
#include "rpi_stream.h"
-#include <libcamera/ipa/raspberrypi_ipa_interface.h>
+#include <libcamera/base/log.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/ipa/raspberrypi_ipa_interface.h>
namespace libcamera {
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index c625d724..00df4f0b 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -14,6 +14,9 @@
#include <linux/media-bus-format.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
#include <libcamera/buffer.h>
#include <libcamera/camera.h>
#include <libcamera/control_ids.h>
@@ -24,13 +27,10 @@
#include <libcamera/request.h>
#include <libcamera/stream.h>
-#include <libcamera/base/utils.h>
-
#include "libcamera/internal/camera_sensor.h"
#include "libcamera/internal/delayed_controls.h"
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/ipa_manager.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
#include "libcamera/internal/v4l2_subdevice.h"
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
index 3b3e37d2..c185ac39 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
@@ -10,10 +10,11 @@
#include <memory>
#include <vector>
+#include <libcamera/base/signal.h>
+
#include <libcamera/camera.h>
#include <libcamera/geometry.h>
#include <libcamera/pixel_format.h>
-#include <libcamera/signal.h>
#include <libcamera/span.h>
#include "libcamera/internal/media_object.h"
diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp
index 589f185b..9af1096b 100644
--- a/src/libcamera/pipeline/simple/converter.cpp
+++ b/src/libcamera/pipeline/simple/converter.cpp
@@ -10,14 +10,14 @@
#include <algorithm>
#include <limits.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
+#include <libcamera/base/utils.h>
+
#include <libcamera/buffer.h>
#include <libcamera/geometry.h>
-#include <libcamera/signal.h>
#include <libcamera/stream.h>
-#include <libcamera/base/utils.h>
-
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/v4l2_videodevice.h"
diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h
index 480e528d..276a2a29 100644
--- a/src/libcamera/pipeline/simple/converter.h
+++ b/src/libcamera/pipeline/simple/converter.h
@@ -16,9 +16,9 @@
#include <vector>
#include <libcamera/pixel_format.h>
-#include <libcamera/signal.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
namespace libcamera {
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 1894014d..4d78e6fa 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -21,6 +21,8 @@
#include <linux/media-bus-format.h>
+#include <libcamera/base/log.h>
+
#include <libcamera/camera.h>
#include <libcamera/control_ids.h>
#include <libcamera/request.h>
@@ -28,7 +30,6 @@
#include "libcamera/internal/camera_sensor.h"
#include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
#include "libcamera/internal/v4l2_subdevice.h"
diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
index d8c17dcc..0f634b8d 100644
--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
@@ -12,6 +12,9 @@
#include <memory>
#include <tuple>
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
#include <libcamera/camera.h>
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
@@ -19,10 +22,7 @@
#include <libcamera/request.h>
#include <libcamera/stream.h>
-#include <libcamera/base/utils.h>
-
#include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
#include "libcamera/internal/sysfs.h"
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index 025ca562..12f7517f 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -14,29 +14,29 @@
#include <linux/media-bus-format.h>
#include <linux/version.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
#include <libcamera/camera.h>
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
#include <libcamera/formats.h>
-#include <libcamera/ipa/ipa_interface.h>
-#include <libcamera/ipa/ipa_module_info.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
-#include <libcamera/base/utils.h>
+#include <libcamera/ipa/ipa_interface.h>
+#include <libcamera/ipa/ipa_module_info.h>
+#include <libcamera/ipa/vimc_ipa_interface.h>
+#include <libcamera/ipa/vimc_ipa_proxy.h>
#include "libcamera/internal/camera_sensor.h"
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/ipa_manager.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
#include "libcamera/internal/v4l2_subdevice.h"
#include "libcamera/internal/v4l2_videodevice.h"
-#include <libcamera/ipa/vimc_ipa_interface.h>
-#include <libcamera/ipa/vimc_ipa_proxy.h>
-
namespace libcamera {
LOG_DEFINE_CATEGORY(VIMC)
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index 6fb2a743..f626eddd 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -9,14 +9,14 @@
#include <sys/sysmacros.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
#include <libcamera/buffer.h>
#include <libcamera/camera.h>
#include <libcamera/camera_manager.h>
-#include <libcamera/base/utils.h>
-
#include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/tracepoints.h"
diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp
index 35091f60..46338029 100644
--- a/src/libcamera/process.cpp
+++ b/src/libcamera/process.cpp
@@ -20,10 +20,10 @@
#include <unistd.h>
#include <vector>
+#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
#include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
/**
* \file process.h
diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index 6611e74d..518384eb 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -10,13 +10,14 @@
#include <map>
#include <sstream>
+#include <libcamera/base/log.h>
+
#include <libcamera/buffer.h>
#include <libcamera/camera.h>
#include <libcamera/control_ids.h>
#include <libcamera/stream.h>
#include "libcamera/internal/camera_controls.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/tracepoints.h"
/**
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index d5d68427..b8626775 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -15,9 +15,9 @@
#include <libcamera/request.h>
+#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/log.h"
/**
* \file stream.h
diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp
index e9004b2b..4372b134 100644
--- a/src/libcamera/sysfs.cpp
+++ b/src/libcamera/sysfs.cpp
@@ -12,8 +12,9 @@
#include <sys/stat.h>
#include <sys/sysmacros.h>
+#include <libcamera/base/log.h>
+
#include "libcamera/internal/file.h"
-#include "libcamera/internal/log.h"
/**
* \file sysfs.h
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index facb53e1..334b9b78 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -16,10 +16,10 @@
#include <sys/syscall.h>
#include <unistd.h>
+#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
#include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/sysfs.h"
/**
diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
index 166d93cf..87d728fe 100644
--- a/src/libcamera/v4l2_pixelformat.cpp
+++ b/src/libcamera/v4l2_pixelformat.cpp
@@ -12,11 +12,12 @@
#include <map>
#include <string.h>
+#include <libcamera/base/log.h>
+
#include <libcamera/formats.h>
#include <libcamera/pixel_format.h>
#include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
/**
* \file v4l2_pixelformat.h
diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
index 2c56cfaf..8fe5e45b 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -19,9 +19,9 @@
#include <libcamera/geometry.h>
+#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/media_object.h"
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 12c09dc7..dc23510b 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -21,10 +21,11 @@
#include <linux/version.h>
+#include <libcamera/base/log.h>
+
#include <libcamera/file_descriptor.h>
#include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/media_object.h"
diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp
index 97825c71..157ab94e 100644
--- a/src/v4l2/v4l2_camera.cpp
+++ b/src/v4l2/v4l2_camera.cpp
@@ -10,7 +10,7 @@
#include <errno.h>
#include <unistd.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
using namespace libcamera;
diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
index d2380462..dbe0573b 100644
--- a/src/v4l2/v4l2_camera.h
+++ b/src/v4l2/v4l2_camera.h
@@ -12,13 +12,13 @@
#include <mutex>
#include <utility>
+#include <libcamera/base/semaphore.h>
+
#include <libcamera/buffer.h>
#include <libcamera/camera.h>
#include <libcamera/file_descriptor.h>
#include <libcamera/framebuffer_allocator.h>
-#include "libcamera/internal/semaphore.h"
-
using namespace libcamera;
class V4L2Camera
diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
index a5a25507..7682c4bd 100644
--- a/src/v4l2/v4l2_camera_proxy.cpp
+++ b/src/v4l2/v4l2_camera_proxy.cpp
@@ -18,12 +18,12 @@
#include <libcamera/camera.h>
#include <libcamera/formats.h>
-#include <libcamera/object.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/object.h>
#include <libcamera/base/utils.h>
#include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
#include "v4l2_camera.h"
#include "v4l2_camera_file.h"
diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp
index 27de6c50..e566125a 100644
--- a/src/v4l2/v4l2_compat_manager.cpp
+++ b/src/v4l2/v4l2_compat_manager.cpp
@@ -19,12 +19,11 @@
#include <sys/types.h>
#include <unistd.h>
-#include <libcamera/camera.h>
-#include <libcamera/camera_manager.h>
-
+#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/camera.h>
+#include <libcamera/camera_manager.h>
#include "v4l2_camera_file.h"