summaryrefslogtreecommitdiff
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
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>
-rw-r--r--Documentation/guides/pipeline-handler.rst3
-rw-r--r--include/libcamera/base/bound_method.h (renamed from include/libcamera/bound_method.h)6
-rw-r--r--include/libcamera/base/event_dispatcher.h (renamed from include/libcamera/internal/event_dispatcher.h)6
-rw-r--r--include/libcamera/base/event_dispatcher_poll.h (renamed from include/libcamera/internal/event_dispatcher_poll.h)8
-rw-r--r--include/libcamera/base/log.h (renamed from include/libcamera/internal/log.h)6
-rw-r--r--include/libcamera/base/meson.build10
-rw-r--r--include/libcamera/base/message.h (renamed from include/libcamera/internal/message.h)8
-rw-r--r--include/libcamera/base/object.h (renamed from include/libcamera/object.h)8
-rw-r--r--include/libcamera/base/semaphore.h (renamed from include/libcamera/internal/semaphore.h)8
-rw-r--r--include/libcamera/base/signal.h (renamed from include/libcamera/signal.h)10
-rw-r--r--include/libcamera/base/thread.h (renamed from include/libcamera/internal/thread.h)12
-rw-r--r--include/libcamera/base/timer.h (renamed from include/libcamera/internal/timer.h)10
-rw-r--r--include/libcamera/camera.h4
-rw-r--r--include/libcamera/camera_manager.h5
-rw-r--r--include/libcamera/internal/camera_sensor.h2
-rw-r--r--include/libcamera/internal/device_enumerator.h2
-rw-r--r--include/libcamera/internal/event_notifier.h4
-rw-r--r--include/libcamera/internal/ipa_data_serializer.h3
-rw-r--r--include/libcamera/internal/ipa_manager.h3
-rw-r--r--include/libcamera/internal/ipa_module.h3
-rw-r--r--include/libcamera/internal/ipc_pipe.h4
-rw-r--r--include/libcamera/internal/ipc_unixsocket.h2
-rw-r--r--include/libcamera/internal/media_device.h4
-rw-r--r--include/libcamera/internal/meson.build7
-rw-r--r--include/libcamera/internal/pipeline_handler.h2
-rw-r--r--include/libcamera/internal/process.h2
-rw-r--r--include/libcamera/internal/v4l2_device.h6
-rw-r--r--include/libcamera/internal/v4l2_subdevice.h2
-rw-r--r--include/libcamera/internal/v4l2_videodevice.h4
-rw-r--r--include/libcamera/ipa/ipa_interface.h3
-rw-r--r--include/libcamera/meson.build3
-rw-r--r--include/libcamera/request.h2
-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
-rw-r--r--test/camera/buffer_import.cpp7
-rw-r--r--test/camera/capture.cpp6
-rw-r--r--test/event-dispatcher.cpp6
-rw-r--r--test/event-thread.cpp5
-rw-r--r--test/event.cpp7
-rw-r--r--test/hotplug-cameras.cpp7
-rw-r--r--test/ipa/ipa_interface_test.cpp7
-rw-r--r--test/ipc/unixsocket.cpp7
-rw-r--r--test/ipc/unixsocket_ipc.cpp7
-rw-r--r--test/log/log_api.cpp4
-rw-r--r--test/log/log_process.cpp8
-rw-r--r--test/message.cpp4
-rw-r--r--test/object-delete.cpp5
-rw-r--r--test/object-invoke.cpp7
-rw-r--r--test/object.cpp7
-rw-r--r--test/process/process_test.cpp7
-rw-r--r--test/serialization/ipa_data_serializer_test.cpp5
-rw-r--r--test/signal-threads.cpp5
-rw-r--r--test/signal.cpp4
-rw-r--r--test/threads.cpp2
-rw-r--r--test/timer-thread.cpp6
-rw-r--r--test/timer.cpp6
-rw-r--r--test/v4l2_videodevice/buffer_sharing.cpp6
-rw-r--r--test/v4l2_videodevice/capture_async.cpp6
-rw-r--r--test/v4l2_videodevice/v4l2_m2mdevice.cpp7
-rw-r--r--utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl5
-rw-r--r--utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl3
-rw-r--r--utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl7
161 files changed, 387 insertions, 363 deletions
diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
index 3047e006..15277693 100644
--- a/Documentation/guides/pipeline-handler.rst
+++ b/Documentation/guides/pipeline-handler.rst
@@ -288,7 +288,8 @@ features:
.. code-block:: cpp
- #include "libcamera/internal/log.h"
+ #include <libcamera/base/log.h>
+
#include "libcamera/internal/pipeline_handler.h"
Run the following commands:
diff --git a/include/libcamera/bound_method.h b/include/libcamera/base/bound_method.h
index 4fc445ec..282f9b58 100644
--- a/include/libcamera/bound_method.h
+++ b/include/libcamera/base/bound_method.h
@@ -4,8 +4,8 @@
*
* bound_method.h - Method bind and invocation
*/
-#ifndef __LIBCAMERA_BOUND_METHOD_H__
-#define __LIBCAMERA_BOUND_METHOD_H__
+#ifndef __LIBCAMERA_BASE_BOUND_METHOD_H__
+#define __LIBCAMERA_BASE_BOUND_METHOD_H__
#include <memory>
#include <tuple>
@@ -236,4 +236,4 @@ private:
} /* namespace libcamera */
-#endif /* __LIBCAMERA_BOUND_METHOD_H__ */
+#endif /* __LIBCAMERA_BASE_BOUND_METHOD_H__ */
diff --git a/include/libcamera/internal/event_dispatcher.h b/include/libcamera/base/event_dispatcher.h
index e6a8ad65..045df27f 100644
--- a/include/libcamera/internal/event_dispatcher.h
+++ b/include/libcamera/base/event_dispatcher.h
@@ -4,8 +4,8 @@
*
* event_dispatcher.h - Event dispatcher
*/
-#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__
-#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__
+#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_H__
+#define __LIBCAMERA_BASE_EVENT_DISPATCHER_H__
#include <vector>
@@ -32,4 +32,4 @@ public:
} /* namespace libcamera */
-#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__ */
+#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_H__ */
diff --git a/include/libcamera/internal/event_dispatcher_poll.h b/include/libcamera/base/event_dispatcher_poll.h
index 33de051d..ae2a3f04 100644
--- a/include/libcamera/internal/event_dispatcher_poll.h
+++ b/include/libcamera/base/event_dispatcher_poll.h
@@ -4,14 +4,14 @@
*
* event_dispatcher_poll.h - Poll-based event dispatcher
*/
-#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__
-#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__
+#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__
+#define __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__
#include <list>
#include <map>
#include <vector>
-#include "libcamera/internal/event_dispatcher.h"
+#include <libcamera/base/event_dispatcher.h>
struct pollfd;
@@ -55,4 +55,4 @@ private:
} /* namespace libcamera */
-#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__ */
+#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__ */
diff --git a/include/libcamera/internal/log.h b/include/libcamera/base/log.h
index 82e55a62..b93c947a 100644
--- a/include/libcamera/internal/log.h
+++ b/include/libcamera/base/log.h
@@ -4,8 +4,8 @@
*
* log.h - Logging infrastructure
*/
-#ifndef __LIBCAMERA_INTERNAL_LOG_H__
-#define __LIBCAMERA_INTERNAL_LOG_H__
+#ifndef __LIBCAMERA_BASE_LOG_H__
+#define __LIBCAMERA_BASE_LOG_H__
#include <chrono>
#include <sstream>
@@ -127,4 +127,4 @@ LogMessage _log(const LogCategory *category, LogSeverity severity,
} /* namespace libcamera */
-#endif /* __LIBCAMERA_INTERNAL_LOG_H__ */
+#endif /* __LIBCAMERA_BASE_LOG_H__ */
diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
index 2db756c5..7a858dcb 100644
--- a/include/libcamera/base/meson.build
+++ b/include/libcamera/base/meson.build
@@ -3,7 +3,17 @@
libcamera_base_include_dir = libcamera_include_dir / 'base'
libcamera_base_headers = files([
+ 'bound_method.h',
'class.h',
+ 'event_dispatcher.h',
+ 'event_dispatcher_poll.h',
+ 'log.h',
+ 'message.h',
+ 'object.h',
+ 'semaphore.h',
+ 'signal.h',
+ 'thread.h',
+ 'timer.h',
'utils.h',
])
diff --git a/include/libcamera/internal/message.h b/include/libcamera/base/message.h
index f1b133bf..5d2a9f04 100644
--- a/include/libcamera/internal/message.h
+++ b/include/libcamera/base/message.h
@@ -4,12 +4,12 @@
*
* message.h - Message queue support
*/
-#ifndef __LIBCAMERA_INTERNAL_MESSAGE_H__
-#define __LIBCAMERA_INTERNAL_MESSAGE_H__
+#ifndef __LIBCAMERA_BASE_MESSAGE_H__
+#define __LIBCAMERA_BASE_MESSAGE_H__
#include <atomic>
-#include <libcamera/bound_method.h>
+#include <libcamera/base/bound_method.h>
namespace libcamera {
@@ -68,4 +68,4 @@ private:
} /* namespace libcamera */
-#endif /* __LIBCAMERA_INTERNAL_MESSAGE_H__ */
+#endif /* __LIBCAMERA_BASE_MESSAGE_H__ */
diff --git a/include/libcamera/object.h b/include/libcamera/base/object.h
index a1882f05..5c385ab4 100644
--- a/include/libcamera/object.h
+++ b/include/libcamera/base/object.h
@@ -4,14 +4,14 @@
*
* object.h - Base object
*/
-#ifndef __LIBCAMERA_OBJECT_H__
-#define __LIBCAMERA_OBJECT_H__
+#ifndef __LIBCAMERA_BASE_OBJECT_H__
+#define __LIBCAMERA_BASE_OBJECT_H__
#include <list>
#include <memory>
#include <vector>
-#include <libcamera/bound_method.h>
+#include <libcamera/base/bound_method.h>
namespace libcamera {
@@ -68,4 +68,4 @@ private:
} /* namespace libcamera */
-#endif /* __LIBCAMERA_OBJECT_H__ */
+#endif /* __LIBCAMERA_BASE_OBJECT_H__ */
diff --git a/include/libcamera/internal/semaphore.h b/include/libcamera/base/semaphore.h
index 9dc65d29..c8e62e3e 100644
--- a/include/libcamera/internal/semaphore.h
+++ b/include/libcamera/base/semaphore.h
@@ -4,12 +4,12 @@
*
* semaphore.h - General-purpose counting semaphore
*/
-#ifndef __LIBCAMERA_INTERNAL_SEMAPHORE_H__
-#define __LIBCAMERA_INTERNAL_SEMAPHORE_H__
+#ifndef __LIBCAMERA_BASE_SEMAPHORE_H__
+#define __LIBCAMERA_BASE_SEMAPHORE_H__
#include <condition_variable>
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/thread.h>
namespace libcamera {
@@ -31,4 +31,4 @@ private:
} /* namespace libcamera */
-#endif /* __LIBCAMERA_INTERNAL_SEMAPHORE_H__ */
+#endif /* __LIBCAMERA_BASE_SEMAPHORE_H__ */
diff --git a/include/libcamera/signal.h b/include/libcamera/base/signal.h
index 3233529a..c2521769 100644
--- a/include/libcamera/signal.h
+++ b/include/libcamera/base/signal.h
@@ -4,16 +4,16 @@
*
* signal.h - Signal & slot implementation
*/
-#ifndef __LIBCAMERA_SIGNAL_H__
-#define __LIBCAMERA_SIGNAL_H__
+#ifndef __LIBCAMERA_BASE_SIGNAL_H__
+#define __LIBCAMERA_BASE_SIGNAL_H__
#include <functional>
#include <list>
#include <type_traits>
#include <vector>
-#include <libcamera/bound_method.h>
-#include <libcamera/object.h>
+#include <libcamera/base/bound_method.h>
+#include <libcamera/base/object.h>
namespace libcamera {
@@ -129,4 +129,4 @@ public:
} /* namespace libcamera */
-#endif /* __LIBCAMERA_SIGNAL_H__ */
+#endif /* __LIBCAMERA_BASE_SIGNAL_H__ */
diff --git a/include/libcamera/internal/thread.h b/include/libcamera/base/thread.h
index 9662e28b..2ed18d49 100644
--- a/include/libcamera/internal/thread.h
+++ b/include/libcamera/base/thread.h
@@ -4,20 +4,18 @@
*
* thread.h - Thread support
*/
-#ifndef __LIBCAMERA_INTERNAL_THREAD_H__
-#define __LIBCAMERA_INTERNAL_THREAD_H__
+#ifndef __LIBCAMERA_BASE_THREAD_H__
+#define __LIBCAMERA_BASE_THREAD_H__
#include <memory>
#include <mutex>
#include <sys/types.h>
#include <thread>
-#include <libcamera/signal.h>
-
+#include <libcamera/base/message.h>
+#include <libcamera/base/signal.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/message.h"
-
namespace libcamera {
class EventDispatcher;
@@ -75,4 +73,4 @@ private:
} /* namespace libcamera */
-#endif /* __LIBCAMERA_INTERNAL_THREAD_H__ */
+#endif /* __LIBCAMERA_BASE_THREAD_H__ */
diff --git a/include/libcamera/internal/timer.h b/include/libcamera/base/timer.h
index 013e93c0..e79e85f1 100644
--- a/include/libcamera/internal/timer.h
+++ b/include/libcamera/base/timer.h
@@ -4,14 +4,14 @@
*
* timer.h - Generic timer
*/
-#ifndef __LIBCAMERA_INTERNAL_TIMER_H__
-#define __LIBCAMERA_INTERNAL_TIMER_H__
+#ifndef __LIBCAMERA_BASE_TIMER_H__
+#define __LIBCAMERA_BASE_TIMER_H__
#include <chrono>
#include <stdint.h>
-#include <libcamera/object.h>
-#include <libcamera/signal.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/signal.h>
namespace libcamera {
@@ -46,4 +46,4 @@ private:
} /* namespace libcamera */
-#endif /* __LIBCAMERA_INTERNAL_TIMER_H__ */
+#endif /* __LIBCAMERA_BASE_TIMER_H__ */
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
index ea091400..b081907e 100644
--- a/include/libcamera/camera.h
+++ b/include/libcamera/camera.h
@@ -13,11 +13,11 @@
#include <string>
#include <libcamera/base/class.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/signal.h>
#include <libcamera/controls.h>
-#include <libcamera/object.h>
#include <libcamera/request.h>
-#include <libcamera/signal.h>
#include <libcamera/stream.h>
#include <libcamera/transform.h>
diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h
index 5deede03..744e5a06 100644
--- a/include/libcamera/camera_manager.h
+++ b/include/libcamera/camera_manager.h
@@ -13,9 +13,8 @@
#include <vector>
#include <libcamera/base/class.h>
-
-#include <libcamera/object.h>
-#include <libcamera/signal.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/signal.h>
namespace libcamera {
diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h
index 7bc54061..db12b07e 100644
--- a/include/libcamera/internal/camera_sensor.h
+++ b/include/libcamera/internal/camera_sensor.h
@@ -12,13 +12,13 @@
#include <vector>
#include <libcamera/base/class.h>
+#include <libcamera/base/log.h>
#include <libcamera/controls.h>
#include <libcamera/geometry.h>
#include <libcamera/ipa/core_ipa_interface.h>
#include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/v4l2_subdevice.h"
namespace libcamera {
diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h
index 707cfe8f..222caf75 100644
--- a/include/libcamera/internal/device_enumerator.h
+++ b/include/libcamera/internal/device_enumerator.h
@@ -13,7 +13,7 @@
#include <linux/media.h>
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
namespace libcamera {
diff --git a/include/libcamera/internal/event_notifier.h b/include/libcamera/internal/event_notifier.h
index cc3495c0..8a6419f2 100644
--- a/include/libcamera/internal/event_notifier.h
+++ b/include/libcamera/internal/event_notifier.h
@@ -7,8 +7,8 @@
#ifndef __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
#define __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
-#include <libcamera/object.h>
-#include <libcamera/signal.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/signal.h>
namespace libcamera {
diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h
index 70168acc..76325b1d 100644
--- a/include/libcamera/internal/ipa_data_serializer.h
+++ b/include/libcamera/internal/ipa_data_serializer.h
@@ -14,6 +14,8 @@
#include <type_traits>
#include <vector>
+#include <libcamera/base/log.h>
+
#include <libcamera/buffer.h>
#include <libcamera/control_ids.h>
#include <libcamera/geometry.h>
@@ -22,7 +24,6 @@
#include "libcamera/internal/byte_stream_buffer.h"
#include "libcamera/internal/camera_sensor.h"
#include "libcamera/internal/control_serializer.h"
-#include "libcamera/internal/log.h"
namespace libcamera {
diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h
index e904a2be..34224e33 100644
--- a/include/libcamera/internal/ipa_manager.h
+++ b/include/libcamera/internal/ipa_manager.h
@@ -10,11 +10,12 @@
#include <stdint.h>
#include <vector>
+#include <libcamera/base/log.h>
+
#include <libcamera/ipa/ipa_interface.h>
#include <libcamera/ipa/ipa_module_info.h>
#include "libcamera/internal/ipa_module.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/pipeline_handler.h"
#include "libcamera/internal/pub_key.h"
diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h
index 19fc5827..a87f5650 100644
--- a/include/libcamera/internal/ipa_module.h
+++ b/include/libcamera/internal/ipa_module.h
@@ -11,10 +11,11 @@
#include <string>
#include <vector>
+#include <libcamera/base/log.h>
+
#include <libcamera/ipa/ipa_interface.h>
#include <libcamera/ipa/ipa_module_info.h>
-#include "libcamera/internal/log.h"
#include "libcamera/internal/pipeline_handler.h"
namespace libcamera {
diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h
index c9a84b78..e58de340 100644
--- a/include/libcamera/internal/ipc_pipe.h
+++ b/include/libcamera/internal/ipc_pipe.h
@@ -9,9 +9,9 @@
#include <vector>
-#include "libcamera/internal/ipc_unixsocket.h"
+#include <libcamera/base/signal.h>
-#include <libcamera/signal.h>
+#include "libcamera/internal/ipc_unixsocket.h"
namespace libcamera {
diff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h
index e871b650..9f5b0677 100644
--- a/include/libcamera/internal/ipc_unixsocket.h
+++ b/include/libcamera/internal/ipc_unixsocket.h
@@ -12,7 +12,7 @@
#include <sys/types.h>
#include <vector>
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
namespace libcamera {
diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h
index c3292508..8424611d 100644
--- a/include/libcamera/internal/media_device.h
+++ b/include/libcamera/internal/media_device.h
@@ -14,9 +14,9 @@
#include <linux/media.h>
-#include <libcamera/signal.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_object.h"
namespace libcamera {
diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build
index 1348e926..cf664fc9 100644
--- a/include/libcamera/internal/meson.build
+++ b/include/libcamera/internal/meson.build
@@ -22,8 +22,6 @@ libcamera_internal_headers = files([
'device_enumerator.h',
'device_enumerator_sysfs.h',
'device_enumerator_udev.h',
- 'event_dispatcher.h',
- 'event_dispatcher_poll.h',
'event_notifier.h',
'file.h',
'formats.h',
@@ -31,18 +29,13 @@ libcamera_internal_headers = files([
'ipa_module.h',
'ipa_proxy.h',
'ipc_unixsocket.h',
- 'log.h',
'media_device.h',
'media_object.h',
- 'message.h',
'pipeline_handler.h',
'process.h',
'pub_key.h',
- 'semaphore.h',
'source_paths.h',
'sysfs.h',
- 'thread.h',
- 'timer.h',
'v4l2_device.h',
'v4l2_pixelformat.h',
'v4l2_subdevice.h',
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index 8beb6b76..9e2d65d6 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -16,9 +16,9 @@
#include <vector>
#include <libcamera/base/class.h>
+#include <libcamera/base/object.h>
#include <libcamera/controls.h>
-#include <libcamera/object.h>
#include <libcamera/stream.h>
#include "libcamera/internal/ipa_proxy.h"
diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
index 254cda85..c4d5d9c1 100644
--- a/include/libcamera/internal/process.h
+++ b/include/libcamera/internal/process.h
@@ -11,7 +11,7 @@
#include <string>
#include <vector>
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
namespace libcamera {
diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h
index c318e976..1edd664a 100644
--- a/include/libcamera/internal/v4l2_device.h
+++ b/include/libcamera/internal/v4l2_device.h
@@ -13,12 +13,12 @@
#include <linux/videodev2.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
+
#include <libcamera/controls.h>
-#include <libcamera/signal.h>
#include <libcamera/span.h>
-#include "libcamera/internal/log.h"
-
namespace libcamera {
class EventNotifier;
diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h
index d07dd6b4..97b89fb9 100644
--- a/include/libcamera/internal/v4l2_subdevice.h
+++ b/include/libcamera/internal/v4l2_subdevice.h
@@ -12,11 +12,11 @@
#include <vector>
#include <libcamera/base/class.h>
+#include <libcamera/base/log.h>
#include <libcamera/geometry.h>
#include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/media_object.h"
#include "libcamera/internal/v4l2_device.h"
diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
index 227d015e..a7c3d529 100644
--- a/include/libcamera/internal/v4l2_videodevice.h
+++ b/include/libcamera/internal/v4l2_videodevice.h
@@ -17,14 +17,14 @@
#include <linux/videodev2.h>
#include <libcamera/base/class.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
#include <libcamera/buffer.h>
#include <libcamera/geometry.h>
#include <libcamera/pixel_format.h>
-#include <libcamera/signal.h>
#include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/v4l2_device.h"
#include "libcamera/internal/v4l2_pixelformat.h"
diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
index 4aefaa71..9a15c86b 100644
--- a/include/libcamera/ipa/ipa_interface.h
+++ b/include/libcamera/ipa/ipa_interface.h
@@ -13,10 +13,11 @@
#include <map>
#include <vector>
+#include <libcamera/base/signal.h>
+
#include <libcamera/buffer.h>
#include <libcamera/controls.h>
#include <libcamera/geometry.h>
-#include <libcamera/signal.h>
namespace libcamera {
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index 21a43388..c69d63d2 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: CC0-1.0
libcamera_public_headers = files([
- 'bound_method.h',
'buffer.h',
'camera.h',
'camera_manager.h',
@@ -11,10 +10,8 @@ libcamera_public_headers = files([
'framebuffer_allocator.h',
'geometry.h',
'logging.h',
- 'object.h',
'pixel_format.h',
'request.h',
- 'signal.h',
'span.h',
'stream.h',
'transform.h',
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index 00c646fe..2d361c9d 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -14,9 +14,9 @@
#include <unordered_set>
#include <libcamera/base/class.h>
+#include <libcamera/base/signal.h>
#include <libcamera/controls.h>
-#include <libcamera/signal.h>
namespace libcamera {
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"
diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp
index 61f4eb92..c504ea09 100644
--- a/test/camera/buffer_import.cpp
+++ b/test/camera/buffer_import.cpp
@@ -12,11 +12,12 @@
#include <numeric>
#include <vector>
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
#include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/event_dispatcher.h"
#include "libcamera/internal/media_device.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
#include "libcamera/internal/v4l2_videodevice.h"
#include "buffer_source.h"
diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp
index c4bc2110..238d98db 100644
--- a/test/camera/capture.cpp
+++ b/test/camera/capture.cpp
@@ -9,9 +9,9 @@
#include <libcamera/framebuffer_allocator.h>
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
#include "camera_test.h"
#include "test.h"
diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp
index 8ae05ac6..1cc17b04 100644
--- a/test/event-dispatcher.cpp
+++ b/test/event-dispatcher.cpp
@@ -10,9 +10,9 @@
#include <signal.h>
#include <sys/time.h>
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
#include "test.h"
diff --git a/test/event-thread.cpp b/test/event-thread.cpp
index aeb8b3bf..05c5d26d 100644
--- a/test/event-thread.cpp
+++ b/test/event-thread.cpp
@@ -10,9 +10,10 @@
#include <string.h>
#include <unistd.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
#include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
#include "test.h"
diff --git a/test/event.cpp b/test/event.cpp
index 1f16c97b..aa79da99 100644
--- a/test/event.cpp
+++ b/test/event.cpp
@@ -9,10 +9,11 @@
#include <string.h>
#include <unistd.h>
-#include "libcamera/internal/event_dispatcher.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
#include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
#include "test.h"
diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp
index 94cb8593..bb160537 100644
--- a/test/hotplug-cameras.cpp
+++ b/test/hotplug-cameras.cpp
@@ -14,10 +14,11 @@
#include <libcamera/camera.h>
#include <libcamera/camera_manager.h>
-#include "libcamera/internal/event_dispatcher.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
#include "libcamera/internal/file.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
#include "test.h"
diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp
index d6ca6f51..656d8655 100644
--- a/test/ipa/ipa_interface_test.cpp
+++ b/test/ipa/ipa_interface_test.cpp
@@ -14,15 +14,16 @@
#include <libcamera/ipa/vimc_ipa_proxy.h>
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
#include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/event_dispatcher.h"
#include "libcamera/internal/event_notifier.h"
#include "libcamera/internal/ipa_manager.h"
#include "libcamera/internal/ipa_module.h"
#include "libcamera/internal/pipeline_handler.h"
#include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
#include "test.h"
diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp
index 80157b34..aa35c8f0 100644
--- a/test/ipc/unixsocket.cpp
+++ b/test/ipc/unixsocket.cpp
@@ -16,10 +16,11 @@
#include <sys/wait.h>
#include <unistd.h>
-#include "libcamera/internal/event_dispatcher.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
#include "libcamera/internal/ipc_unixsocket.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
#include "test.h"
diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp
index 161d09b9..6fe7fd9b 100644
--- a/test/ipc/unixsocket_ipc.cpp
+++ b/test/ipc/unixsocket_ipc.cpp
@@ -15,19 +15,18 @@
#include <sys/wait.h>
#include <unistd.h>
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/event_dispatcher.h"
#include "libcamera/internal/ipa_data_serializer.h"
#include "libcamera/internal/ipc_pipe.h"
#include "libcamera/internal/ipc_pipe_unixsocket.h"
#include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
#include "test.h"
-
using namespace std;
using namespace libcamera;
diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp
index ae3c607a..53118960 100644
--- a/test/log/log_api.cpp
+++ b/test/log/log_api.cpp
@@ -16,9 +16,9 @@
#include <sys/types.h>
#include <unistd.h>
-#include <libcamera/logging.h>
+#include <libcamera/base/log.h>
-#include "libcamera/internal/log.h"
+#include <libcamera/logging.h>
#include "test.h"
diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp
index 413d9207..d138aa7f 100644
--- a/test/log/log_process.cpp
+++ b/test/log/log_process.cpp
@@ -16,13 +16,13 @@
#include <libcamera/logging.h>
+#include <libcamera/base/event_dispatcher.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_dispatcher.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
#include "test.h"
diff --git a/test/message.cpp b/test/message.cpp
index 9553ba8c..eeea57fe 100644
--- a/test/message.cpp
+++ b/test/message.cpp
@@ -9,8 +9,8 @@
#include <iostream>
#include <thread>
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/message.h>
+#include <libcamera/base/thread.h>
#include "test.h"
diff --git a/test/object-delete.cpp b/test/object-delete.cpp
index a1a6f5cc..eabefe93 100644
--- a/test/object-delete.cpp
+++ b/test/object-delete.cpp
@@ -7,9 +7,8 @@
#include <iostream>
-#include <libcamera/object.h>
-
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/object.h>
+#include <libcamera/base/thread.h>
#include "test.h"
diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp
index a6f816f3..b1c0f473 100644
--- a/test/object-invoke.cpp
+++ b/test/object-invoke.cpp
@@ -8,10 +8,9 @@
#include <iostream>
#include <thread>
-#include <libcamera/object.h>
-
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/thread.h>
#include "test.h"
diff --git a/test/object.cpp b/test/object.cpp
index 264659b4..cbd0d3ec 100644
--- a/test/object.cpp
+++ b/test/object.cpp
@@ -7,10 +7,9 @@
#include <iostream>
-#include <libcamera/object.h>
-
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/message.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/thread.h>
#include "test.h"
diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp
index a5155bae..8f7a1f05 100644
--- a/test/process/process_test.cpp
+++ b/test/process/process_test.cpp
@@ -9,12 +9,13 @@
#include <unistd.h>
#include <vector>
+
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/event_dispatcher.h"
#include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
#include "test.h"
diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp
index dbbba891..880bcd02 100644
--- a/test/serialization/ipa_data_serializer_test.cpp
+++ b/test/serialization/ipa_data_serializer_test.cpp
@@ -17,13 +17,14 @@
#include <unistd.h>
#include <vector>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/ipa_data_serializer.h"
#include "libcamera/internal/ipa_manager.h"
#include "libcamera/internal/ipa_module.h"
#include "libcamera/internal/pipeline_handler.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
#include "serialization_test.h"
#include "test.h"
diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp
index 8a96b5d2..d5e2eb66 100644
--- a/test/signal-threads.cpp
+++ b/test/signal-threads.cpp
@@ -9,11 +9,10 @@
#include <iostream>
#include <thread>
+#include <libcamera/base/message.h>
+#include <libcamera/base/thread.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
-
#include "test.h"
using namespace std;
diff --git a/test/signal.cpp b/test/signal.cpp
index f83ceb05..aceb0278 100644
--- a/test/signal.cpp
+++ b/test/signal.cpp
@@ -8,8 +8,8 @@
#include <iostream>
#include <string.h>
-#include <libcamera/object.h>
-#include <libcamera/signal.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/signal.h>
#include "test.h"
diff --git a/test/threads.cpp b/test/threads.cpp
index e0c50dc9..d83b5833 100644
--- a/test/threads.cpp
+++ b/test/threads.cpp
@@ -10,7 +10,7 @@
#include <memory>
#include <thread>
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/thread.h>
#include "test.h"
diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp
index be29eee1..2c14865b 100644
--- a/test/timer-thread.cpp
+++ b/test/timer-thread.cpp
@@ -8,9 +8,9 @@
#include <chrono>
#include <iostream>
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
#include "test.h"
diff --git a/test/timer.cpp b/test/timer.cpp
index fc90b110..88f226e7 100644
--- a/test/timer.cpp
+++ b/test/timer.cpp
@@ -8,9 +8,9 @@
#include <chrono>
#include <iostream>
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
#include "test.h"
diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp
index c75259be..91b3e4a0 100644
--- a/test/v4l2_videodevice/buffer_sharing.cpp
+++ b/test/v4l2_videodevice/buffer_sharing.cpp
@@ -14,9 +14,9 @@
#include <libcamera/buffer.h>
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
#include "v4l2_videodevice_test.h"
diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp
index accdb34a..f12c8bef 100644
--- a/test/v4l2_videodevice/capture_async.cpp
+++ b/test/v4l2_videodevice/capture_async.cpp
@@ -9,9 +9,9 @@
#include <libcamera/buffer.h>
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
#include "v4l2_videodevice_test.h"
diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
index e0f06808..fe4b3cc6 100644
--- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp
+++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
@@ -9,11 +9,12 @@
#include <libcamera/buffer.h>
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
#include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/event_dispatcher.h"
#include "libcamera/internal/media_device.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
#include "libcamera/internal/v4l2_videodevice.h"
#include "test.h"
diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
index dc674815..5a64fe9c 100644
--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
@@ -23,6 +23,9 @@
#include <libcamera/ipa/{{module_name}}_ipa_interface.h>
#include <libcamera/ipa/{{module_name}}_ipa_serializer.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+
#include "libcamera/internal/control_serializer.h"
#include "libcamera/internal/ipa_data_serializer.h"
#include "libcamera/internal/ipa_module.h"
@@ -30,9 +33,7 @@
#include "libcamera/internal/ipc_pipe.h"
#include "libcamera/internal/ipc_pipe_unixsocket.h"
#include "libcamera/internal/ipc_unixsocket.h"
-#include "libcamera/internal/log.h"
#include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
namespace libcamera {
diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
index 017b870c..ae168548 100644
--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
@@ -19,12 +19,13 @@
#include <libcamera/ipa/ipa_interface.h>
#include <libcamera/ipa/{{module_name}}_ipa_interface.h>
+#include <libcamera/base/thread.h>
+
#include "libcamera/internal/control_serializer.h"
#include "libcamera/internal/ipa_proxy.h"
#include "libcamera/internal/ipc_pipe.h"
#include "libcamera/internal/ipc_pipe_unixsocket.h"
#include "libcamera/internal/ipc_unixsocket.h"
-#include "libcamera/internal/thread.h"
namespace libcamera {
{%- if has_namespace %}
diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
index 8a57b6cc..d993e39e 100644
--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
@@ -26,17 +26,18 @@
#include <libcamera/ipa/{{module_name}}_ipa_serializer.h>
#include <libcamera/logging.h>
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/log.h>
+
#include "libcamera/internal/camera_sensor.h"
#include "libcamera/internal/control_serializer.h"
-#include "libcamera/internal/event_dispatcher.h"
#include "libcamera/internal/ipa_data_serializer.h"
#include "libcamera/internal/ipa_module.h"
#include "libcamera/internal/ipa_proxy.h"
#include "libcamera/internal/ipc_pipe.h"
#include "libcamera/internal/ipc_pipe_unixsocket.h"
#include "libcamera/internal/ipc_unixsocket.h"
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/thread.h"
using namespace libcamera;