[{"id":17760,"web_url":"https://patchwork.libcamera.org/comment/17760/","msgid":"<CAO5uPHPhjGvgTd7Biu-M5WPpAtQbfkZFd-7cUndek_X+uYMwaQ@mail.gmail.com>","date":"2021-06-25T03:44:08","subject":"Re: [libcamera-devel] [PATCH 09/16] libcamera/base: Move extended\n\tbase functionality","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"/Hs/i Kieran, thank you for the patch.\n\nOn Fri, Jun 25, 2021 at 10:35 AM Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Move the functionality for the following components to the new\n> base support library:\n>\n>  - BoundMethod\n>  - EventDispatcher\n>  - EventDispatcherPoll\n>  - Log\n>  - Message\n>  - Object\n>  - Signal\n>  - Semaphore\n>  - Thread\n>  - Timer\n>\n> While it would be preferable to see these split to move one component\n> per commit, these components are all interdependant upon each other,\n\ns/interdependantinterdependent/\n> which leaves us with one big change performing the move for all of them.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n\n> ---\n>  Documentation/guides/pipeline-handler.rst        |  3 ++-\n>  include/libcamera/{ => base}/bound_method.h      |  6 +++---\n>  .../{internal => base}/event_dispatcher.h        |  6 +++---\n>  .../{internal => base}/event_dispatcher_poll.h   |  8 ++++----\n>  include/libcamera/{internal => base}/log.h       |  6 +++---\n>  include/libcamera/base/meson.build               | 10 ++++++++++\n>  include/libcamera/{internal => base}/message.h   |  8 ++++----\n>  include/libcamera/{ => base}/object.h            |  8 ++++----\n>  include/libcamera/{internal => base}/semaphore.h |  8 ++++----\n>  include/libcamera/{ => base}/signal.h            | 10 +++++-----\n>  include/libcamera/{internal => base}/thread.h    | 12 +++++-------\n>  include/libcamera/{internal => base}/timer.h     | 10 +++++-----\n>  include/libcamera/camera.h                       |  4 ++--\n>  include/libcamera/camera_manager.h               |  5 ++---\n>  include/libcamera/internal/camera_sensor.h       |  2 +-\n>  include/libcamera/internal/device_enumerator.h   |  2 +-\n>  include/libcamera/internal/event_notifier.h      |  4 ++--\n>  include/libcamera/internal/ipa_data_serializer.h |  3 ++-\n>  include/libcamera/internal/ipa_manager.h         |  3 ++-\n>  include/libcamera/internal/ipa_module.h          |  3 ++-\n>  include/libcamera/internal/ipc_pipe.h            |  4 ++--\n>  include/libcamera/internal/ipc_unixsocket.h      |  2 +-\n>  include/libcamera/internal/media_device.h        |  4 ++--\n>  include/libcamera/internal/meson.build           |  7 -------\n>  include/libcamera/internal/pipeline_handler.h    |  2 +-\n>  include/libcamera/internal/process.h             |  2 +-\n>  include/libcamera/internal/v4l2_device.h         |  6 +++---\n>  include/libcamera/internal/v4l2_subdevice.h      |  2 +-\n>  include/libcamera/internal/v4l2_videodevice.h    |  4 ++--\n>  include/libcamera/ipa/ipa_interface.h            |  3 ++-\n>  include/libcamera/meson.build                    |  3 ---\n>  include/libcamera/request.h                      |  2 +-\n>  src/android/camera3_hal.cpp                      |  2 +-\n>  src/android/camera_capabilities.cpp              |  3 ++-\n>  src/android/camera_device.cpp                    |  9 ++++-----\n>  src/android/camera_device.h                      |  7 ++++---\n>  src/android/camera_hal_config.cpp                |  2 +-\n>  src/android/camera_hal_manager.cpp               |  4 ++--\n>  src/android/camera_metadata.cpp                  |  2 +-\n>  src/android/camera_worker.h                      |  6 +++---\n>  src/android/jpeg/encoder_libjpeg.cpp             |  3 ++-\n>  src/android/jpeg/exif.cpp                        |  3 +--\n>  src/android/jpeg/post_processor_jpeg.cpp         |  4 ++--\n>  src/android/jpeg/thumbnailer.cpp                 |  4 ++--\n>  src/android/mm/cros_camera_buffer.cpp            |  2 +-\n>  src/android/mm/generic_camera_buffer.cpp         |  3 ++-\n>  src/android/yuv/post_processor_yuv.cpp           |  3 ++-\n>  src/ipa/ipu3/ipu3.cpp                            |  3 ++-\n>  src/ipa/ipu3/ipu3_agc.cpp                        |  4 ++--\n>  src/ipa/ipu3/ipu3_awb.cpp                        |  2 +-\n>  src/ipa/libipa/histogram.cpp                     |  2 +-\n>  src/ipa/raspberrypi/cam_helper.hpp               |  4 ++--\n>  src/ipa/raspberrypi/controller/controller.cpp    |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/agc.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/alsc.cpp      |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/awb.cpp       |  2 +-\n>  .../raspberrypi/controller/rpi/black_level.cpp   |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/ccm.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/contrast.cpp  |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/dpc.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/focus.cpp     |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/geq.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/lux.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/noise.cpp     |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/sdn.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/sharpen.cpp   |  2 +-\n>  src/ipa/raspberrypi/raspberrypi.cpp              |  7 ++++---\n>  src/ipa/rkisp1/rkisp1.cpp                        |  4 ++--\n>  src/ipa/vimc/vimc.cpp                            |  3 ++-\n>  src/libcamera/{ => base}/bound_method.cpp        | 11 +++++------\n>  src/libcamera/{ => base}/event_dispatcher.cpp    |  7 +++----\n>  .../{ => base}/event_dispatcher_poll.cpp         | 10 +++++-----\n>  src/libcamera/{ => base}/log.cpp                 |  7 +++----\n>  src/libcamera/base/meson.build                   | 11 +++++++++++\n>  src/libcamera/{ => base}/message.cpp             |  9 ++++-----\n>  src/libcamera/{ => base}/object.cpp              | 16 +++++++---------\n>  src/libcamera/{ => base}/semaphore.cpp           |  6 +++---\n>  src/libcamera/{ => base}/signal.cpp              |  6 +++---\n>  src/libcamera/{ => base}/thread.cpp              | 12 ++++++------\n>  src/libcamera/{ => base}/timer.cpp               | 15 +++++++--------\n>  src/libcamera/buffer.cpp                         |  2 +-\n>  src/libcamera/byte_stream_buffer.cpp             |  2 +-\n>  src/libcamera/camera.cpp                         |  5 +++--\n>  src/libcamera/camera_manager.cpp                 |  5 +++--\n>  src/libcamera/camera_sensor_properties.cpp       |  4 ++--\n>  src/libcamera/control_serializer.cpp             |  3 ++-\n>  src/libcamera/controls.cpp                       |  2 +-\n>  src/libcamera/delayed_controls.cpp               |  3 ++-\n>  src/libcamera/device_enumerator.cpp              |  3 ++-\n>  src/libcamera/device_enumerator_sysfs.cpp        |  3 ++-\n>  src/libcamera/device_enumerator_udev.cpp         |  3 ++-\n>  src/libcamera/event_notifier.cpp                 |  6 +++---\n>  src/libcamera/file.cpp                           |  2 +-\n>  src/libcamera/file_descriptor.cpp                |  2 +-\n>  src/libcamera/formats.cpp                        |  2 +-\n>  src/libcamera/framebuffer_allocator.cpp          |  3 ++-\n>  src/libcamera/geometry.cpp                       |  2 +-\n>  src/libcamera/ipa_data_serializer.cpp            |  2 +-\n>  src/libcamera/ipa_manager.cpp                    |  2 +-\n>  src/libcamera/ipa_module.cpp                     |  2 +-\n>  src/libcamera/ipa_proxy.cpp                      |  2 +-\n>  src/libcamera/ipc_pipe.cpp                       |  2 +-\n>  src/libcamera/ipc_pipe_unixsocket.cpp            |  9 +++++----\n>  src/libcamera/ipc_unixsocket.cpp                 |  3 ++-\n>  src/libcamera/media_device.cpp                   |  2 +-\n>  src/libcamera/media_object.cpp                   |  3 ++-\n>  src/libcamera/meson.build                        | 11 -----------\n>  src/libcamera/pipeline/ipu3/cio2.h               |  2 +-\n>  src/libcamera/pipeline/ipu3/frames.h             |  2 +-\n>  src/libcamera/pipeline/ipu3/imgu.cpp             |  6 +++---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp             |  6 +++---\n>  src/libcamera/pipeline/raspberrypi/dma_heaps.cpp |  2 +-\n>  .../pipeline/raspberrypi/rpi_stream.cpp          |  4 ++--\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp         |  6 +++---\n>  src/libcamera/pipeline/rkisp1/rkisp1_path.h      |  3 ++-\n>  src/libcamera/pipeline/simple/converter.cpp      |  8 ++++----\n>  src/libcamera/pipeline/simple/converter.h        |  4 ++--\n>  src/libcamera/pipeline/simple/simple.cpp         |  3 ++-\n>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp     |  6 +++---\n>  src/libcamera/pipeline/vimc/vimc.cpp             |  8 +++++---\n>  src/libcamera/pipeline_handler.cpp               |  6 +++---\n>  src/libcamera/process.cpp                        |  2 +-\n>  src/libcamera/request.cpp                        |  3 ++-\n>  src/libcamera/stream.cpp                         |  2 +-\n>  src/libcamera/sysfs.cpp                          |  3 ++-\n>  src/libcamera/v4l2_device.cpp                    |  2 +-\n>  src/libcamera/v4l2_pixelformat.cpp               |  3 ++-\n>  src/libcamera/v4l2_subdevice.cpp                 |  2 +-\n>  src/libcamera/v4l2_videodevice.cpp               |  3 ++-\n>  src/v4l2/v4l2_camera.cpp                         |  2 +-\n>  src/v4l2/v4l2_camera.h                           |  4 ++--\n>  src/v4l2/v4l2_camera_proxy.cpp                   |  4 ++--\n>  src/v4l2/v4l2_compat_manager.cpp                 |  7 +++----\n>  test/camera/buffer_import.cpp                    |  7 ++++---\n>  test/camera/capture.cpp                          |  6 +++---\n>  test/event-dispatcher.cpp                        |  6 +++---\n>  test/event-thread.cpp                            |  5 +++--\n>  test/event.cpp                                   |  7 ++++---\n>  test/hotplug-cameras.cpp                         |  7 ++++---\n>  test/ipa/ipa_interface_test.cpp                  |  7 ++++---\n>  test/ipc/unixsocket.cpp                          |  7 ++++---\n>  test/ipc/unixsocket_ipc.cpp                      |  7 +++----\n>  test/log/log_api.cpp                             |  4 ++--\n>  test/log/log_process.cpp                         |  8 ++++----\n>  test/message.cpp                                 |  4 ++--\n>  test/object-delete.cpp                           |  5 ++---\n>  test/object-invoke.cpp                           |  7 +++----\n>  test/object.cpp                                  |  7 +++----\n>  test/process/process_test.cpp                    |  7 ++++---\n>  test/serialization/ipa_data_serializer_test.cpp  |  5 +++--\n>  test/signal-threads.cpp                          |  5 ++---\n>  test/signal.cpp                                  |  4 ++--\n>  test/threads.cpp                                 |  2 +-\n>  test/timer-thread.cpp                            |  6 +++---\n>  test/timer.cpp                                   |  6 +++---\n>  test/v4l2_videodevice/buffer_sharing.cpp         |  6 +++---\n>  test/v4l2_videodevice/capture_async.cpp          |  6 +++---\n>  test/v4l2_videodevice/v4l2_m2mdevice.cpp         |  7 ++++---\n>  .../module_ipa_proxy.cpp.tmpl                    |  5 +++--\n>  .../libcamera_templates/module_ipa_proxy.h.tmpl  |  3 ++-\n>  .../module_ipa_proxy_worker.cpp.tmpl             |  7 ++++---\n>  161 files changed, 384 insertions(+), 358 deletions(-)\n>  rename include/libcamera/{ => base}/bound_method.h (97%)\n>  rename include/libcamera/{internal => base}/event_dispatcher.h (79%)\n>  rename include/libcamera/{internal => base}/event_dispatcher_poll.h (82%)\n>  rename include/libcamera/{internal => base}/log.h (96%)\n>  rename include/libcamera/{internal => base}/message.h (87%)\n>  rename include/libcamera/{ => base}/object.h (89%)\n>  rename include/libcamera/{internal => base}/semaphore.h (74%)\n>  rename include/libcamera/{ => base}/signal.h (93%)\n>  rename include/libcamera/{internal => base}/thread.h (86%)\n>  rename include/libcamera/{internal => base}/timer.h (81%)\n>  rename src/libcamera/{ => base}/bound_method.cpp (94%)\n>  rename src/libcamera/{ => base}/event_dispatcher.cpp (97%)\n>  rename src/libcamera/{ => base}/event_dispatcher_poll.cpp (97%)\n>  rename src/libcamera/{ => base}/log.cpp (99%)\n>  rename src/libcamera/{ => base}/message.cpp (96%)\n>  rename src/libcamera/{ => base}/object.cpp (97%)\n>  rename src/libcamera/{ => base}/semaphore.cpp (96%)\n>  rename src/libcamera/{ => base}/signal.cpp (98%)\n>  rename src/libcamera/{ => base}/thread.cpp (98%)\n>  rename src/libcamera/{ => base}/timer.cpp (94%)\n>\n> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst\n> index 3047e006e5b6..152776935a33 100644\n> --- a/Documentation/guides/pipeline-handler.rst\n> +++ b/Documentation/guides/pipeline-handler.rst\n> @@ -288,7 +288,8 @@ features:\n>\n>  .. code-block:: cpp\n>\n> -   #include \"libcamera/internal/log.h\"\n> +   #include <libcamera/base/log.h>\n> +\n>     #include \"libcamera/internal/pipeline_handler.h\"\n>\n>  Run the following commands:\n> diff --git a/include/libcamera/bound_method.h b/include/libcamera/base/bound_method.h\n> similarity index 97%\n> rename from include/libcamera/bound_method.h\n> rename to include/libcamera/base/bound_method.h\n> index 4fc445ecd191..282f9b58ab60 100644\n> --- a/include/libcamera/bound_method.h\n> +++ b/include/libcamera/base/bound_method.h\n> @@ -4,8 +4,8 @@\n>   *\n>   * bound_method.h - Method bind and invocation\n>   */\n> -#ifndef __LIBCAMERA_BOUND_METHOD_H__\n> -#define __LIBCAMERA_BOUND_METHOD_H__\n> +#ifndef __LIBCAMERA_BASE_BOUND_METHOD_H__\n> +#define __LIBCAMERA_BASE_BOUND_METHOD_H__\n>\n>  #include <memory>\n>  #include <tuple>\n> @@ -236,4 +236,4 @@ private:\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_BOUND_METHOD_H__ */\n> +#endif /* __LIBCAMERA_BASE_BOUND_METHOD_H__ */\n> diff --git a/include/libcamera/internal/event_dispatcher.h b/include/libcamera/base/event_dispatcher.h\n> similarity index 79%\n> rename from include/libcamera/internal/event_dispatcher.h\n> rename to include/libcamera/base/event_dispatcher.h\n> index e6a8ad65ce0a..045df27fff16 100644\n> --- a/include/libcamera/internal/event_dispatcher.h\n> +++ b/include/libcamera/base/event_dispatcher.h\n> @@ -4,8 +4,8 @@\n>   *\n>   * event_dispatcher.h - Event dispatcher\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__\n> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__\n> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_H__\n> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_H__\n>\n>  #include <vector>\n>\n> @@ -32,4 +32,4 @@ public:\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__ */\n> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_H__ */\n> diff --git a/include/libcamera/internal/event_dispatcher_poll.h b/include/libcamera/base/event_dispatcher_poll.h\n> similarity index 82%\n> rename from include/libcamera/internal/event_dispatcher_poll.h\n> rename to include/libcamera/base/event_dispatcher_poll.h\n> index 33de051de261..ae2a3f04e4b9 100644\n> --- a/include/libcamera/internal/event_dispatcher_poll.h\n> +++ b/include/libcamera/base/event_dispatcher_poll.h\n> @@ -4,14 +4,14 @@\n>   *\n>   * event_dispatcher_poll.h - Poll-based event dispatcher\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__\n> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__\n> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__\n> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__\n>\n>  #include <list>\n>  #include <map>\n>  #include <vector>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n>\n>  struct pollfd;\n>\n> @@ -55,4 +55,4 @@ private:\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__ */\n> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__ */\n> diff --git a/include/libcamera/internal/log.h b/include/libcamera/base/log.h\n> similarity index 96%\n> rename from include/libcamera/internal/log.h\n> rename to include/libcamera/base/log.h\n> index 82e55a623e04..b93c947ae7db 100644\n> --- a/include/libcamera/internal/log.h\n> +++ b/include/libcamera/base/log.h\n> @@ -4,8 +4,8 @@\n>   *\n>   * log.h - Logging infrastructure\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_LOG_H__\n> -#define __LIBCAMERA_INTERNAL_LOG_H__\n> +#ifndef __LIBCAMERA_BASE_LOG_H__\n> +#define __LIBCAMERA_BASE_LOG_H__\n>\n>  #include <chrono>\n>  #include <sstream>\n> @@ -127,4 +127,4 @@ LogMessage _log(const LogCategory *category, LogSeverity severity,\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_INTERNAL_LOG_H__ */\n> +#endif /* __LIBCAMERA_BASE_LOG_H__ */\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index 2db756c504c9..7a858dcb6f1a 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -3,7 +3,17 @@\n>  libcamera_base_include_dir = libcamera_include_dir / 'base'\n>\n>  libcamera_base_headers = files([\n> +    'bound_method.h',\n>      'class.h',\n> +    'event_dispatcher.h',\n> +    'event_dispatcher_poll.h',\n> +    'log.h',\n> +    'message.h',\n> +    'object.h',\n> +    'semaphore.h',\n> +    'signal.h',\n> +    'thread.h',\n> +    'timer.h',\n>      'utils.h',\n>  ])\n>\n> diff --git a/include/libcamera/internal/message.h b/include/libcamera/base/message.h\n> similarity index 87%\n> rename from include/libcamera/internal/message.h\n> rename to include/libcamera/base/message.h\n> index f1b133bfb2ba..5d2a9f04f0a7 100644\n> --- a/include/libcamera/internal/message.h\n> +++ b/include/libcamera/base/message.h\n> @@ -4,12 +4,12 @@\n>   *\n>   * message.h - Message queue support\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_MESSAGE_H__\n> -#define __LIBCAMERA_INTERNAL_MESSAGE_H__\n> +#ifndef __LIBCAMERA_BASE_MESSAGE_H__\n> +#define __LIBCAMERA_BASE_MESSAGE_H__\n>\n>  #include <atomic>\n>\n> -#include <libcamera/bound_method.h>\n> +#include <libcamera/base/bound_method.h>\n>\n>  namespace libcamera {\n>\n> @@ -68,4 +68,4 @@ private:\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_INTERNAL_MESSAGE_H__ */\n> +#endif /* __LIBCAMERA_BASE_MESSAGE_H__ */\n> diff --git a/include/libcamera/object.h b/include/libcamera/base/object.h\n> similarity index 89%\n> rename from include/libcamera/object.h\n> rename to include/libcamera/base/object.h\n> index a1882f05fb77..5c385ab4b140 100644\n> --- a/include/libcamera/object.h\n> +++ b/include/libcamera/base/object.h\n> @@ -4,14 +4,14 @@\n>   *\n>   * object.h - Base object\n>   */\n> -#ifndef __LIBCAMERA_OBJECT_H__\n> -#define __LIBCAMERA_OBJECT_H__\n> +#ifndef __LIBCAMERA_BASE_OBJECT_H__\n> +#define __LIBCAMERA_BASE_OBJECT_H__\n>\n>  #include <list>\n>  #include <memory>\n>  #include <vector>\n>\n> -#include <libcamera/bound_method.h>\n> +#include <libcamera/base/bound_method.h>\n>\n>  namespace libcamera {\n>\n> @@ -68,4 +68,4 @@ private:\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_OBJECT_H__ */\n> +#endif /* __LIBCAMERA_BASE_OBJECT_H__ */\n> diff --git a/include/libcamera/internal/semaphore.h b/include/libcamera/base/semaphore.h\n> similarity index 74%\n> rename from include/libcamera/internal/semaphore.h\n> rename to include/libcamera/base/semaphore.h\n> index 9dc65d299cfd..c8e62e3ee68b 100644\n> --- a/include/libcamera/internal/semaphore.h\n> +++ b/include/libcamera/base/semaphore.h\n> @@ -4,12 +4,12 @@\n>   *\n>   * semaphore.h - General-purpose counting semaphore\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_SEMAPHORE_H__\n> -#define __LIBCAMERA_INTERNAL_SEMAPHORE_H__\n> +#ifndef __LIBCAMERA_BASE_SEMAPHORE_H__\n> +#define __LIBCAMERA_BASE_SEMAPHORE_H__\n>\n>  #include <condition_variable>\n>\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/thread.h>\n>\n>  namespace libcamera {\n>\n> @@ -31,4 +31,4 @@ private:\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_INTERNAL_SEMAPHORE_H__ */\n> +#endif /* __LIBCAMERA_BASE_SEMAPHORE_H__ */\n> diff --git a/include/libcamera/signal.h b/include/libcamera/base/signal.h\n> similarity index 93%\n> rename from include/libcamera/signal.h\n> rename to include/libcamera/base/signal.h\n> index 3233529a1275..c2521769a843 100644\n> --- a/include/libcamera/signal.h\n> +++ b/include/libcamera/base/signal.h\n> @@ -4,16 +4,16 @@\n>   *\n>   * signal.h - Signal & slot implementation\n>   */\n> -#ifndef __LIBCAMERA_SIGNAL_H__\n> -#define __LIBCAMERA_SIGNAL_H__\n> +#ifndef __LIBCAMERA_BASE_SIGNAL_H__\n> +#define __LIBCAMERA_BASE_SIGNAL_H__\n>\n>  #include <functional>\n>  #include <list>\n>  #include <type_traits>\n>  #include <vector>\n>\n> -#include <libcamera/bound_method.h>\n> -#include <libcamera/object.h>\n> +#include <libcamera/base/bound_method.h>\n> +#include <libcamera/base/object.h>\n>\n>  namespace libcamera {\n>\n> @@ -129,4 +129,4 @@ public:\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_SIGNAL_H__ */\n> +#endif /* __LIBCAMERA_BASE_SIGNAL_H__ */\n> diff --git a/include/libcamera/internal/thread.h b/include/libcamera/base/thread.h\n> similarity index 86%\n> rename from include/libcamera/internal/thread.h\n> rename to include/libcamera/base/thread.h\n> index 9662e28bb581..2ed18d49c978 100644\n> --- a/include/libcamera/internal/thread.h\n> +++ b/include/libcamera/base/thread.h\n> @@ -4,20 +4,18 @@\n>   *\n>   * thread.h - Thread support\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_THREAD_H__\n> -#define __LIBCAMERA_INTERNAL_THREAD_H__\n> +#ifndef __LIBCAMERA_BASE_THREAD_H__\n> +#define __LIBCAMERA_BASE_THREAD_H__\n>\n>  #include <memory>\n>  #include <mutex>\n>  #include <sys/types.h>\n>  #include <thread>\n>\n> -#include <libcamera/signal.h>\n> -\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/signal.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/message.h\"\n> -\n>  namespace libcamera {\n>\n>  class EventDispatcher;\n> @@ -75,4 +73,4 @@ private:\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_INTERNAL_THREAD_H__ */\n> +#endif /* __LIBCAMERA_BASE_THREAD_H__ */\n> diff --git a/include/libcamera/internal/timer.h b/include/libcamera/base/timer.h\n> similarity index 81%\n> rename from include/libcamera/internal/timer.h\n> rename to include/libcamera/base/timer.h\n> index 013e93c0b4e6..e79e85f1ef0d 100644\n> --- a/include/libcamera/internal/timer.h\n> +++ b/include/libcamera/base/timer.h\n> @@ -4,14 +4,14 @@\n>   *\n>   * timer.h - Generic timer\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_TIMER_H__\n> -#define __LIBCAMERA_INTERNAL_TIMER_H__\n> +#ifndef __LIBCAMERA_BASE_TIMER_H__\n> +#define __LIBCAMERA_BASE_TIMER_H__\n>\n>  #include <chrono>\n>  #include <stdint.h>\n>\n> -#include <libcamera/object.h>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/signal.h>\n>\n>  namespace libcamera {\n>\n> @@ -46,4 +46,4 @@ private:\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_INTERNAL_TIMER_H__ */\n> +#endif /* __LIBCAMERA_BASE_TIMER_H__ */\n> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> index ea0914009c2b..b081907e0cb1 100644\n> --- a/include/libcamera/camera.h\n> +++ b/include/libcamera/camera.h\n> @@ -13,11 +13,11 @@\n>  #include <string>\n>\n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/signal.h>\n>\n>  #include <libcamera/controls.h>\n> -#include <libcamera/object.h>\n>  #include <libcamera/request.h>\n> -#include <libcamera/signal.h>\n>  #include <libcamera/stream.h>\n>  #include <libcamera/transform.h>\n>\n> diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h\n> index 5deede035115..744e5a06c78c 100644\n> --- a/include/libcamera/camera_manager.h\n> +++ b/include/libcamera/camera_manager.h\n> @@ -13,9 +13,8 @@\n>  #include <vector>\n>\n>  #include <libcamera/base/class.h>\n> -\n> -#include <libcamera/object.h>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/signal.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n> index 7bc540619721..db12b07ee8cc 100644\n> --- a/include/libcamera/internal/camera_sensor.h\n> +++ b/include/libcamera/internal/camera_sensor.h\n> @@ -12,13 +12,13 @@\n>  #include <vector>\n>\n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/log.h>\n>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/ipa/core_ipa_interface.h>\n>\n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>\n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h\n> index 707cfe8f309d..222caf75a0db 100644\n> --- a/include/libcamera/internal/device_enumerator.h\n> +++ b/include/libcamera/internal/device_enumerator.h\n> @@ -13,7 +13,7 @@\n>\n>  #include <linux/media.h>\n>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/include/libcamera/internal/event_notifier.h b/include/libcamera/internal/event_notifier.h\n> index cc3495c024f0..8a6419f23004 100644\n> --- a/include/libcamera/internal/event_notifier.h\n> +++ b/include/libcamera/internal/event_notifier.h\n> @@ -7,8 +7,8 @@\n>  #ifndef __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__\n>  #define __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__\n>\n> -#include <libcamera/object.h>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/signal.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h\n> index 70168acc25a5..76325b1d109f 100644\n> --- a/include/libcamera/internal/ipa_data_serializer.h\n> +++ b/include/libcamera/internal/ipa_data_serializer.h\n> @@ -14,6 +14,8 @@\n>  #include <type_traits>\n>  #include <vector>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/geometry.h>\n> @@ -22,7 +24,6 @@\n>  #include \"libcamera/internal/byte_stream_buffer.h\"\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/control_serializer.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  namespace libcamera {\n>\n> diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h\n> index e904a2be796b..34224e330da7 100644\n> --- a/include/libcamera/internal/ipa_manager.h\n> +++ b/include/libcamera/internal/ipa_manager.h\n> @@ -10,11 +10,12 @@\n>  #include <stdint.h>\n>  #include <vector>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n>\n>  #include \"libcamera/internal/ipa_module.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/pub_key.h\"\n>\n> diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h\n> index 19fc58272210..a87f56502b9a 100644\n> --- a/include/libcamera/internal/ipa_module.h\n> +++ b/include/libcamera/internal/ipa_module.h\n> @@ -11,10 +11,11 @@\n>  #include <string>\n>  #include <vector>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n>\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>\n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h\n> index c9a84b78cbe5..e58de3402006 100644\n> --- a/include/libcamera/internal/ipc_pipe.h\n> +++ b/include/libcamera/internal/ipc_pipe.h\n> @@ -9,9 +9,9 @@\n>\n>  #include <vector>\n>\n> -#include \"libcamera/internal/ipc_unixsocket.h\"\n> +#include <libcamera/base/signal.h>\n>\n> -#include <libcamera/signal.h>\n> +#include \"libcamera/internal/ipc_unixsocket.h\"\n>\n>  namespace libcamera {\n>\n> diff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h\n> index e871b65036bd..9f5b06773ced 100644\n> --- a/include/libcamera/internal/ipc_unixsocket.h\n> +++ b/include/libcamera/internal/ipc_unixsocket.h\n> @@ -12,7 +12,7 @@\n>  #include <sys/types.h>\n>  #include <vector>\n>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h\n> index c3292508c87b..8424611d7eda 100644\n> --- a/include/libcamera/internal/media_device.h\n> +++ b/include/libcamera/internal/media_device.h\n> @@ -14,9 +14,9 @@\n>\n>  #include <linux/media.h>\n>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n>\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_object.h\"\n>\n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index c84f9822ef6e..64f50373a7fb 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -22,8 +22,6 @@ libcamera_internal_headers = files([\n>      'device_enumerator.h',\n>      'device_enumerator_sysfs.h',\n>      'device_enumerator_udev.h',\n> -    'event_dispatcher.h',\n> -    'event_dispatcher_poll.h',\n>      'event_notifier.h',\n>      'file.h',\n>      'formats.h',\n> @@ -31,18 +29,13 @@ libcamera_internal_headers = files([\n>      'ipa_module.h',\n>      'ipa_proxy.h',\n>      'ipc_unixsocket.h',\n> -    'log.h',\n>      'media_device.h',\n>      'media_object.h',\n> -    'message.h',\n>      'pipeline_handler.h',\n>      'process.h',\n>      'pub_key.h',\n> -    'semaphore.h',\n>      'source-paths.h',\n>      'sysfs.h',\n> -    'thread.h',\n> -    'timer.h',\n>      'v4l2_device.h',\n>      'v4l2_pixelformat.h',\n>      'v4l2_subdevice.h',\n> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\n> index 8beb6b76dd3f..9e2d65d6f2c5 100644\n> --- a/include/libcamera/internal/pipeline_handler.h\n> +++ b/include/libcamera/internal/pipeline_handler.h\n> @@ -16,9 +16,9 @@\n>  #include <vector>\n>\n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/object.h>\n>\n>  #include <libcamera/controls.h>\n> -#include <libcamera/object.h>\n>  #include <libcamera/stream.h>\n>\n>  #include \"libcamera/internal/ipa_proxy.h\"\n> diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h\n> index 254cda8535ae..c4d5d9c1c009 100644\n> --- a/include/libcamera/internal/process.h\n> +++ b/include/libcamera/internal/process.h\n> @@ -11,7 +11,7 @@\n>  #include <string>\n>  #include <vector>\n>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h\n> index c318e976ad8e..1edd664a9aef 100644\n> --- a/include/libcamera/internal/v4l2_device.h\n> +++ b/include/libcamera/internal/v4l2_device.h\n> @@ -13,12 +13,12 @@\n>\n>  #include <linux/videodev2.h>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n> +\n>  #include <libcamera/controls.h>\n> -#include <libcamera/signal.h>\n>  #include <libcamera/span.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> -\n>  namespace libcamera {\n>\n>  class EventNotifier;\n> diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h\n> index d07dd6b444d0..97b89fb95087 100644\n> --- a/include/libcamera/internal/v4l2_subdevice.h\n> +++ b/include/libcamera/internal/v4l2_subdevice.h\n> @@ -12,11 +12,11 @@\n>  #include <vector>\n>\n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/log.h>\n>\n>  #include <libcamera/geometry.h>\n>\n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_object.h\"\n>  #include \"libcamera/internal/v4l2_device.h\"\n>\n> diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\n> index 227d015e8937..a7c3d5290d92 100644\n> --- a/include/libcamera/internal/v4l2_videodevice.h\n> +++ b/include/libcamera/internal/v4l2_videodevice.h\n> @@ -17,14 +17,14 @@\n>  #include <linux/videodev2.h>\n>\n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n>\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/pixel_format.h>\n> -#include <libcamera/signal.h>\n>\n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/v4l2_device.h\"\n>  #include \"libcamera/internal/v4l2_pixelformat.h\"\n>\n> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\n> index 4aefaa7153b1..9a15c86b16e2 100644\n> --- a/include/libcamera/ipa/ipa_interface.h\n> +++ b/include/libcamera/ipa/ipa_interface.h\n> @@ -13,10 +13,11 @@\n>  #include <map>\n>  #include <vector>\n>\n> +#include <libcamera/base/signal.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/geometry.h>\n> -#include <libcamera/signal.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index 7cba3de6ca96..d08bb3096aff 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -1,7 +1,6 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>\n>  libcamera_public_headers = files([\n> -    'bound_method.h',\n>      'buffer.h',\n>      'camera.h',\n>      'camera_manager.h',\n> @@ -11,10 +10,8 @@ libcamera_public_headers = files([\n>      'framebuffer_allocator.h',\n>      'geometry.h',\n>      'logging.h',\n> -    'object.h',\n>      'pixel_format.h',\n>      'request.h',\n> -    'signal.h',\n>      'span.h',\n>      'stream.h',\n>      'transform.h',\n> diff --git a/include/libcamera/request.h b/include/libcamera/request.h\n> index 00c646fea7f2..2d361c9d97dc 100644\n> --- a/include/libcamera/request.h\n> +++ b/include/libcamera/request.h\n> @@ -14,9 +14,9 @@\n>  #include <unordered_set>\n>\n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/signal.h>\n>\n>  #include <libcamera/controls.h>\n> -#include <libcamera/signal.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n> index e6d435e0501f..da836baec903 100644\n> --- a/src/android/camera3_hal.cpp\n> +++ b/src/android/camera3_hal.cpp\n> @@ -7,7 +7,7 @@\n>\n>  #include <hardware/camera_common.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"camera_device.h\"\n>  #include \"camera_hal_manager.h\"\n> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\n> index 00224a6d64b4..6b5edb66fad2 100644\n> --- a/src/android/camera_capabilities.cpp\n> +++ b/src/android/camera_capabilities.cpp\n> @@ -12,12 +12,13 @@\n>\n>  #include <hardware/camera3.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/property_ids.h>\n>\n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  using namespace libcamera;\n>\n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 6243c07e231e..86ea22b61467 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -15,16 +15,15 @@\n>  #include <unistd.h>\n>  #include <vector>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/formats.h>\n>  #include <libcamera/property_ids.h>\n>\n> -#include <libcamera/base/utils.h>\n> -\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -\n>  #include \"system/graphics.h\"\n>\n>  using namespace libcamera;\n> diff --git a/src/android/camera_device.h b/src/android/camera_device.h\n> index 090fe28a551e..4747f577a3e4 100644\n> --- a/src/android/camera_device.h\n> +++ b/src/android/camera_device.h\n> @@ -14,15 +14,16 @@\n>\n>  #include <hardware/camera3.h>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/thread.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>\n>  #include \"libcamera/internal/buffer.h\"\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n>\n>  #include \"camera_capabilities.h\"\n>  #include \"camera_metadata.h\"\n> diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp\n> index f33ba26935da..d84de4fd6f90 100644\n> --- a/src/android/camera_hal_config.cpp\n> +++ b/src/android/camera_hal_config.cpp\n> @@ -21,7 +21,7 @@ namespace filesystem = std::experimental::filesystem;\n>\n>  #include <hardware/camera3.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  using namespace libcamera;\n>\n> diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp\n> index 54087d3a2e45..4cd67544f0df 100644\n> --- a/src/android/camera_hal_manager.cpp\n> +++ b/src/android/camera_hal_manager.cpp\n> @@ -7,11 +7,11 @@\n>\n>  #include \"camera_hal_manager.h\"\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/property_ids.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> -\n>  #include \"camera_device.h\"\n>\n>  using namespace libcamera;\n> diff --git a/src/android/camera_metadata.cpp b/src/android/camera_metadata.cpp\n> index c7298d620668..3fc7cf273650 100644\n> --- a/src/android/camera_metadata.cpp\n> +++ b/src/android/camera_metadata.cpp\n> @@ -7,7 +7,7 @@\n>\n>  #include \"camera_metadata.h\"\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  using namespace libcamera;\n>\n> diff --git a/src/android/camera_worker.h b/src/android/camera_worker.h\n> index e289ef9b8655..6e1aee4a3247 100644\n> --- a/src/android/camera_worker.h\n> +++ b/src/android/camera_worker.h\n> @@ -9,14 +9,14 @@\n>\n>  #include <memory>\n>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/thread.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n> -#include <libcamera/object.h>\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>\n> -#include \"libcamera/internal/thread.h\"\n> -\n>  class CameraDevice;\n>\n>  class CaptureRequest\n> diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp\n> index f006e1d1999a..e6358ca9466f 100644\n> --- a/src/android/jpeg/encoder_libjpeg.cpp\n> +++ b/src/android/jpeg/encoder_libjpeg.cpp\n> @@ -16,12 +16,13 @@\n>  #include <unistd.h>\n>  #include <vector>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/formats.h>\n>  #include <libcamera/pixel_format.h>\n>\n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  using namespace libcamera;\n>\n> diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp\n> index 747f1cfaa8ac..0ba4cb85ffd0 100644\n> --- a/src/android/jpeg/exif.cpp\n> +++ b/src/android/jpeg/exif.cpp\n> @@ -14,10 +14,9 @@\n>  #include <tuple>\n>  #include <uchar.h>\n>\n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> -\n>  using namespace libcamera;\n>\n>  LOG_DEFINE_CATEGORY(EXIF)\n> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\n> index 058ccc998c6f..0e93f365d6db 100644\n> --- a/src/android/jpeg/post_processor_jpeg.cpp\n> +++ b/src/android/jpeg/post_processor_jpeg.cpp\n> @@ -14,9 +14,9 @@\n>  #include \"encoder_libjpeg.h\"\n>  #include \"exif.h\"\n>\n> -#include <libcamera/formats.h>\n> +#include <libcamera/base/log.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/formats.h>\n>\n>  using namespace libcamera;\n>  using namespace std::chrono_literals;\n> diff --git a/src/android/jpeg/thumbnailer.cpp b/src/android/jpeg/thumbnailer.cpp\n> index f709d3435d9c..5cb00744a688 100644\n> --- a/src/android/jpeg/thumbnailer.cpp\n> +++ b/src/android/jpeg/thumbnailer.cpp\n> @@ -7,9 +7,9 @@\n>\n>  #include \"thumbnailer.h\"\n>\n> -#include <libcamera/formats.h>\n> +#include <libcamera/base/log.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/formats.h>\n>\n>  using namespace libcamera;\n>\n> diff --git a/src/android/mm/cros_camera_buffer.cpp b/src/android/mm/cros_camera_buffer.cpp\n> index 59e26d1b5972..3cfa39a1714d 100644\n> --- a/src/android/mm/cros_camera_buffer.cpp\n> +++ b/src/android/mm/cros_camera_buffer.cpp\n> @@ -7,7 +7,7 @@\n>\n>  #include \"../camera_buffer.h\"\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"cros-camera/camera_buffer_manager.h\"\n>\n> diff --git a/src/android/mm/generic_camera_buffer.cpp b/src/android/mm/generic_camera_buffer.cpp\n> index cca88cf3632f..326fdc066499 100644\n> --- a/src/android/mm/generic_camera_buffer.cpp\n> +++ b/src/android/mm/generic_camera_buffer.cpp\n> @@ -9,8 +9,9 @@\n>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/buffer.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  using namespace libcamera;\n>\n> diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp\n> index b67364c8f147..772e805b32cc 100644\n> --- a/src/android/yuv/post_processor_yuv.cpp\n> +++ b/src/android/yuv/post_processor_yuv.cpp\n> @@ -9,12 +9,13 @@\n>\n>  #include <libyuv/scale.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/formats.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/pixel_format.h>\n>\n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  using namespace libcamera;\n>\n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index 8b4c7351e9db..31a3c006a6eb 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -11,6 +11,8 @@\n>  #include <linux/intel-ipu3.h>\n>  #include <linux/v4l2-controls.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/ipa/ipa_interface.h>\n> @@ -19,7 +21,6 @@\n>  #include <libcamera/request.h>\n>\n>  #include \"libcamera/internal/buffer.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  #include \"ipu3_agc.h\"\n>  #include \"ipu3_awb.h\"\n> diff --git a/src/ipa/ipu3/ipu3_agc.cpp b/src/ipa/ipu3/ipu3_agc.cpp\n> index c476a60d4cb8..fd0b70f02d25 100644\n> --- a/src/ipa/ipu3/ipu3_agc.cpp\n> +++ b/src/ipa/ipu3/ipu3_agc.cpp\n> @@ -11,9 +11,9 @@\n>  #include <cmath>\n>  #include <numeric>\n>\n> -#include <libcamera/ipa/core_ipa_interface.h>\n> +#include <libcamera/base/log.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/ipa/core_ipa_interface.h>\n>\n>  #include \"libipa/histogram.h\"\n>\n> diff --git a/src/ipa/ipu3/ipu3_awb.cpp b/src/ipa/ipu3/ipu3_awb.cpp\n> index 54ce8e67124e..9b409c8ffad9 100644\n> --- a/src/ipa/ipu3/ipu3_awb.cpp\n> +++ b/src/ipa/ipu3/ipu3_awb.cpp\n> @@ -10,7 +10,7 @@\n>  #include <numeric>\n>  #include <unordered_map>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/src/ipa/libipa/histogram.cpp b/src/ipa/libipa/histogram.cpp\n> index d4d7cfdffa84..fb1eb2a2f0b1 100644\n> --- a/src/ipa/libipa/histogram.cpp\n> +++ b/src/ipa/libipa/histogram.cpp\n> @@ -8,7 +8,7 @@\n>\n>  #include <cmath>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  /**\n>   * \\file histogram.h\n> diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp\n> index 221898ceb40d..a66648197140 100644\n> --- a/src/ipa/raspberrypi/cam_helper.hpp\n> +++ b/src/ipa/raspberrypi/cam_helper.hpp\n> @@ -10,13 +10,13 @@\n>\n>  #include <libcamera/span.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"camera_mode.h\"\n>  #include \"controller/controller.hpp\"\n>  #include \"controller/metadata.hpp\"\n>  #include \"md_parser.hpp\"\n>\n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>\n>  namespace RPiController {\n> diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp\n> index 96b58359a9e5..d3433ad2e7e8 100644\n> --- a/src/ipa/raspberrypi/controller/controller.cpp\n> +++ b/src/ipa/raspberrypi/controller/controller.cpp\n> @@ -5,7 +5,7 @@\n>   * controller.cpp - ISP controller\n>   */\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"algorithm.hpp\"\n>  #include \"controller.hpp\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> index 55e80ac74ae1..1ed578cfdbb6 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> @@ -9,7 +9,7 @@\n>\n>  #include \"linux/bcm2835-isp.h\"\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../awb_status.h\"\n>  #include \"../device_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n> index b0d24aa2ef44..3cdc95a99949 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n> @@ -6,7 +6,7 @@\n>   */\n>  #include <math.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../awb_status.h\"\n>  #include \"alsc.hpp\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> index 1c917e4f3408..5cfd33a384e7 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> @@ -5,7 +5,7 @@\n>   * awb.cpp - AWB control algorithm\n>   */\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../lux_status.h\"\n>\n> diff --git a/src/ipa/raspberrypi/controller/rpi/black_level.cpp b/src/ipa/raspberrypi/controller/rpi/black_level.cpp\n> index 9ac855f50014..6b3497f13c19 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/black_level.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/black_level.cpp\n> @@ -8,7 +8,7 @@\n>  #include <math.h>\n>  #include <stdint.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../black_level_status.h\"\n>\n> diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n> index dbdcbb39dd12..821a4c7c98c5 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n> @@ -5,7 +5,7 @@\n>   * ccm.cpp - CCM (colour correction matrix) control algorithm\n>   */\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../awb_status.h\"\n>  #include \"../ccm_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.cpp b/src/ipa/raspberrypi/controller/rpi/contrast.cpp\n> index 2bc43027a291..ae55aad56739 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/contrast.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/contrast.cpp\n> @@ -6,7 +6,7 @@\n>   */\n>  #include <stdint.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../contrast_status.h\"\n>  #include \"../histogram.hpp\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n> index e533cd53e63b..110f50560e76 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n> @@ -5,7 +5,7 @@\n>   * dpc.cpp - DPC (defective pixel correction) control algorithm\n>   */\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"dpc.hpp\"\n>\n> diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp\n> index bab4406fe3a1..a87ec802b964 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/focus.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp\n> @@ -6,7 +6,7 @@\n>   */\n>  #include <stdint.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../focus_status.h\"\n>  #include \"focus.hpp\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp\n> index 5eff116cd055..bdceb1f3d3eb 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/geq.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp\n> @@ -5,7 +5,7 @@\n>   * geq.cpp - GEQ (green equalisation) control algorithm\n>   */\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../device_status.h\"\n>  #include \"../lux_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> index 258e44f4dcce..f58d69397e1c 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> @@ -8,7 +8,7 @@\n>\n>  #include \"linux/bcm2835-isp.h\"\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../device_status.h\"\n>\n> diff --git a/src/ipa/raspberrypi/controller/rpi/noise.cpp b/src/ipa/raspberrypi/controller/rpi/noise.cpp\n> index 156f750192f8..63cad639f313 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/noise.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/noise.cpp\n> @@ -7,7 +7,7 @@\n>\n>  #include <math.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../device_status.h\"\n>  #include \"../noise_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/sdn.cpp b/src/ipa/raspberrypi/controller/rpi/sdn.cpp\n> index 959bc7406a01..9384550983e7 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/sdn.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/sdn.cpp\n> @@ -5,7 +5,7 @@\n>   * sdn.cpp - SDN (spatial denoise) control algorithm\n>   */\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../denoise_status.h\"\n>  #include \"../noise_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n> index 2cd861ca6898..b0c2e00a8ee1 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n> @@ -7,7 +7,7 @@\n>\n>  #include <math.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include \"../sharpen_status.h\"\n>\n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index 1c1e802a2cdc..a3f014495e80 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -13,6 +13,10 @@\n>  #include <string.h>\n>  #include <sys/mman.h>\n>\n> +#include <linux/bcm2835-isp.h>\n> +\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n> @@ -25,9 +29,6 @@\n>  #include <libcamera/span.h>\n>\n>  #include \"libcamera/internal/buffer.h\"\n> -#include \"libcamera/internal/log.h\"\n> -\n> -#include <linux/bcm2835-isp.h>\n>\n>  #include \"agc_algorithm.hpp\"\n>  #include \"agc_status.h\"\n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index b47ea3240f63..cdfb4d139e41 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -15,6 +15,8 @@\n>  #include <linux/rkisp1-config.h>\n>  #include <linux/v4l2-controls.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/ipa/ipa_interface.h>\n> @@ -22,8 +24,6 @@\n>  #include <libcamera/ipa/rkisp1_ipa_interface.h>\n>  #include <libcamera/request.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> -\n>  namespace libcamera {\n>\n>  LOG_DEFINE_CATEGORY(IPARkISP1)\n> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\n> index 13681d8833ff..9ffd07f493a1 100644\n> --- a/src/ipa/vimc/vimc.cpp\n> +++ b/src/ipa/vimc/vimc.cpp\n> @@ -17,8 +17,9 @@\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/file.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  namespace libcamera {\n>\n> diff --git a/src/libcamera/bound_method.cpp b/src/libcamera/base/bound_method.cpp\n> similarity index 94%\n> rename from src/libcamera/bound_method.cpp\n> rename to src/libcamera/base/bound_method.cpp\n> index 4965bb5e167b..3ecec51c4b75 100644\n> --- a/src/libcamera/bound_method.cpp\n> +++ b/src/libcamera/base/bound_method.cpp\n> @@ -5,14 +5,13 @@\n>   * bound_method.cpp - Method bind and invocation\n>   */\n>\n> -#include <libcamera/bound_method.h>\n> -\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/semaphore.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/bound_method.h>\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/semaphore.h>\n> +#include <libcamera/base/thread.h>\n>\n>  /**\n> - * \\file bound_method.h\n> + * \\file base/bound_method.h\n>   * \\brief Method bind and invocation\n>   */\n>\n> diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/base/event_dispatcher.cpp\n> similarity index 97%\n> rename from src/libcamera/event_dispatcher.cpp\n> rename to src/libcamera/base/event_dispatcher.cpp\n> index e0ce1eb3cc04..4be89e819832 100644\n> --- a/src/libcamera/event_dispatcher.cpp\n> +++ b/src/libcamera/base/event_dispatcher.cpp\n> @@ -5,12 +5,11 @@\n>   * event_dispatcher.cpp - Event dispatcher\n>   */\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/log.h>\n>\n>  /**\n> - * \\file event_dispatcher.h\n> + * \\file base/event_dispatcher.h\n>   */\n>\n>  namespace libcamera {\n> diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp\n> similarity index 97%\n> rename from src/libcamera/event_dispatcher_poll.cpp\n> rename to src/libcamera/base/event_dispatcher_poll.cpp\n> index 0b6aee187063..d76ca7fc2c32 100644\n> --- a/src/libcamera/event_dispatcher_poll.cpp\n> +++ b/src/libcamera/base/event_dispatcher_poll.cpp\n> @@ -5,7 +5,7 @@\n>   * event_dispatcher_poll.cpp - Poll-based event dispatcher\n>   */\n>\n> -#include \"libcamera/internal/event_dispatcher_poll.h\"\n> +#include <libcamera/base/event_dispatcher_poll.h>\n>\n>  #include <algorithm>\n>  #include <chrono>\n> @@ -16,15 +16,15 @@\n>  #include <sys/eventfd.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  #include <libcamera/base/utils.h>\n>\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>\n>  /**\n> - * \\file event_dispatcher_poll.h\n> + * \\file base/event_dispatcher_poll.h\n>   */\n>\n>  namespace libcamera {\n> diff --git a/src/libcamera/log.cpp b/src/libcamera/base/log.cpp\n> similarity index 99%\n> rename from src/libcamera/log.cpp\n> rename to src/libcamera/base/log.cpp\n> index 5ff0e9017648..1801ae26a2e3 100644\n> --- a/src/libcamera/log.cpp\n> +++ b/src/libcamera/base/log.cpp\n> @@ -5,7 +5,7 @@\n>   * log.cpp - Logging infrastructure\n>   */\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  #include <array>\n>  #if HAVE_BACKTRACE\n> @@ -23,12 +23,11 @@\n>\n>  #include <libcamera/logging.h>\n>\n> +#include <libcamera/base/thread.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/thread.h\"\n> -\n>  /**\n> - * \\file log.h\n> + * \\file base/log.h\n>   * \\brief Logging infrastructure\n>   *\n>   * libcamera includes a logging infrastructure used through the library that\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index 302a288685d3..7a19c67c51b8 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -2,10 +2,21 @@\n>\n>  libcamera_base_sources = files([\n>      'class.cpp',\n> +    'bound_method.cpp',\n> +    'event_dispatcher.cpp',\n> +    'event_dispatcher_poll.cpp',\n> +    'log.cpp',\n> +    'message.cpp',\n> +    'object.cpp',\n> +    'semaphore.cpp',\n> +    'signal.cpp',\n> +    'thread.cpp',\n> +    'timer.cpp',\n>      'utils.cpp',\n>  ])\n>\n>  libcamera_base_deps = [\n> +    dependency('threads'),\n>  ]\n>\n>  libcamera_base_lib = shared_library('libcamera-base',\n> diff --git a/src/libcamera/message.cpp b/src/libcamera/base/message.cpp\n> similarity index 96%\n> rename from src/libcamera/message.cpp\n> rename to src/libcamera/base/message.cpp\n> index bc985c077a4f..f1d772e43465 100644\n> --- a/src/libcamera/message.cpp\n> +++ b/src/libcamera/base/message.cpp\n> @@ -5,14 +5,13 @@\n>   * message.cpp - Message queue support\n>   */\n>\n> -#include \"libcamera/internal/message.h\"\n> +#include <libcamera/base/message.h>\n>\n> -#include <libcamera/signal.h>\n> -\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n>\n>  /**\n> - * \\file message.h\n> + * \\file base/message.h\n>   * \\brief Message queue support\n>   *\n>   * The messaging API enables inter-thread communication through message\n> diff --git a/src/libcamera/object.cpp b/src/libcamera/base/object.cpp\n> similarity index 97%\n> rename from src/libcamera/object.cpp\n> rename to src/libcamera/base/object.cpp\n> index 51cac64ea313..25410ecd949e 100644\n> --- a/src/libcamera/object.cpp\n> +++ b/src/libcamera/base/object.cpp\n> @@ -5,21 +5,19 @@\n>   * object.cpp - Base object\n>   */\n>\n> -#include <libcamera/object.h>\n> +#include <libcamera/base/object.h>\n>\n>  #include <algorithm>\n>\n> -#include <libcamera/signal.h>\n> -\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/semaphore.h>\n> +#include <libcamera/base/signal.h>\n> +#include <libcamera/base/thread.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/semaphore.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -\n>  /**\n> - * \\file object.h\n> + * \\file base/object.h\n>   * \\brief Base object to support automatic signal disconnection\n>   */\n>\n> diff --git a/src/libcamera/semaphore.cpp b/src/libcamera/base/semaphore.cpp\n> similarity index 96%\n> rename from src/libcamera/semaphore.cpp\n> rename to src/libcamera/base/semaphore.cpp\n> index d8988a9189e8..7aedc6a8c48b 100644\n> --- a/src/libcamera/semaphore.cpp\n> +++ b/src/libcamera/base/semaphore.cpp\n> @@ -5,11 +5,11 @@\n>   * semaphore.cpp - General-purpose counting semaphore\n>   */\n>\n> -#include \"libcamera/internal/semaphore.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/semaphore.h>\n> +#include <libcamera/base/thread.h>\n>\n>  /**\n> - * \\file semaphore.h\n> + * \\file base/semaphore.h\n>   * \\brief General-purpose counting semaphore\n>   */\n>\n> diff --git a/src/libcamera/signal.cpp b/src/libcamera/base/signal.cpp\n> similarity index 98%\n> rename from src/libcamera/signal.cpp\n> rename to src/libcamera/base/signal.cpp\n> index 2532df3c3073..298b2d4b3619 100644\n> --- a/src/libcamera/signal.cpp\n> +++ b/src/libcamera/base/signal.cpp\n> @@ -5,12 +5,12 @@\n>   * signal.cpp - Signal & slot implementation\n>   */\n>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/thread.h>\n>\n>  /**\n> - * \\file signal.h\n> + * \\file base/signal.h\n>   * \\brief Signal & slot implementation\n>   */\n>\n> diff --git a/src/libcamera/thread.cpp b/src/libcamera/base/thread.cpp\n> similarity index 98%\n> rename from src/libcamera/thread.cpp\n> rename to src/libcamera/base/thread.cpp\n> index 91e4737ad032..c7c2d6b29d6a 100644\n> --- a/src/libcamera/thread.cpp\n> +++ b/src/libcamera/base/thread.cpp\n> @@ -5,7 +5,7 @@\n>   * thread.cpp - Thread support\n>   */\n>\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/thread.h>\n>\n>  #include <atomic>\n>  #include <condition_variable>\n> @@ -14,10 +14,10 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/event_dispatcher_poll.h\"\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/message.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/event_dispatcher_poll.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/message.h>\n>\n>  /**\n>   * \\page thread Thread Support\n> @@ -102,7 +102,7 @@\n>   */\n>\n>  /**\n> - * \\file thread.h\n> + * \\file base/thread.h\n>   * \\brief Thread support\n>   */\n>\n> diff --git a/src/libcamera/timer.cpp b/src/libcamera/base/timer.cpp\n> similarity index 94%\n> rename from src/libcamera/timer.cpp\n> rename to src/libcamera/base/timer.cpp\n> index 9496671edffc..9c54352d46bd 100644\n> --- a/src/libcamera/timer.cpp\n> +++ b/src/libcamera/base/timer.cpp\n> @@ -5,21 +5,20 @@\n>   * timer.cpp - Generic timer\n>   */\n>\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/timer.h>\n>\n>  #include <chrono>\n>\n> -#include <libcamera/camera_manager.h>\n> -\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/thread.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/camera_manager.h>\n>\n>  /**\n> - * \\file timer.h\n> + * \\file base/timer.h\n>   * \\brief Generic timer\n>   */\n>\n> diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp\n> index ca999429dce5..e4c345d518da 100644\n> --- a/src/libcamera/buffer.cpp\n> +++ b/src/libcamera/buffer.cpp\n> @@ -13,7 +13,7 @@\n>  #include <sys/mman.h>\n>  #include <unistd.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  /**\n>   * \\file libcamera/buffer.h\n> diff --git a/src/libcamera/byte_stream_buffer.cpp b/src/libcamera/byte_stream_buffer.cpp\n> index 7fc6f6944471..b67bb928f8c1 100644\n> --- a/src/libcamera/byte_stream_buffer.cpp\n> +++ b/src/libcamera/byte_stream_buffer.cpp\n> @@ -10,7 +10,7 @@\n>  #include <stdint.h>\n>  #include <string.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  /**\n>   * \\file byte_stream_buffer.h\n> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> index 1340c266cc5f..de0123aeafca 100644\n> --- a/src/libcamera/camera.cpp\n> +++ b/src/libcamera/camera.cpp\n> @@ -11,13 +11,14 @@\n>  #include <atomic>\n>  #include <iomanip>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +\n>  #include <libcamera/framebuffer_allocator.h>\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/thread.h\"\n>\n>  /**\n>   * \\file camera.h\n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index a3784db6e697..fc3bd88c737b 100644\n> --- a/src/libcamera/camera_manager.cpp\n> +++ b/src/libcamera/camera_manager.cpp\n> @@ -14,12 +14,13 @@\n>\n>  #include <libcamera/base/utils.h>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n>\n>  /**\n>   * \\file camera_manager.h\n> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp\n> index fc4ea78d1fc7..7b7279efbba8 100644\n> --- a/src/libcamera/camera_sensor_properties.cpp\n> +++ b/src/libcamera/camera_sensor_properties.cpp\n> @@ -9,9 +9,9 @@\n>\n>  #include <map>\n>\n> -#include <libcamera/control_ids.h>\n> +#include <libcamera/base/log.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/control_ids.h>\n>\n>  /**\n>   * \\file camera_sensor_properties.h\n> diff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp\n> index 097444130ef7..dd5a26083747 100644\n> --- a/src/libcamera/control_serializer.cpp\n> +++ b/src/libcamera/control_serializer.cpp\n> @@ -11,13 +11,14 @@\n>  #include <memory>\n>  #include <vector>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/ipa/ipa_controls.h>\n>  #include <libcamera/span.h>\n>\n>  #include \"libcamera/internal/byte_stream_buffer.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  /**\n>   * \\file control_serializer.h\n> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\n> index 7df372ad3b6c..34317fa0f65d 100644\n> --- a/src/libcamera/controls.cpp\n> +++ b/src/libcamera/controls.cpp\n> @@ -12,10 +12,10 @@\n>  #include <string>\n>  #include <string.h>\n>\n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n>  #include \"libcamera/internal/control_validator.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  /**\n>   * \\file controls.h\n> diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp\n> index 0bf81b510d16..90ce7e0b5b52 100644\n> --- a/src/libcamera/delayed_controls.cpp\n> +++ b/src/libcamera/delayed_controls.cpp\n> @@ -7,9 +7,10 @@\n>\n>  #include \"libcamera/internal/delayed_controls.h\"\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/controls.h>\n>\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/v4l2_device.h\"\n>\n>  /**\n> diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp\n> index e6ecc360e32f..1f33faf5e7aa 100644\n> --- a/src/libcamera/device_enumerator.cpp\n> +++ b/src/libcamera/device_enumerator.cpp\n> @@ -11,7 +11,8 @@\n>\n>  #include <string.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/media_device.h\"\n>\n>  /**\n> diff --git a/src/libcamera/device_enumerator_sysfs.cpp b/src/libcamera/device_enumerator_sysfs.cpp\n> index ff72885288c3..686bb8099485 100644\n> --- a/src/libcamera/device_enumerator_sysfs.cpp\n> +++ b/src/libcamera/device_enumerator_sysfs.cpp\n> @@ -17,7 +17,8 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/media_device.h\"\n>\n>  namespace libcamera {\n> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> index d26fcf10b3c4..4b842773fcd6 100644\n> --- a/src/libcamera/device_enumerator_udev.cpp\n> +++ b/src/libcamera/device_enumerator_udev.cpp\n> @@ -17,8 +17,9 @@\n>  #include <sys/sysmacros.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>\n>  namespace libcamera {\n> diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp\n> index 6b0575c0db77..784016a9f907 100644\n> --- a/src/libcamera/event_notifier.cpp\n> +++ b/src/libcamera/event_notifier.cpp\n> @@ -9,9 +9,9 @@\n>\n>  #include <libcamera/camera_manager.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/thread.h>\n>\n>  /**\n>   * \\file event_notifier.h\n> diff --git a/src/libcamera/file.cpp b/src/libcamera/file.cpp\n> index bce2b6138239..def0f60d044b 100644\n> --- a/src/libcamera/file.cpp\n> +++ b/src/libcamera/file.cpp\n> @@ -14,7 +14,7 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  /**\n>   * \\file file.h\n> diff --git a/src/libcamera/file_descriptor.cpp b/src/libcamera/file_descriptor.cpp\n> index 8b505ed3b6b2..638b3bbe0449 100644\n> --- a/src/libcamera/file_descriptor.cpp\n> +++ b/src/libcamera/file_descriptor.cpp\n> @@ -11,7 +11,7 @@\n>  #include <unistd.h>\n>  #include <utility>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  /**\n>   * \\file file_descriptor.h\n> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\n> index 55822f4cc97b..f5fbaf0b95f9 100644\n> --- a/src/libcamera/formats.cpp\n> +++ b/src/libcamera/formats.cpp\n> @@ -12,7 +12,7 @@\n>\n>  #include <libcamera/formats.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  /**\n>   * \\file internal/formats.h\n> diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp\n> index 2fbba37a1b0b..86a57923286c 100644\n> --- a/src/libcamera/framebuffer_allocator.cpp\n> +++ b/src/libcamera/framebuffer_allocator.cpp\n> @@ -9,11 +9,12 @@\n>\n>  #include <errno.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/stream.h>\n>\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>\n>  /**\n> diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp\n> index 136446895eb6..9bbef0b537f1 100644\n> --- a/src/libcamera/geometry.cpp\n> +++ b/src/libcamera/geometry.cpp\n> @@ -10,7 +10,7 @@\n>  #include <sstream>\n>  #include <stdint.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  /**\n>   * \\file geometry.h\n> diff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp\n> index 131b3bd616fd..fb941e6bcd8a 100644\n> --- a/src/libcamera/ipa_data_serializer.cpp\n> +++ b/src/libcamera/ipa_data_serializer.cpp\n> @@ -7,7 +7,7 @@\n>\n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  /**\n>   * \\file ipa_data_serializer.h\n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index 263cacd64737..35c7259801fa 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -12,12 +12,12 @@\n>  #include <string.h>\n>  #include <sys/types.h>\n>\n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n>  #include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/ipa_proxy.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>\n>  /**\n> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n> index a4e7fb861138..7ab5557916e7 100644\n> --- a/src/libcamera/ipa_module.cpp\n> +++ b/src/libcamera/ipa_module.cpp\n> @@ -23,10 +23,10 @@\n>\n>  #include <libcamera/span.h>\n>\n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n>  #include \"libcamera/internal/file.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>\n>  /**\n> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> index ca980ec705a6..babcc48bcfd0 100644\n> --- a/src/libcamera/ipa_proxy.cpp\n> +++ b/src/libcamera/ipa_proxy.cpp\n> @@ -12,10 +12,10 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n>  #include \"libcamera/internal/ipa_module.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  /**\n>   * \\file ipa_proxy.h\n> diff --git a/src/libcamera/ipc_pipe.cpp b/src/libcamera/ipc_pipe.cpp\n> index c402c8d08699..28e20e031623 100644\n> --- a/src/libcamera/ipc_pipe.cpp\n> +++ b/src/libcamera/ipc_pipe.cpp\n> @@ -7,7 +7,7 @@\n>\n>  #include \"libcamera/internal/ipc_pipe.h\"\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  /**\n>   * \\file ipc_pipe.h\n> diff --git a/src/libcamera/ipc_pipe_unixsocket.cpp b/src/libcamera/ipc_pipe_unixsocket.cpp\n> index db0e260f22b1..4511775fb467 100644\n> --- a/src/libcamera/ipc_pipe_unixsocket.cpp\n> +++ b/src/libcamera/ipc_pipe_unixsocket.cpp\n> @@ -9,13 +9,14 @@\n>\n>  #include <vector>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/ipc_pipe.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>\n>  namespace libcamera {\n>\n> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> index fdb359f7fcd1..1466597077d4 100644\n> --- a/src/libcamera/ipc_unixsocket.cpp\n> +++ b/src/libcamera/ipc_unixsocket.cpp\n> @@ -12,8 +12,9 @@\n>  #include <sys/socket.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  /**\n>   * \\file ipc_unixsocket.h\n> diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\n> index 9ec84e560b77..e12ab1abb10d 100644\n> --- a/src/libcamera/media_device.cpp\n> +++ b/src/libcamera/media_device.cpp\n> @@ -18,7 +18,7 @@\n>\n>  #include <linux/media.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  /**\n>   * \\file media_device.h\n> diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp\n> index 94aeb50402ca..815edc8e3b2d 100644\n> --- a/src/libcamera/media_object.cpp\n> +++ b/src/libcamera/media_object.cpp\n> @@ -15,7 +15,8 @@\n>\n>  #include <linux/media.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/media_device.h\"\n>\n>  /**\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index a341004c0c19..86212cec0281 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -2,7 +2,6 @@\n>\n>  libcamera_sources = files([\n>      'bayer_format.cpp',\n> -    'bound_method.cpp',\n>      'buffer.cpp',\n>      'byte_stream_buffer.cpp',\n>      'camera.cpp',\n> @@ -16,8 +15,6 @@ libcamera_sources = files([\n>      'delayed_controls.cpp',\n>      'device_enumerator.cpp',\n>      'device_enumerator_sysfs.cpp',\n> -    'event_dispatcher.cpp',\n> -    'event_dispatcher_poll.cpp',\n>      'event_notifier.cpp',\n>      'file.cpp',\n>      'file_descriptor.cpp',\n> @@ -33,23 +30,16 @@ libcamera_sources = files([\n>      'ipc_pipe.cpp',\n>      'ipc_pipe_unixsocket.cpp',\n>      'ipc_unixsocket.cpp',\n> -    'log.cpp',\n>      'media_device.cpp',\n>      'media_object.cpp',\n> -    'message.cpp',\n> -    'object.cpp',\n>      'pipeline_handler.cpp',\n>      'pixel_format.cpp',\n>      'process.cpp',\n>      'pub_key.cpp',\n>      'request.cpp',\n> -    'semaphore.cpp',\n> -    'signal.cpp',\n>      'source-paths.cpp',\n>      'stream.cpp',\n>      'sysfs.cpp',\n> -    'thread.cpp',\n> -    'timer.cpp',\n>      'transform.cpp',\n>      'v4l2_device.cpp',\n>      'v4l2_pixelformat.cpp',\n> @@ -128,7 +118,6 @@ libcamera_deps = [\n>      liblttng,\n>      libudev,\n>      libcamera_base,\n> -    dependency('threads'),\n>  ]\n>\n>  # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.\n> diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h\n> index d8d4a181ffd1..f28e9f1ddf42 100644\n> --- a/src/libcamera/pipeline/ipu3/cio2.h\n> +++ b/src/libcamera/pipeline/ipu3/cio2.h\n> @@ -11,7 +11,7 @@\n>  #include <queue>\n>  #include <vector>\n>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n> diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h\n> index 59e64e8170a2..3ef7e4454693 100644\n> --- a/src/libcamera/pipeline/ipu3/frames.h\n> +++ b/src/libcamera/pipeline/ipu3/frames.h\n> @@ -12,7 +12,7 @@\n>  #include <queue>\n>  #include <vector>\n>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\n> index 32d143a862b2..e955bc3456ba 100644\n> --- a/src/libcamera/pipeline/ipu3/imgu.cpp\n> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n> @@ -13,12 +13,12 @@\n>\n>  #include <linux/media-bus-format.h>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/formats.h>\n>  #include <libcamera/stream.h>\n>\n> -#include <libcamera/base/utils.h>\n> -\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>\n>  namespace libcamera {\n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 6b43ad2fb2b1..76c3bb3d8aa9 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -11,6 +11,9 @@\n>  #include <queue>\n>  #include <vector>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/formats.h>\n> @@ -20,13 +23,10 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>\n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/delayed_controls.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>\n> diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n> index 4d5dd6cb87cc..573ea11de607 100644\n> --- a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n> @@ -14,7 +14,7 @@\n>  #include <sys/ioctl.h>\n>  #include <unistd.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  /*\n>   * /dev/dma-heap/linux,cma is the dma-heap allocator, which allows dmaheap-cma\n> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> index f2430415d32d..b3265d0e8aab 100644\n> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> @@ -6,9 +6,9 @@\n>   */\n>  #include \"rpi_stream.h\"\n>\n> -#include <libcamera/ipa/raspberrypi_ipa_interface.h>\n> +#include <libcamera/base/log.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/ipa/raspberrypi_ipa_interface.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index c625d7248f5c..00df4f0b3e6b 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -14,6 +14,9 @@\n>\n>  #include <linux/media-bus-format.h>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n> @@ -24,13 +27,10 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>\n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/delayed_controls.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n> index 3b3e37d258d0..c185ac3992dd 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n> @@ -10,10 +10,11 @@\n>  #include <memory>\n>  #include <vector>\n>\n> +#include <libcamera/base/signal.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/pixel_format.h>\n> -#include <libcamera/signal.h>\n>  #include <libcamera/span.h>\n>\n>  #include \"libcamera/internal/media_object.h\"\n> diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp\n> index 589f185b1bf1..9af1096be834 100644\n> --- a/src/libcamera/pipeline/simple/converter.cpp\n> +++ b/src/libcamera/pipeline/simple/converter.cpp\n> @@ -10,14 +10,14 @@\n>  #include <algorithm>\n>  #include <limits.h>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/geometry.h>\n> -#include <libcamera/signal.h>\n>  #include <libcamera/stream.h>\n>\n> -#include <libcamera/base/utils.h>\n> -\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>\n> diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h\n> index 480e528d2210..276a2a291c21 100644\n> --- a/src/libcamera/pipeline/simple/converter.h\n> +++ b/src/libcamera/pipeline/simple/converter.h\n> @@ -16,9 +16,9 @@\n>  #include <vector>\n>\n>  #include <libcamera/pixel_format.h>\n> -#include <libcamera/signal.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 1894014d8fc7..4d78e6faf403 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -21,6 +21,8 @@\n>\n>  #include <linux/media-bus-format.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/request.h>\n> @@ -28,7 +30,6 @@\n>\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n> diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> index d8c17dccae53..0f634b8da609 100644\n> --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> @@ -12,6 +12,9 @@\n>  #include <memory>\n>  #include <tuple>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n> @@ -19,10 +22,7 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>\n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n> index 025ca56205f8..361b715778ef 100644\n> --- a/src/libcamera/pipeline/vimc/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n> @@ -14,21 +14,23 @@\n>  #include <linux/media-bus-format.h>\n>  #include <linux/version.h>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/formats.h>\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n> +#include <libcamera/ipa/vimc_ipa_interface.h>\n> +#include <libcamera/ipa/vimc_ipa_proxy.h>\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>\n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> index 6fb2a743c3c2..f626eddd321f 100644\n> --- a/src/libcamera/pipeline_handler.cpp\n> +++ b/src/libcamera/pipeline_handler.cpp\n> @@ -9,14 +9,14 @@\n>\n>  #include <sys/sysmacros.h>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/camera_manager.h>\n>\n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/tracepoints.h\"\n>\n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 35091f60c1e9..463380299a65 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -20,10 +20,10 @@\n>  #include <unistd.h>\n>  #include <vector>\n>\n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  /**\n>   * \\file process.h\n> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\n> index 6611e74d1800..518384eb8cf6 100644\n> --- a/src/libcamera/request.cpp\n> +++ b/src/libcamera/request.cpp\n> @@ -10,13 +10,14 @@\n>  #include <map>\n>  #include <sstream>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/stream.h>\n>\n>  #include \"libcamera/internal/camera_controls.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/tracepoints.h\"\n>\n>  /**\n> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> index d5d68427e658..b8626775d224 100644\n> --- a/src/libcamera/stream.cpp\n> +++ b/src/libcamera/stream.cpp\n> @@ -15,9 +15,9 @@\n>\n>  #include <libcamera/request.h>\n>\n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/log.h\"\n>\n>  /**\n>   * \\file stream.h\n> diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp\n> index e9004b2b59c8..4372b1348178 100644\n> --- a/src/libcamera/sysfs.cpp\n> +++ b/src/libcamera/sysfs.cpp\n> @@ -12,8 +12,9 @@\n>  #include <sys/stat.h>\n>  #include <sys/sysmacros.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/file.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  /**\n>   * \\file sysfs.h\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index facb53e13169..334b9b78b812 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -16,10 +16,10 @@\n>  #include <sys/syscall.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n>\n>  /**\n> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\n> index 166d93cf1d20..87d728fe5577 100644\n> --- a/src/libcamera/v4l2_pixelformat.cpp\n> +++ b/src/libcamera/v4l2_pixelformat.cpp\n> @@ -12,11 +12,12 @@\n>  #include <map>\n>  #include <string.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/formats.h>\n>  #include <libcamera/pixel_format.h>\n>\n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  /**\n>   * \\file v4l2_pixelformat.h\n> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> index 2c56cfafbce4..8fe5e45b31ee 100644\n> --- a/src/libcamera/v4l2_subdevice.cpp\n> +++ b/src/libcamera/v4l2_subdevice.cpp\n> @@ -19,9 +19,9 @@\n>\n>  #include <libcamera/geometry.h>\n>\n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/media_object.h\"\n>\n> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> index 12c09dc7578d..dc23510bc5aa 100644\n> --- a/src/libcamera/v4l2_videodevice.cpp\n> +++ b/src/libcamera/v4l2_videodevice.cpp\n> @@ -21,10 +21,11 @@\n>\n>  #include <linux/version.h>\n>\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/file_descriptor.h>\n>\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/media_object.h\"\n>\n> diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp\n> index 97825c715bba..157ab94e0544 100644\n> --- a/src/v4l2/v4l2_camera.cpp\n> +++ b/src/v4l2/v4l2_camera.cpp\n> @@ -10,7 +10,7 @@\n>  #include <errno.h>\n>  #include <unistd.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>\n>  using namespace libcamera;\n>\n> diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h\n> index d238046250e3..dbe0573bd3a4 100644\n> --- a/src/v4l2/v4l2_camera.h\n> +++ b/src/v4l2/v4l2_camera.h\n> @@ -12,13 +12,13 @@\n>  #include <mutex>\n>  #include <utility>\n>\n> +#include <libcamera/base/semaphore.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/file_descriptor.h>\n>  #include <libcamera/framebuffer_allocator.h>\n>\n> -#include \"libcamera/internal/semaphore.h\"\n> -\n>  using namespace libcamera;\n>\n>  class V4L2Camera\n> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\n> index a5a25507462e..7682c4bddf90 100644\n> --- a/src/v4l2/v4l2_camera_proxy.cpp\n> +++ b/src/v4l2/v4l2_camera_proxy.cpp\n> @@ -18,12 +18,12 @@\n>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/formats.h>\n> -#include <libcamera/object.h>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/object.h>\n>  #include <libcamera/base/utils.h>\n>\n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>\n>  #include \"v4l2_camera.h\"\n>  #include \"v4l2_camera_file.h\"\n> diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp\n> index 27de6c50ff4e..e566125a70ac 100644\n> --- a/src/v4l2/v4l2_compat_manager.cpp\n> +++ b/src/v4l2/v4l2_compat_manager.cpp\n> @@ -19,12 +19,11 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>\n> -#include <libcamera/camera.h>\n> -#include <libcamera/camera_manager.h>\n> -\n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/camera.h>\n> +#include <libcamera/camera_manager.h>\n>\n>  #include \"v4l2_camera_file.h\"\n>\n> diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp\n> index 61f4eb92ae95..c504ea09e64b 100644\n> --- a/test/camera/buffer_import.cpp\n> +++ b/test/camera/buffer_import.cpp\n> @@ -12,11 +12,12 @@\n>  #include <numeric>\n>  #include <vector>\n>\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/media_device.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>\n>  #include \"buffer_source.h\"\n> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> index c4bc21100777..238d98dbba16 100644\n> --- a/test/camera/capture.cpp\n> +++ b/test/camera/capture.cpp\n> @@ -9,9 +9,9 @@\n>\n>  #include <libcamera/framebuffer_allocator.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>\n>  #include \"camera_test.h\"\n>  #include \"test.h\"\n> diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp\n> index 8ae05ac62985..1cc17b045ec0 100644\n> --- a/test/event-dispatcher.cpp\n> +++ b/test/event-dispatcher.cpp\n> @@ -10,9 +10,9 @@\n>  #include <signal.h>\n>  #include <sys/time.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/event-thread.cpp b/test/event-thread.cpp\n> index aeb8b3bf4bac..05c5d26d3611 100644\n> --- a/test/event-thread.cpp\n> +++ b/test/event-thread.cpp\n> @@ -10,9 +10,10 @@\n>  #include <string.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/event.cpp b/test/event.cpp\n> index 1f16c97bbab5..aa79da99c286 100644\n> --- a/test/event.cpp\n> +++ b/test/event.cpp\n> @@ -9,10 +9,11 @@\n>  #include <string.h>\n>  #include <unistd.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp\n> index 94cb859352ec..bb160537c5d5 100644\n> --- a/test/hotplug-cameras.cpp\n> +++ b/test/hotplug-cameras.cpp\n> @@ -14,10 +14,11 @@\n>  #include <libcamera/camera.h>\n>  #include <libcamera/camera_manager.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/file.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\n> index d6ca6f5137b0..656d86552d85 100644\n> --- a/test/ipa/ipa_interface_test.cpp\n> +++ b/test/ipa/ipa_interface_test.cpp\n> @@ -14,15 +14,16 @@\n>\n>  #include <libcamera/ipa/vimc_ipa_proxy.h>\n>\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp\n> index 80157b342795..aa35c8f071f1 100644\n> --- a/test/ipc/unixsocket.cpp\n> +++ b/test/ipc/unixsocket.cpp\n> @@ -16,10 +16,11 @@\n>  #include <sys/wait.h>\n>  #include <unistd.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp\n> index 161d09b98719..6fe7fd9b8fc5 100644\n> --- a/test/ipc/unixsocket_ipc.cpp\n> +++ b/test/ipc/unixsocket_ipc.cpp\n> @@ -15,19 +15,18 @@\n>  #include <sys/wait.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>  #include \"libcamera/internal/ipc_pipe.h\"\n>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>\n>  #include \"test.h\"\n>\n> -\n>  using namespace std;\n>  using namespace libcamera;\n>\n> diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp\n> index ae3c607a6881..5311896095a9 100644\n> --- a/test/log/log_api.cpp\n> +++ b/test/log/log_api.cpp\n> @@ -16,9 +16,9 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>\n> -#include <libcamera/logging.h>\n> +#include <libcamera/base/log.h>\n>\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/logging.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> index 413d9207ea68..d138aa7ff562 100644\n> --- a/test/log/log_process.cpp\n> +++ b/test/log/log_process.cpp\n> @@ -16,13 +16,13 @@\n>\n>  #include <libcamera/logging.h>\n>\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/message.cpp b/test/message.cpp\n> index 9553ba8cbaed..eeea57feab76 100644\n> --- a/test/message.cpp\n> +++ b/test/message.cpp\n> @@ -9,8 +9,8 @@\n>  #include <iostream>\n>  #include <thread>\n>\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/thread.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/object-delete.cpp b/test/object-delete.cpp\n> index a1a6f5ccefd5..eabefe935974 100644\n> --- a/test/object-delete.cpp\n> +++ b/test/object-delete.cpp\n> @@ -7,9 +7,8 @@\n>\n>  #include <iostream>\n>\n> -#include <libcamera/object.h>\n> -\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/thread.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp\n> index a6f816f395eb..b1c0f473ba5c 100644\n> --- a/test/object-invoke.cpp\n> +++ b/test/object-invoke.cpp\n> @@ -8,10 +8,9 @@\n>  #include <iostream>\n>  #include <thread>\n>\n> -#include <libcamera/object.h>\n> -\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/thread.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/object.cpp b/test/object.cpp\n> index 264659b405d9..cbd0d3ececab 100644\n> --- a/test/object.cpp\n> +++ b/test/object.cpp\n> @@ -7,10 +7,9 @@\n>\n>  #include <iostream>\n>\n> -#include <libcamera/object.h>\n> -\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/thread.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> index a5155bae3162..8f7a1f05f681 100644\n> --- a/test/process/process_test.cpp\n> +++ b/test/process/process_test.cpp\n> @@ -9,12 +9,13 @@\n>  #include <unistd.h>\n>  #include <vector>\n>\n> +\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp\n> index dbbba8912386..880bcd02c6be 100644\n> --- a/test/serialization/ipa_data_serializer_test.cpp\n> +++ b/test/serialization/ipa_data_serializer_test.cpp\n> @@ -17,13 +17,14 @@\n>  #include <unistd.h>\n>  #include <vector>\n>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>\n>  #include \"serialization_test.h\"\n>  #include \"test.h\"\n> diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp\n> index 8a96b5d2abb3..d5e2eb662df2 100644\n> --- a/test/signal-threads.cpp\n> +++ b/test/signal-threads.cpp\n> @@ -9,11 +9,10 @@\n>  #include <iostream>\n>  #include <thread>\n>\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/thread.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -\n>  #include \"test.h\"\n>\n>  using namespace std;\n> diff --git a/test/signal.cpp b/test/signal.cpp\n> index f83ceb05f091..aceb02789cf4 100644\n> --- a/test/signal.cpp\n> +++ b/test/signal.cpp\n> @@ -8,8 +8,8 @@\n>  #include <iostream>\n>  #include <string.h>\n>\n> -#include <libcamera/object.h>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/signal.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/threads.cpp b/test/threads.cpp\n> index e0c50dc90a65..d83b5833998f 100644\n> --- a/test/threads.cpp\n> +++ b/test/threads.cpp\n> @@ -10,7 +10,7 @@\n>  #include <memory>\n>  #include <thread>\n>\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/thread.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> index be29eee1bdb6..2c14865b74d5 100644\n> --- a/test/timer-thread.cpp\n> +++ b/test/timer-thread.cpp\n> @@ -8,9 +8,9 @@\n>  #include <chrono>\n>  #include <iostream>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/timer.cpp b/test/timer.cpp\n> index fc90b11040d8..88f226e79f5f 100644\n> --- a/test/timer.cpp\n> +++ b/test/timer.cpp\n> @@ -8,9 +8,9 @@\n>  #include <chrono>\n>  #include <iostream>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp\n> index c75259be0d10..91b3e4a0dad6 100644\n> --- a/test/v4l2_videodevice/buffer_sharing.cpp\n> +++ b/test/v4l2_videodevice/buffer_sharing.cpp\n> @@ -14,9 +14,9 @@\n>\n>  #include <libcamera/buffer.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>\n>  #include \"v4l2_videodevice_test.h\"\n>\n> diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp\n> index accdb34a699c..f12c8bef97f6 100644\n> --- a/test/v4l2_videodevice/capture_async.cpp\n> +++ b/test/v4l2_videodevice/capture_async.cpp\n> @@ -9,9 +9,9 @@\n>\n>  #include <libcamera/buffer.h>\n>\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>\n>  #include \"v4l2_videodevice_test.h\"\n>\n> diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> index e0f068082c01..fe4b3cc6487f 100644\n> --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> @@ -9,11 +9,12 @@\n>\n>  #include <libcamera/buffer.h>\n>\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/media_device.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>\n>  #include \"test.h\"\n> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> index dc6748153445..5a64fe9cfeee 100644\n> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> @@ -23,6 +23,9 @@\n>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>\n>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>\n>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +\n>  #include \"libcamera/internal/control_serializer.h\"\n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n> @@ -30,9 +33,7 @@\n>  #include \"libcamera/internal/ipc_pipe.h\"\n>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n>\n>  namespace libcamera {\n>\n> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n> index 017b870c9dad..ae168548492c 100644\n> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n> @@ -19,12 +19,13 @@\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>\n>\n> +#include <libcamera/base/thread.h>\n> +\n>  #include \"libcamera/internal/control_serializer.h\"\n>  #include \"libcamera/internal/ipa_proxy.h\"\n>  #include \"libcamera/internal/ipc_pipe.h\"\n>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n> -#include \"libcamera/internal/thread.h\"\n>\n>  namespace libcamera {\n>  {%- if has_namespace %}\n> 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\n> index 8a57b6cc8b34..d993e39e5a5f 100644\n> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n> @@ -26,17 +26,18 @@\n>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>\n>  #include <libcamera/logging.h>\n>\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/control_serializer.h\"\n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/ipa_proxy.h\"\n>  #include \"libcamera/internal/ipc_pipe.h\"\n>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/thread.h\"\n>\n>  using namespace libcamera;\n>\n> --\n> 2.30.2\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 17818C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:44:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 55633684D1;\n\tFri, 25 Jun 2021 05:44:22 +0200 (CEST)","from mail-ed1-x533.google.com (mail-ed1-x533.google.com\n\t[IPv6:2a00:1450:4864:20::533])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1921C684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:44:21 +0200 (CEST)","by mail-ed1-x533.google.com with SMTP id h2so11561483edt.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jun 2021 20:44:21 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"h2XUFmja\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=M92HGhvWd2nOGbQ36AoA8aUcDRPTBJC3cYVR/6uPl3k=;\n\tb=h2XUFmjaN6IPd5gxL4EN3KQ+/xiIhfGUBMHtiItiEG3ORv1+qH/nD40fg2LeAoxw4E\n\t8swdDKlgb5wiIQzJxKnxzQAvMd1vztWoVcCwnTHcSLh1uAdgKXl8AgW5Uvtbjx7I76Wn\n\t2U8tTdTAFSKCSO2O0IC2f4Btzh4dBQFj9L4+g=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=M92HGhvWd2nOGbQ36AoA8aUcDRPTBJC3cYVR/6uPl3k=;\n\tb=jTRiALcVAlRwGUyNuW/AqjrlgekGXfQtfNtXXwb1IcCqgaYEFHUDAPvoJzkghBEBbb\n\tx36cCIwG09xqSLjUI4r/Dl60M5SN31pz77K1L0wq8qrBReZnSRHRGz/QcyfwexqKEOmt\n\t0PTnvWfR8O5249IDdzhdM2fS3eEXgJj7FnWDcsQvP4xu5TdWfSoC8jBidPwwUGtyyxIq\n\tmjKwTPhYb5s6YJ2WXB77M4tANCj+m9GhSJrTUCxMbU4Esi03vIedokcPWDtgp6OUqG9F\n\tQSEPT4PUnJINuSFAhlmyP33LZ2GNtg73oUBmKDFcWfE/7yfecM6Rh+f0av7uzLr7vrbU\n\thVcQ==","X-Gm-Message-State":"AOAM533IOV5AN5e+/KdntFb9AS4zTPXViESXVVoJfcC3F53b0pOP9+ZV\n\t7Hes7pAFpa7j0wEElopTskefVwQxEihIIrhQ+K4NsA==","X-Google-Smtp-Source":"ABdhPJwFTu0ih8ftjH2PDhnOiloyxjgPpgs8N9Ogf9L4WI4H1uT9M+f4cCG87TXYuzvqivTcFP0x8z+A1J1Lu5XT+5g=","X-Received":"by 2002:a05:6402:2885:: with SMTP id\n\teg5mr11791985edb.73.1624592659298; \n\tThu, 24 Jun 2021 20:44:19 -0700 (PDT)","MIME-Version":"1.0","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-10-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20210625013539.625803-10-kieran.bingham@ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 25 Jun 2021 12:44:08 +0900","Message-ID":"<CAO5uPHPhjGvgTd7Biu-M5WPpAtQbfkZFd-7cUndek_X+uYMwaQ@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 09/16] libcamera/base: Move extended\n\tbase functionality","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17768,"web_url":"https://patchwork.libcamera.org/comment/17768/","msgid":"<20210625043133.GJ2599@pyrite.rasen.tech>","date":"2021-06-25T04:31:33","subject":"Re: [libcamera-devel] [PATCH 09/16] libcamera/base: Move extended\n\tbase functionality","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Fri, Jun 25, 2021 at 02:35:32AM +0100, Kieran Bingham wrote:\n> Move the functionality for the following components to the new\n> base support library:\n> \n>  - BoundMethod\n>  - EventDispatcher\n>  - EventDispatcherPoll\n>  - Log\n>  - Message\n>  - Object\n>  - Signal\n>  - Semaphore\n>  - Thread\n>  - Timer\n> \n> While it would be preferable to see these split to move one component\n> per commit, these components are all interdependant upon each other,\n> which leaves us with one big change performing the move for all of them.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  Documentation/guides/pipeline-handler.rst        |  3 ++-\n>  include/libcamera/{ => base}/bound_method.h      |  6 +++---\n>  .../{internal => base}/event_dispatcher.h        |  6 +++---\n>  .../{internal => base}/event_dispatcher_poll.h   |  8 ++++----\n>  include/libcamera/{internal => base}/log.h       |  6 +++---\n>  include/libcamera/base/meson.build               | 10 ++++++++++\n>  include/libcamera/{internal => base}/message.h   |  8 ++++----\n>  include/libcamera/{ => base}/object.h            |  8 ++++----\n>  include/libcamera/{internal => base}/semaphore.h |  8 ++++----\n>  include/libcamera/{ => base}/signal.h            | 10 +++++-----\n>  include/libcamera/{internal => base}/thread.h    | 12 +++++-------\n>  include/libcamera/{internal => base}/timer.h     | 10 +++++-----\n>  include/libcamera/camera.h                       |  4 ++--\n>  include/libcamera/camera_manager.h               |  5 ++---\n>  include/libcamera/internal/camera_sensor.h       |  2 +-\n>  include/libcamera/internal/device_enumerator.h   |  2 +-\n>  include/libcamera/internal/event_notifier.h      |  4 ++--\n>  include/libcamera/internal/ipa_data_serializer.h |  3 ++-\n>  include/libcamera/internal/ipa_manager.h         |  3 ++-\n>  include/libcamera/internal/ipa_module.h          |  3 ++-\n>  include/libcamera/internal/ipc_pipe.h            |  4 ++--\n>  include/libcamera/internal/ipc_unixsocket.h      |  2 +-\n>  include/libcamera/internal/media_device.h        |  4 ++--\n>  include/libcamera/internal/meson.build           |  7 -------\n>  include/libcamera/internal/pipeline_handler.h    |  2 +-\n>  include/libcamera/internal/process.h             |  2 +-\n>  include/libcamera/internal/v4l2_device.h         |  6 +++---\n>  include/libcamera/internal/v4l2_subdevice.h      |  2 +-\n>  include/libcamera/internal/v4l2_videodevice.h    |  4 ++--\n>  include/libcamera/ipa/ipa_interface.h            |  3 ++-\n>  include/libcamera/meson.build                    |  3 ---\n>  include/libcamera/request.h                      |  2 +-\n>  src/android/camera3_hal.cpp                      |  2 +-\n>  src/android/camera_capabilities.cpp              |  3 ++-\n>  src/android/camera_device.cpp                    |  9 ++++-----\n>  src/android/camera_device.h                      |  7 ++++---\n>  src/android/camera_hal_config.cpp                |  2 +-\n>  src/android/camera_hal_manager.cpp               |  4 ++--\n>  src/android/camera_metadata.cpp                  |  2 +-\n>  src/android/camera_worker.h                      |  6 +++---\n>  src/android/jpeg/encoder_libjpeg.cpp             |  3 ++-\n>  src/android/jpeg/exif.cpp                        |  3 +--\n>  src/android/jpeg/post_processor_jpeg.cpp         |  4 ++--\n>  src/android/jpeg/thumbnailer.cpp                 |  4 ++--\n>  src/android/mm/cros_camera_buffer.cpp            |  2 +-\n>  src/android/mm/generic_camera_buffer.cpp         |  3 ++-\n>  src/android/yuv/post_processor_yuv.cpp           |  3 ++-\n>  src/ipa/ipu3/ipu3.cpp                            |  3 ++-\n>  src/ipa/ipu3/ipu3_agc.cpp                        |  4 ++--\n>  src/ipa/ipu3/ipu3_awb.cpp                        |  2 +-\n>  src/ipa/libipa/histogram.cpp                     |  2 +-\n>  src/ipa/raspberrypi/cam_helper.hpp               |  4 ++--\n>  src/ipa/raspberrypi/controller/controller.cpp    |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/agc.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/alsc.cpp      |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/awb.cpp       |  2 +-\n>  .../raspberrypi/controller/rpi/black_level.cpp   |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/ccm.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/contrast.cpp  |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/dpc.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/focus.cpp     |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/geq.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/lux.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/noise.cpp     |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/sdn.cpp       |  2 +-\n>  src/ipa/raspberrypi/controller/rpi/sharpen.cpp   |  2 +-\n>  src/ipa/raspberrypi/raspberrypi.cpp              |  7 ++++---\n>  src/ipa/rkisp1/rkisp1.cpp                        |  4 ++--\n>  src/ipa/vimc/vimc.cpp                            |  3 ++-\n>  src/libcamera/{ => base}/bound_method.cpp        | 11 +++++------\n>  src/libcamera/{ => base}/event_dispatcher.cpp    |  7 +++----\n>  .../{ => base}/event_dispatcher_poll.cpp         | 10 +++++-----\n>  src/libcamera/{ => base}/log.cpp                 |  7 +++----\n>  src/libcamera/base/meson.build                   | 11 +++++++++++\n>  src/libcamera/{ => base}/message.cpp             |  9 ++++-----\n>  src/libcamera/{ => base}/object.cpp              | 16 +++++++---------\n>  src/libcamera/{ => base}/semaphore.cpp           |  6 +++---\n>  src/libcamera/{ => base}/signal.cpp              |  6 +++---\n>  src/libcamera/{ => base}/thread.cpp              | 12 ++++++------\n>  src/libcamera/{ => base}/timer.cpp               | 15 +++++++--------\n>  src/libcamera/buffer.cpp                         |  2 +-\n>  src/libcamera/byte_stream_buffer.cpp             |  2 +-\n>  src/libcamera/camera.cpp                         |  5 +++--\n>  src/libcamera/camera_manager.cpp                 |  5 +++--\n>  src/libcamera/camera_sensor_properties.cpp       |  4 ++--\n>  src/libcamera/control_serializer.cpp             |  3 ++-\n>  src/libcamera/controls.cpp                       |  2 +-\n>  src/libcamera/delayed_controls.cpp               |  3 ++-\n>  src/libcamera/device_enumerator.cpp              |  3 ++-\n>  src/libcamera/device_enumerator_sysfs.cpp        |  3 ++-\n>  src/libcamera/device_enumerator_udev.cpp         |  3 ++-\n>  src/libcamera/event_notifier.cpp                 |  6 +++---\n>  src/libcamera/file.cpp                           |  2 +-\n>  src/libcamera/file_descriptor.cpp                |  2 +-\n>  src/libcamera/formats.cpp                        |  2 +-\n>  src/libcamera/framebuffer_allocator.cpp          |  3 ++-\n>  src/libcamera/geometry.cpp                       |  2 +-\n>  src/libcamera/ipa_data_serializer.cpp            |  2 +-\n>  src/libcamera/ipa_manager.cpp                    |  2 +-\n>  src/libcamera/ipa_module.cpp                     |  2 +-\n>  src/libcamera/ipa_proxy.cpp                      |  2 +-\n>  src/libcamera/ipc_pipe.cpp                       |  2 +-\n>  src/libcamera/ipc_pipe_unixsocket.cpp            |  9 +++++----\n>  src/libcamera/ipc_unixsocket.cpp                 |  3 ++-\n>  src/libcamera/media_device.cpp                   |  2 +-\n>  src/libcamera/media_object.cpp                   |  3 ++-\n>  src/libcamera/meson.build                        | 11 -----------\n>  src/libcamera/pipeline/ipu3/cio2.h               |  2 +-\n>  src/libcamera/pipeline/ipu3/frames.h             |  2 +-\n>  src/libcamera/pipeline/ipu3/imgu.cpp             |  6 +++---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp             |  6 +++---\n>  src/libcamera/pipeline/raspberrypi/dma_heaps.cpp |  2 +-\n>  .../pipeline/raspberrypi/rpi_stream.cpp          |  4 ++--\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp         |  6 +++---\n>  src/libcamera/pipeline/rkisp1/rkisp1_path.h      |  3 ++-\n>  src/libcamera/pipeline/simple/converter.cpp      |  8 ++++----\n>  src/libcamera/pipeline/simple/converter.h        |  4 ++--\n>  src/libcamera/pipeline/simple/simple.cpp         |  3 ++-\n>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp     |  6 +++---\n>  src/libcamera/pipeline/vimc/vimc.cpp             |  8 +++++---\n>  src/libcamera/pipeline_handler.cpp               |  6 +++---\n>  src/libcamera/process.cpp                        |  2 +-\n>  src/libcamera/request.cpp                        |  3 ++-\n>  src/libcamera/stream.cpp                         |  2 +-\n>  src/libcamera/sysfs.cpp                          |  3 ++-\n>  src/libcamera/v4l2_device.cpp                    |  2 +-\n>  src/libcamera/v4l2_pixelformat.cpp               |  3 ++-\n>  src/libcamera/v4l2_subdevice.cpp                 |  2 +-\n>  src/libcamera/v4l2_videodevice.cpp               |  3 ++-\n>  src/v4l2/v4l2_camera.cpp                         |  2 +-\n>  src/v4l2/v4l2_camera.h                           |  4 ++--\n>  src/v4l2/v4l2_camera_proxy.cpp                   |  4 ++--\n>  src/v4l2/v4l2_compat_manager.cpp                 |  7 +++----\n>  test/camera/buffer_import.cpp                    |  7 ++++---\n>  test/camera/capture.cpp                          |  6 +++---\n>  test/event-dispatcher.cpp                        |  6 +++---\n>  test/event-thread.cpp                            |  5 +++--\n>  test/event.cpp                                   |  7 ++++---\n>  test/hotplug-cameras.cpp                         |  7 ++++---\n>  test/ipa/ipa_interface_test.cpp                  |  7 ++++---\n>  test/ipc/unixsocket.cpp                          |  7 ++++---\n>  test/ipc/unixsocket_ipc.cpp                      |  7 +++----\n>  test/log/log_api.cpp                             |  4 ++--\n>  test/log/log_process.cpp                         |  8 ++++----\n>  test/message.cpp                                 |  4 ++--\n>  test/object-delete.cpp                           |  5 ++---\n>  test/object-invoke.cpp                           |  7 +++----\n>  test/object.cpp                                  |  7 +++----\n>  test/process/process_test.cpp                    |  7 ++++---\n>  test/serialization/ipa_data_serializer_test.cpp  |  5 +++--\n>  test/signal-threads.cpp                          |  5 ++---\n>  test/signal.cpp                                  |  4 ++--\n>  test/threads.cpp                                 |  2 +-\n>  test/timer-thread.cpp                            |  6 +++---\n>  test/timer.cpp                                   |  6 +++---\n>  test/v4l2_videodevice/buffer_sharing.cpp         |  6 +++---\n>  test/v4l2_videodevice/capture_async.cpp          |  6 +++---\n>  test/v4l2_videodevice/v4l2_m2mdevice.cpp         |  7 ++++---\n>  .../module_ipa_proxy.cpp.tmpl                    |  5 +++--\n>  .../libcamera_templates/module_ipa_proxy.h.tmpl  |  3 ++-\n>  .../module_ipa_proxy_worker.cpp.tmpl             |  7 ++++---\n>  161 files changed, 384 insertions(+), 358 deletions(-)\n>  rename include/libcamera/{ => base}/bound_method.h (97%)\n>  rename include/libcamera/{internal => base}/event_dispatcher.h (79%)\n>  rename include/libcamera/{internal => base}/event_dispatcher_poll.h (82%)\n>  rename include/libcamera/{internal => base}/log.h (96%)\n>  rename include/libcamera/{internal => base}/message.h (87%)\n>  rename include/libcamera/{ => base}/object.h (89%)\n>  rename include/libcamera/{internal => base}/semaphore.h (74%)\n>  rename include/libcamera/{ => base}/signal.h (93%)\n>  rename include/libcamera/{internal => base}/thread.h (86%)\n>  rename include/libcamera/{internal => base}/timer.h (81%)\n>  rename src/libcamera/{ => base}/bound_method.cpp (94%)\n>  rename src/libcamera/{ => base}/event_dispatcher.cpp (97%)\n>  rename src/libcamera/{ => base}/event_dispatcher_poll.cpp (97%)\n>  rename src/libcamera/{ => base}/log.cpp (99%)\n>  rename src/libcamera/{ => base}/message.cpp (96%)\n>  rename src/libcamera/{ => base}/object.cpp (97%)\n>  rename src/libcamera/{ => base}/semaphore.cpp (96%)\n>  rename src/libcamera/{ => base}/signal.cpp (98%)\n>  rename src/libcamera/{ => base}/thread.cpp (98%)\n>  rename src/libcamera/{ => base}/timer.cpp (94%)\n> \n> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst\n> index 3047e006e5b6..152776935a33 100644\n> --- a/Documentation/guides/pipeline-handler.rst\n> +++ b/Documentation/guides/pipeline-handler.rst\n> @@ -288,7 +288,8 @@ features:\n>  \n>  .. code-block:: cpp\n>  \n> -   #include \"libcamera/internal/log.h\"\n> +   #include <libcamera/base/log.h>\n> +   \n>     #include \"libcamera/internal/pipeline_handler.h\"\n>  \n>  Run the following commands:\n> diff --git a/include/libcamera/bound_method.h b/include/libcamera/base/bound_method.h\n> similarity index 97%\n> rename from include/libcamera/bound_method.h\n> rename to include/libcamera/base/bound_method.h\n> index 4fc445ecd191..282f9b58ab60 100644\n> --- a/include/libcamera/bound_method.h\n> +++ b/include/libcamera/base/bound_method.h\n> @@ -4,8 +4,8 @@\n>   *\n>   * bound_method.h - Method bind and invocation\n>   */\n> -#ifndef __LIBCAMERA_BOUND_METHOD_H__\n> -#define __LIBCAMERA_BOUND_METHOD_H__\n> +#ifndef __LIBCAMERA_BASE_BOUND_METHOD_H__\n> +#define __LIBCAMERA_BASE_BOUND_METHOD_H__\n>  \n>  #include <memory>\n>  #include <tuple>\n> @@ -236,4 +236,4 @@ private:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_BOUND_METHOD_H__ */\n> +#endif /* __LIBCAMERA_BASE_BOUND_METHOD_H__ */\n> diff --git a/include/libcamera/internal/event_dispatcher.h b/include/libcamera/base/event_dispatcher.h\n> similarity index 79%\n> rename from include/libcamera/internal/event_dispatcher.h\n> rename to include/libcamera/base/event_dispatcher.h\n> index e6a8ad65ce0a..045df27fff16 100644\n> --- a/include/libcamera/internal/event_dispatcher.h\n> +++ b/include/libcamera/base/event_dispatcher.h\n> @@ -4,8 +4,8 @@\n>   *\n>   * event_dispatcher.h - Event dispatcher\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__\n> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__\n> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_H__\n> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_H__\n>  \n>  #include <vector>\n>  \n> @@ -32,4 +32,4 @@ public:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__ */\n> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_H__ */\n> diff --git a/include/libcamera/internal/event_dispatcher_poll.h b/include/libcamera/base/event_dispatcher_poll.h\n> similarity index 82%\n> rename from include/libcamera/internal/event_dispatcher_poll.h\n> rename to include/libcamera/base/event_dispatcher_poll.h\n> index 33de051de261..ae2a3f04e4b9 100644\n> --- a/include/libcamera/internal/event_dispatcher_poll.h\n> +++ b/include/libcamera/base/event_dispatcher_poll.h\n> @@ -4,14 +4,14 @@\n>   *\n>   * event_dispatcher_poll.h - Poll-based event dispatcher\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__\n> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__\n> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__\n> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__\n>  \n>  #include <list>\n>  #include <map>\n>  #include <vector>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n>  \n>  struct pollfd;\n>  \n> @@ -55,4 +55,4 @@ private:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__ */\n> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__ */\n> diff --git a/include/libcamera/internal/log.h b/include/libcamera/base/log.h\n> similarity index 96%\n> rename from include/libcamera/internal/log.h\n> rename to include/libcamera/base/log.h\n> index 82e55a623e04..b93c947ae7db 100644\n> --- a/include/libcamera/internal/log.h\n> +++ b/include/libcamera/base/log.h\n> @@ -4,8 +4,8 @@\n>   *\n>   * log.h - Logging infrastructure\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_LOG_H__\n> -#define __LIBCAMERA_INTERNAL_LOG_H__\n> +#ifndef __LIBCAMERA_BASE_LOG_H__\n> +#define __LIBCAMERA_BASE_LOG_H__\n>  \n>  #include <chrono>\n>  #include <sstream>\n> @@ -127,4 +127,4 @@ LogMessage _log(const LogCategory *category, LogSeverity severity,\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_INTERNAL_LOG_H__ */\n> +#endif /* __LIBCAMERA_BASE_LOG_H__ */\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index 2db756c504c9..7a858dcb6f1a 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -3,7 +3,17 @@\n>  libcamera_base_include_dir = libcamera_include_dir / 'base'\n>  \n>  libcamera_base_headers = files([\n> +    'bound_method.h',\n>      'class.h',\n> +    'event_dispatcher.h',\n> +    'event_dispatcher_poll.h',\n> +    'log.h',\n> +    'message.h',\n> +    'object.h',\n> +    'semaphore.h',\n> +    'signal.h',\n> +    'thread.h',\n> +    'timer.h',\n>      'utils.h',\n>  ])\n>  \n> diff --git a/include/libcamera/internal/message.h b/include/libcamera/base/message.h\n> similarity index 87%\n> rename from include/libcamera/internal/message.h\n> rename to include/libcamera/base/message.h\n> index f1b133bfb2ba..5d2a9f04f0a7 100644\n> --- a/include/libcamera/internal/message.h\n> +++ b/include/libcamera/base/message.h\n> @@ -4,12 +4,12 @@\n>   *\n>   * message.h - Message queue support\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_MESSAGE_H__\n> -#define __LIBCAMERA_INTERNAL_MESSAGE_H__\n> +#ifndef __LIBCAMERA_BASE_MESSAGE_H__\n> +#define __LIBCAMERA_BASE_MESSAGE_H__\n>  \n>  #include <atomic>\n>  \n> -#include <libcamera/bound_method.h>\n> +#include <libcamera/base/bound_method.h>\n>  \n>  namespace libcamera {\n>  \n> @@ -68,4 +68,4 @@ private:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_INTERNAL_MESSAGE_H__ */\n> +#endif /* __LIBCAMERA_BASE_MESSAGE_H__ */\n> diff --git a/include/libcamera/object.h b/include/libcamera/base/object.h\n> similarity index 89%\n> rename from include/libcamera/object.h\n> rename to include/libcamera/base/object.h\n> index a1882f05fb77..5c385ab4b140 100644\n> --- a/include/libcamera/object.h\n> +++ b/include/libcamera/base/object.h\n> @@ -4,14 +4,14 @@\n>   *\n>   * object.h - Base object\n>   */\n> -#ifndef __LIBCAMERA_OBJECT_H__\n> -#define __LIBCAMERA_OBJECT_H__\n> +#ifndef __LIBCAMERA_BASE_OBJECT_H__\n> +#define __LIBCAMERA_BASE_OBJECT_H__\n>  \n>  #include <list>\n>  #include <memory>\n>  #include <vector>\n>  \n> -#include <libcamera/bound_method.h>\n> +#include <libcamera/base/bound_method.h>\n>  \n>  namespace libcamera {\n>  \n> @@ -68,4 +68,4 @@ private:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_OBJECT_H__ */\n> +#endif /* __LIBCAMERA_BASE_OBJECT_H__ */\n> diff --git a/include/libcamera/internal/semaphore.h b/include/libcamera/base/semaphore.h\n> similarity index 74%\n> rename from include/libcamera/internal/semaphore.h\n> rename to include/libcamera/base/semaphore.h\n> index 9dc65d299cfd..c8e62e3ee68b 100644\n> --- a/include/libcamera/internal/semaphore.h\n> +++ b/include/libcamera/base/semaphore.h\n> @@ -4,12 +4,12 @@\n>   *\n>   * semaphore.h - General-purpose counting semaphore\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_SEMAPHORE_H__\n> -#define __LIBCAMERA_INTERNAL_SEMAPHORE_H__\n> +#ifndef __LIBCAMERA_BASE_SEMAPHORE_H__\n> +#define __LIBCAMERA_BASE_SEMAPHORE_H__\n>  \n>  #include <condition_variable>\n>  \n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/thread.h>\n>  \n>  namespace libcamera {\n>  \n> @@ -31,4 +31,4 @@ private:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_INTERNAL_SEMAPHORE_H__ */\n> +#endif /* __LIBCAMERA_BASE_SEMAPHORE_H__ */\n> diff --git a/include/libcamera/signal.h b/include/libcamera/base/signal.h\n> similarity index 93%\n> rename from include/libcamera/signal.h\n> rename to include/libcamera/base/signal.h\n> index 3233529a1275..c2521769a843 100644\n> --- a/include/libcamera/signal.h\n> +++ b/include/libcamera/base/signal.h\n> @@ -4,16 +4,16 @@\n>   *\n>   * signal.h - Signal & slot implementation\n>   */\n> -#ifndef __LIBCAMERA_SIGNAL_H__\n> -#define __LIBCAMERA_SIGNAL_H__\n> +#ifndef __LIBCAMERA_BASE_SIGNAL_H__\n> +#define __LIBCAMERA_BASE_SIGNAL_H__\n>  \n>  #include <functional>\n>  #include <list>\n>  #include <type_traits>\n>  #include <vector>\n>  \n> -#include <libcamera/bound_method.h>\n> -#include <libcamera/object.h>\n> +#include <libcamera/base/bound_method.h>\n> +#include <libcamera/base/object.h>\n>  \n>  namespace libcamera {\n>  \n> @@ -129,4 +129,4 @@ public:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_SIGNAL_H__ */\n> +#endif /* __LIBCAMERA_BASE_SIGNAL_H__ */\n> diff --git a/include/libcamera/internal/thread.h b/include/libcamera/base/thread.h\n> similarity index 86%\n> rename from include/libcamera/internal/thread.h\n> rename to include/libcamera/base/thread.h\n> index 9662e28bb581..2ed18d49c978 100644\n> --- a/include/libcamera/internal/thread.h\n> +++ b/include/libcamera/base/thread.h\n> @@ -4,20 +4,18 @@\n>   *\n>   * thread.h - Thread support\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_THREAD_H__\n> -#define __LIBCAMERA_INTERNAL_THREAD_H__\n> +#ifndef __LIBCAMERA_BASE_THREAD_H__\n> +#define __LIBCAMERA_BASE_THREAD_H__\n>  \n>  #include <memory>\n>  #include <mutex>\n>  #include <sys/types.h>\n>  #include <thread>\n>  \n> -#include <libcamera/signal.h>\n> -\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/signal.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/message.h\"\n> -\n>  namespace libcamera {\n>  \n>  class EventDispatcher;\n> @@ -75,4 +73,4 @@ private:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_INTERNAL_THREAD_H__ */\n> +#endif /* __LIBCAMERA_BASE_THREAD_H__ */\n> diff --git a/include/libcamera/internal/timer.h b/include/libcamera/base/timer.h\n> similarity index 81%\n> rename from include/libcamera/internal/timer.h\n> rename to include/libcamera/base/timer.h\n> index 013e93c0b4e6..e79e85f1ef0d 100644\n> --- a/include/libcamera/internal/timer.h\n> +++ b/include/libcamera/base/timer.h\n> @@ -4,14 +4,14 @@\n>   *\n>   * timer.h - Generic timer\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_TIMER_H__\n> -#define __LIBCAMERA_INTERNAL_TIMER_H__\n> +#ifndef __LIBCAMERA_BASE_TIMER_H__\n> +#define __LIBCAMERA_BASE_TIMER_H__\n>  \n>  #include <chrono>\n>  #include <stdint.h>\n>  \n> -#include <libcamera/object.h>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  namespace libcamera {\n>  \n> @@ -46,4 +46,4 @@ private:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_INTERNAL_TIMER_H__ */\n> +#endif /* __LIBCAMERA_BASE_TIMER_H__ */\n> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> index ea0914009c2b..b081907e0cb1 100644\n> --- a/include/libcamera/camera.h\n> +++ b/include/libcamera/camera.h\n> @@ -13,11 +13,11 @@\n>  #include <string>\n>  \n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  #include <libcamera/controls.h>\n> -#include <libcamera/object.h>\n>  #include <libcamera/request.h>\n> -#include <libcamera/signal.h>\n>  #include <libcamera/stream.h>\n>  #include <libcamera/transform.h>\n>  \n> diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h\n> index 5deede035115..744e5a06c78c 100644\n> --- a/include/libcamera/camera_manager.h\n> +++ b/include/libcamera/camera_manager.h\n> @@ -13,9 +13,8 @@\n>  #include <vector>\n>  \n>  #include <libcamera/base/class.h>\n> -\n> -#include <libcamera/object.h>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n> index 7bc540619721..db12b07ee8cc 100644\n> --- a/include/libcamera/internal/camera_sensor.h\n> +++ b/include/libcamera/internal/camera_sensor.h\n> @@ -12,13 +12,13 @@\n>  #include <vector>\n>  \n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/log.h>\n>  \n>  #include <libcamera/controls.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/ipa/core_ipa_interface.h>\n>  \n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>  \n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h\n> index 707cfe8f309d..222caf75a0db 100644\n> --- a/include/libcamera/internal/device_enumerator.h\n> +++ b/include/libcamera/internal/device_enumerator.h\n> @@ -13,7 +13,7 @@\n>  \n>  #include <linux/media.h>\n>  \n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/internal/event_notifier.h b/include/libcamera/internal/event_notifier.h\n> index cc3495c024f0..8a6419f23004 100644\n> --- a/include/libcamera/internal/event_notifier.h\n> +++ b/include/libcamera/internal/event_notifier.h\n> @@ -7,8 +7,8 @@\n>  #ifndef __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__\n>  #define __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__\n>  \n> -#include <libcamera/object.h>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h\n> index 70168acc25a5..76325b1d109f 100644\n> --- a/include/libcamera/internal/ipa_data_serializer.h\n> +++ b/include/libcamera/internal/ipa_data_serializer.h\n> @@ -14,6 +14,8 @@\n>  #include <type_traits>\n>  #include <vector>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/geometry.h>\n> @@ -22,7 +24,6 @@\n>  #include \"libcamera/internal/byte_stream_buffer.h\"\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/control_serializer.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h\n> index e904a2be796b..34224e330da7 100644\n> --- a/include/libcamera/internal/ipa_manager.h\n> +++ b/include/libcamera/internal/ipa_manager.h\n> @@ -10,11 +10,12 @@\n>  #include <stdint.h>\n>  #include <vector>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n>  \n>  #include \"libcamera/internal/ipa_module.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/pub_key.h\"\n>  \n> diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h\n> index 19fc58272210..a87f56502b9a 100644\n> --- a/include/libcamera/internal/ipa_module.h\n> +++ b/include/libcamera/internal/ipa_module.h\n> @@ -11,10 +11,11 @@\n>  #include <string>\n>  #include <vector>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  \n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h\n> index c9a84b78cbe5..e58de3402006 100644\n> --- a/include/libcamera/internal/ipc_pipe.h\n> +++ b/include/libcamera/internal/ipc_pipe.h\n> @@ -9,9 +9,9 @@\n>  \n>  #include <vector>\n>  \n> -#include \"libcamera/internal/ipc_unixsocket.h\"\n> +#include <libcamera/base/signal.h>\n>  \n> -#include <libcamera/signal.h>\n> +#include \"libcamera/internal/ipc_unixsocket.h\"\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h\n> index e871b65036bd..9f5b06773ced 100644\n> --- a/include/libcamera/internal/ipc_unixsocket.h\n> +++ b/include/libcamera/internal/ipc_unixsocket.h\n> @@ -12,7 +12,7 @@\n>  #include <sys/types.h>\n>  #include <vector>\n>  \n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h\n> index c3292508c87b..8424611d7eda 100644\n> --- a/include/libcamera/internal/media_device.h\n> +++ b/include/libcamera/internal/media_device.h\n> @@ -14,9 +14,9 @@\n>  \n>  #include <linux/media.h>\n>  \n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_object.h\"\n>  \n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index c84f9822ef6e..64f50373a7fb 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -22,8 +22,6 @@ libcamera_internal_headers = files([\n>      'device_enumerator.h',\n>      'device_enumerator_sysfs.h',\n>      'device_enumerator_udev.h',\n> -    'event_dispatcher.h',\n> -    'event_dispatcher_poll.h',\n>      'event_notifier.h',\n>      'file.h',\n>      'formats.h',\n> @@ -31,18 +29,13 @@ libcamera_internal_headers = files([\n>      'ipa_module.h',\n>      'ipa_proxy.h',\n>      'ipc_unixsocket.h',\n> -    'log.h',\n>      'media_device.h',\n>      'media_object.h',\n> -    'message.h',\n>      'pipeline_handler.h',\n>      'process.h',\n>      'pub_key.h',\n> -    'semaphore.h',\n>      'source-paths.h',\n>      'sysfs.h',\n> -    'thread.h',\n> -    'timer.h',\n>      'v4l2_device.h',\n>      'v4l2_pixelformat.h',\n>      'v4l2_subdevice.h',\n> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\n> index 8beb6b76dd3f..9e2d65d6f2c5 100644\n> --- a/include/libcamera/internal/pipeline_handler.h\n> +++ b/include/libcamera/internal/pipeline_handler.h\n> @@ -16,9 +16,9 @@\n>  #include <vector>\n>  \n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/object.h>\n>  \n>  #include <libcamera/controls.h>\n> -#include <libcamera/object.h>\n>  #include <libcamera/stream.h>\n>  \n>  #include \"libcamera/internal/ipa_proxy.h\"\n> diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h\n> index 254cda8535ae..c4d5d9c1c009 100644\n> --- a/include/libcamera/internal/process.h\n> +++ b/include/libcamera/internal/process.h\n> @@ -11,7 +11,7 @@\n>  #include <string>\n>  #include <vector>\n>  \n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h\n> index c318e976ad8e..1edd664a9aef 100644\n> --- a/include/libcamera/internal/v4l2_device.h\n> +++ b/include/libcamera/internal/v4l2_device.h\n> @@ -13,12 +13,12 @@\n>  \n>  #include <linux/videodev2.h>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n> +\n>  #include <libcamera/controls.h>\n> -#include <libcamera/signal.h>\n>  #include <libcamera/span.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> -\n>  namespace libcamera {\n>  \n>  class EventNotifier;\n> diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h\n> index d07dd6b444d0..97b89fb95087 100644\n> --- a/include/libcamera/internal/v4l2_subdevice.h\n> +++ b/include/libcamera/internal/v4l2_subdevice.h\n> @@ -12,11 +12,11 @@\n>  #include <vector>\n>  \n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/log.h>\n>  \n>  #include <libcamera/geometry.h>\n>  \n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_object.h\"\n>  #include \"libcamera/internal/v4l2_device.h\"\n>  \n> diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\n> index 227d015e8937..a7c3d5290d92 100644\n> --- a/include/libcamera/internal/v4l2_videodevice.h\n> +++ b/include/libcamera/internal/v4l2_videodevice.h\n> @@ -17,14 +17,14 @@\n>  #include <linux/videodev2.h>\n>  \n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  #include <libcamera/buffer.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/pixel_format.h>\n> -#include <libcamera/signal.h>\n>  \n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/v4l2_device.h\"\n>  #include \"libcamera/internal/v4l2_pixelformat.h\"\n>  \n> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\n> index 4aefaa7153b1..9a15c86b16e2 100644\n> --- a/include/libcamera/ipa/ipa_interface.h\n> +++ b/include/libcamera/ipa/ipa_interface.h\n> @@ -13,10 +13,11 @@\n>  #include <map>\n>  #include <vector>\n>  \n> +#include <libcamera/base/signal.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/geometry.h>\n> -#include <libcamera/signal.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index 7cba3de6ca96..d08bb3096aff 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -1,7 +1,6 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n>  libcamera_public_headers = files([\n> -    'bound_method.h',\n>      'buffer.h',\n>      'camera.h',\n>      'camera_manager.h',\n> @@ -11,10 +10,8 @@ libcamera_public_headers = files([\n>      'framebuffer_allocator.h',\n>      'geometry.h',\n>      'logging.h',\n> -    'object.h',\n>      'pixel_format.h',\n>      'request.h',\n> -    'signal.h',\n>      'span.h',\n>      'stream.h',\n>      'transform.h',\n> diff --git a/include/libcamera/request.h b/include/libcamera/request.h\n> index 00c646fea7f2..2d361c9d97dc 100644\n> --- a/include/libcamera/request.h\n> +++ b/include/libcamera/request.h\n> @@ -14,9 +14,9 @@\n>  #include <unordered_set>\n>  \n>  #include <libcamera/base/class.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  #include <libcamera/controls.h>\n> -#include <libcamera/signal.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n> index e6d435e0501f..da836baec903 100644\n> --- a/src/android/camera3_hal.cpp\n> +++ b/src/android/camera3_hal.cpp\n> @@ -7,7 +7,7 @@\n>  \n>  #include <hardware/camera_common.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"camera_device.h\"\n>  #include \"camera_hal_manager.h\"\n> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\n> index 00224a6d64b4..6b5edb66fad2 100644\n> --- a/src/android/camera_capabilities.cpp\n> +++ b/src/android/camera_capabilities.cpp\n> @@ -12,12 +12,13 @@\n>  \n>  #include <hardware/camera3.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/property_ids.h>\n>  \n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  using namespace libcamera;\n>  \n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 6243c07e231e..86ea22b61467 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -15,16 +15,15 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/formats.h>\n>  #include <libcamera/property_ids.h>\n>  \n> -#include <libcamera/base/utils.h>\n> -\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -\n>  #include \"system/graphics.h\"\n>  \n>  using namespace libcamera;\n> diff --git a/src/android/camera_device.h b/src/android/camera_device.h\n> index 090fe28a551e..4747f577a3e4 100644\n> --- a/src/android/camera_device.h\n> +++ b/src/android/camera_device.h\n> @@ -14,15 +14,16 @@\n>  \n>  #include <hardware/camera3.h>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/thread.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n>  #include \"libcamera/internal/buffer.h\"\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n>  \n>  #include \"camera_capabilities.h\"\n>  #include \"camera_metadata.h\"\n> diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp\n> index f33ba26935da..d84de4fd6f90 100644\n> --- a/src/android/camera_hal_config.cpp\n> +++ b/src/android/camera_hal_config.cpp\n> @@ -21,7 +21,7 @@ namespace filesystem = std::experimental::filesystem;\n>  \n>  #include <hardware/camera3.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  using namespace libcamera;\n>  \n> diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp\n> index 54087d3a2e45..4cd67544f0df 100644\n> --- a/src/android/camera_hal_manager.cpp\n> +++ b/src/android/camera_hal_manager.cpp\n> @@ -7,11 +7,11 @@\n>  \n>  #include \"camera_hal_manager.h\"\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/property_ids.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> -\n>  #include \"camera_device.h\"\n>  \n>  using namespace libcamera;\n> diff --git a/src/android/camera_metadata.cpp b/src/android/camera_metadata.cpp\n> index c7298d620668..3fc7cf273650 100644\n> --- a/src/android/camera_metadata.cpp\n> +++ b/src/android/camera_metadata.cpp\n> @@ -7,7 +7,7 @@\n>  \n>  #include \"camera_metadata.h\"\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  using namespace libcamera;\n>  \n> diff --git a/src/android/camera_worker.h b/src/android/camera_worker.h\n> index e289ef9b8655..6e1aee4a3247 100644\n> --- a/src/android/camera_worker.h\n> +++ b/src/android/camera_worker.h\n> @@ -9,14 +9,14 @@\n>  \n>  #include <memory>\n>  \n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/thread.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n> -#include <libcamera/object.h>\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n> -#include \"libcamera/internal/thread.h\"\n> -\n>  class CameraDevice;\n>  \n>  class CaptureRequest\n> diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp\n> index f006e1d1999a..e6358ca9466f 100644\n> --- a/src/android/jpeg/encoder_libjpeg.cpp\n> +++ b/src/android/jpeg/encoder_libjpeg.cpp\n> @@ -16,12 +16,13 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/formats.h>\n>  #include <libcamera/pixel_format.h>\n>  \n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  using namespace libcamera;\n>  \n> diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp\n> index 747f1cfaa8ac..0ba4cb85ffd0 100644\n> --- a/src/android/jpeg/exif.cpp\n> +++ b/src/android/jpeg/exif.cpp\n> @@ -14,10 +14,9 @@\n>  #include <tuple>\n>  #include <uchar.h>\n>  \n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> -\n>  using namespace libcamera;\n>  \n>  LOG_DEFINE_CATEGORY(EXIF)\n> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\n> index 058ccc998c6f..0e93f365d6db 100644\n> --- a/src/android/jpeg/post_processor_jpeg.cpp\n> +++ b/src/android/jpeg/post_processor_jpeg.cpp\n> @@ -14,9 +14,9 @@\n>  #include \"encoder_libjpeg.h\"\n>  #include \"exif.h\"\n>  \n> -#include <libcamera/formats.h>\n> +#include <libcamera/base/log.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/formats.h>\n>  \n>  using namespace libcamera;\n>  using namespace std::chrono_literals;\n> diff --git a/src/android/jpeg/thumbnailer.cpp b/src/android/jpeg/thumbnailer.cpp\n> index f709d3435d9c..5cb00744a688 100644\n> --- a/src/android/jpeg/thumbnailer.cpp\n> +++ b/src/android/jpeg/thumbnailer.cpp\n> @@ -7,9 +7,9 @@\n>  \n>  #include \"thumbnailer.h\"\n>  \n> -#include <libcamera/formats.h>\n> +#include <libcamera/base/log.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/formats.h>\n>  \n>  using namespace libcamera;\n>  \n> diff --git a/src/android/mm/cros_camera_buffer.cpp b/src/android/mm/cros_camera_buffer.cpp\n> index 59e26d1b5972..3cfa39a1714d 100644\n> --- a/src/android/mm/cros_camera_buffer.cpp\n> +++ b/src/android/mm/cros_camera_buffer.cpp\n> @@ -7,7 +7,7 @@\n>  \n>  #include \"../camera_buffer.h\"\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"cros-camera/camera_buffer_manager.h\"\n>  \n> diff --git a/src/android/mm/generic_camera_buffer.cpp b/src/android/mm/generic_camera_buffer.cpp\n> index cca88cf3632f..326fdc066499 100644\n> --- a/src/android/mm/generic_camera_buffer.cpp\n> +++ b/src/android/mm/generic_camera_buffer.cpp\n> @@ -9,8 +9,9 @@\n>  \n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/buffer.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  using namespace libcamera;\n>  \n> diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp\n> index b67364c8f147..772e805b32cc 100644\n> --- a/src/android/yuv/post_processor_yuv.cpp\n> +++ b/src/android/yuv/post_processor_yuv.cpp\n> @@ -9,12 +9,13 @@\n>  \n>  #include <libyuv/scale.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/formats.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/pixel_format.h>\n>  \n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  using namespace libcamera;\n>  \n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index 8b4c7351e9db..31a3c006a6eb 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -11,6 +11,8 @@\n>  #include <linux/intel-ipu3.h>\n>  #include <linux/v4l2-controls.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/ipa/ipa_interface.h>\n> @@ -19,7 +21,6 @@\n>  #include <libcamera/request.h>\n>  \n>  #include \"libcamera/internal/buffer.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  #include \"ipu3_agc.h\"\n>  #include \"ipu3_awb.h\"\n> diff --git a/src/ipa/ipu3/ipu3_agc.cpp b/src/ipa/ipu3/ipu3_agc.cpp\n> index c476a60d4cb8..fd0b70f02d25 100644\n> --- a/src/ipa/ipu3/ipu3_agc.cpp\n> +++ b/src/ipa/ipu3/ipu3_agc.cpp\n> @@ -11,9 +11,9 @@\n>  #include <cmath>\n>  #include <numeric>\n>  \n> -#include <libcamera/ipa/core_ipa_interface.h>\n> +#include <libcamera/base/log.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/ipa/core_ipa_interface.h>\n>  \n>  #include \"libipa/histogram.h\"\n>  \n> diff --git a/src/ipa/ipu3/ipu3_awb.cpp b/src/ipa/ipu3/ipu3_awb.cpp\n> index 54ce8e67124e..9b409c8ffad9 100644\n> --- a/src/ipa/ipu3/ipu3_awb.cpp\n> +++ b/src/ipa/ipu3/ipu3_awb.cpp\n> @@ -10,7 +10,7 @@\n>  #include <numeric>\n>  #include <unordered_map>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/ipa/libipa/histogram.cpp b/src/ipa/libipa/histogram.cpp\n> index d4d7cfdffa84..fb1eb2a2f0b1 100644\n> --- a/src/ipa/libipa/histogram.cpp\n> +++ b/src/ipa/libipa/histogram.cpp\n> @@ -8,7 +8,7 @@\n>  \n>  #include <cmath>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  /**\n>   * \\file histogram.h\n> diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp\n> index 221898ceb40d..a66648197140 100644\n> --- a/src/ipa/raspberrypi/cam_helper.hpp\n> +++ b/src/ipa/raspberrypi/cam_helper.hpp\n> @@ -10,13 +10,13 @@\n>  \n>  #include <libcamera/span.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"camera_mode.h\"\n>  #include \"controller/controller.hpp\"\n>  #include \"controller/metadata.hpp\"\n>  #include \"md_parser.hpp\"\n>  \n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  namespace RPiController {\n> diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp\n> index 96b58359a9e5..d3433ad2e7e8 100644\n> --- a/src/ipa/raspberrypi/controller/controller.cpp\n> +++ b/src/ipa/raspberrypi/controller/controller.cpp\n> @@ -5,7 +5,7 @@\n>   * controller.cpp - ISP controller\n>   */\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"algorithm.hpp\"\n>  #include \"controller.hpp\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> index 55e80ac74ae1..1ed578cfdbb6 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n> @@ -9,7 +9,7 @@\n>  \n>  #include \"linux/bcm2835-isp.h\"\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../awb_status.h\"\n>  #include \"../device_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n> index b0d24aa2ef44..3cdc95a99949 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n> @@ -6,7 +6,7 @@\n>   */\n>  #include <math.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../awb_status.h\"\n>  #include \"alsc.hpp\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> index 1c917e4f3408..5cfd33a384e7 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n> @@ -5,7 +5,7 @@\n>   * awb.cpp - AWB control algorithm\n>   */\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../lux_status.h\"\n>  \n> diff --git a/src/ipa/raspberrypi/controller/rpi/black_level.cpp b/src/ipa/raspberrypi/controller/rpi/black_level.cpp\n> index 9ac855f50014..6b3497f13c19 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/black_level.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/black_level.cpp\n> @@ -8,7 +8,7 @@\n>  #include <math.h>\n>  #include <stdint.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../black_level_status.h\"\n>  \n> diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n> index dbdcbb39dd12..821a4c7c98c5 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n> @@ -5,7 +5,7 @@\n>   * ccm.cpp - CCM (colour correction matrix) control algorithm\n>   */\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../awb_status.h\"\n>  #include \"../ccm_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.cpp b/src/ipa/raspberrypi/controller/rpi/contrast.cpp\n> index 2bc43027a291..ae55aad56739 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/contrast.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/contrast.cpp\n> @@ -6,7 +6,7 @@\n>   */\n>  #include <stdint.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../contrast_status.h\"\n>  #include \"../histogram.hpp\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n> index e533cd53e63b..110f50560e76 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n> @@ -5,7 +5,7 @@\n>   * dpc.cpp - DPC (defective pixel correction) control algorithm\n>   */\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"dpc.hpp\"\n>  \n> diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp\n> index bab4406fe3a1..a87ec802b964 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/focus.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp\n> @@ -6,7 +6,7 @@\n>   */\n>  #include <stdint.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../focus_status.h\"\n>  #include \"focus.hpp\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp\n> index 5eff116cd055..bdceb1f3d3eb 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/geq.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp\n> @@ -5,7 +5,7 @@\n>   * geq.cpp - GEQ (green equalisation) control algorithm\n>   */\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../device_status.h\"\n>  #include \"../lux_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> index 258e44f4dcce..f58d69397e1c 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp\n> @@ -8,7 +8,7 @@\n>  \n>  #include \"linux/bcm2835-isp.h\"\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../device_status.h\"\n>  \n> diff --git a/src/ipa/raspberrypi/controller/rpi/noise.cpp b/src/ipa/raspberrypi/controller/rpi/noise.cpp\n> index 156f750192f8..63cad639f313 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/noise.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/noise.cpp\n> @@ -7,7 +7,7 @@\n>  \n>  #include <math.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../device_status.h\"\n>  #include \"../noise_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/sdn.cpp b/src/ipa/raspberrypi/controller/rpi/sdn.cpp\n> index 959bc7406a01..9384550983e7 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/sdn.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/sdn.cpp\n> @@ -5,7 +5,7 @@\n>   * sdn.cpp - SDN (spatial denoise) control algorithm\n>   */\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../denoise_status.h\"\n>  #include \"../noise_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n> index 2cd861ca6898..b0c2e00a8ee1 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n> @@ -7,7 +7,7 @@\n>  \n>  #include <math.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include \"../sharpen_status.h\"\n>  \n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index 1c1e802a2cdc..a3f014495e80 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -13,6 +13,10 @@\n>  #include <string.h>\n>  #include <sys/mman.h>\n>  \n> +#include <linux/bcm2835-isp.h>\n> +\n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n> @@ -25,9 +29,6 @@\n>  #include <libcamera/span.h>\n>  \n>  #include \"libcamera/internal/buffer.h\"\n> -#include \"libcamera/internal/log.h\"\n> -\n> -#include <linux/bcm2835-isp.h>\n>  \n>  #include \"agc_algorithm.hpp\"\n>  #include \"agc_status.h\"\n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index b47ea3240f63..cdfb4d139e41 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -15,6 +15,8 @@\n>  #include <linux/rkisp1-config.h>\n>  #include <linux/v4l2-controls.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/ipa/ipa_interface.h>\n> @@ -22,8 +24,6 @@\n>  #include <libcamera/ipa/rkisp1_ipa_interface.h>\n>  #include <libcamera/request.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> -\n>  namespace libcamera {\n>  \n>  LOG_DEFINE_CATEGORY(IPARkISP1)\n> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\n> index 13681d8833ff..9ffd07f493a1 100644\n> --- a/src/ipa/vimc/vimc.cpp\n> +++ b/src/ipa/vimc/vimc.cpp\n> @@ -17,8 +17,9 @@\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/file.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/libcamera/bound_method.cpp b/src/libcamera/base/bound_method.cpp\n> similarity index 94%\n> rename from src/libcamera/bound_method.cpp\n> rename to src/libcamera/base/bound_method.cpp\n> index 4965bb5e167b..3ecec51c4b75 100644\n> --- a/src/libcamera/bound_method.cpp\n> +++ b/src/libcamera/base/bound_method.cpp\n> @@ -5,14 +5,13 @@\n>   * bound_method.cpp - Method bind and invocation\n>   */\n>  \n> -#include <libcamera/bound_method.h>\n> -\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/semaphore.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/bound_method.h>\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/semaphore.h>\n> +#include <libcamera/base/thread.h>\n>  \n>  /**\n> - * \\file bound_method.h\n> + * \\file base/bound_method.h\n>   * \\brief Method bind and invocation\n>   */\n>  \n> diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/base/event_dispatcher.cpp\n> similarity index 97%\n> rename from src/libcamera/event_dispatcher.cpp\n> rename to src/libcamera/base/event_dispatcher.cpp\n> index e0ce1eb3cc04..4be89e819832 100644\n> --- a/src/libcamera/event_dispatcher.cpp\n> +++ b/src/libcamera/base/event_dispatcher.cpp\n> @@ -5,12 +5,11 @@\n>   * event_dispatcher.cpp - Event dispatcher\n>   */\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/log.h>\n>  \n>  /**\n> - * \\file event_dispatcher.h\n> + * \\file base/event_dispatcher.h\n>   */\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp\n> similarity index 97%\n> rename from src/libcamera/event_dispatcher_poll.cpp\n> rename to src/libcamera/base/event_dispatcher_poll.cpp\n> index 0b6aee187063..d76ca7fc2c32 100644\n> --- a/src/libcamera/event_dispatcher_poll.cpp\n> +++ b/src/libcamera/base/event_dispatcher_poll.cpp\n> @@ -5,7 +5,7 @@\n>   * event_dispatcher_poll.cpp - Poll-based event dispatcher\n>   */\n>  \n> -#include \"libcamera/internal/event_dispatcher_poll.h\"\n> +#include <libcamera/base/event_dispatcher_poll.h>\n>  \n>  #include <algorithm>\n>  #include <chrono>\n> @@ -16,15 +16,15 @@\n>  #include <sys/eventfd.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  #include <libcamera/base/utils.h>\n>  \n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  \n>  /**\n> - * \\file event_dispatcher_poll.h\n> + * \\file base/event_dispatcher_poll.h\n>   */\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/log.cpp b/src/libcamera/base/log.cpp\n> similarity index 99%\n> rename from src/libcamera/log.cpp\n> rename to src/libcamera/base/log.cpp\n> index 5ff0e9017648..1801ae26a2e3 100644\n> --- a/src/libcamera/log.cpp\n> +++ b/src/libcamera/base/log.cpp\n> @@ -5,7 +5,7 @@\n>   * log.cpp - Logging infrastructure\n>   */\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  #include <array>\n>  #if HAVE_BACKTRACE\n> @@ -23,12 +23,11 @@\n>  \n>  #include <libcamera/logging.h>\n>  \n> +#include <libcamera/base/thread.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/thread.h\"\n> -\n>  /**\n> - * \\file log.h\n> + * \\file base/log.h\n>   * \\brief Logging infrastructure\n>   *\n>   * libcamera includes a logging infrastructure used through the library that\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index 302a288685d3..7a19c67c51b8 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -2,10 +2,21 @@\n>  \n>  libcamera_base_sources = files([\n>      'class.cpp',\n> +    'bound_method.cpp',\n> +    'event_dispatcher.cpp',\n> +    'event_dispatcher_poll.cpp',\n> +    'log.cpp',\n> +    'message.cpp',\n> +    'object.cpp',\n> +    'semaphore.cpp',\n> +    'signal.cpp',\n> +    'thread.cpp',\n> +    'timer.cpp',\n>      'utils.cpp',\n>  ])\n>  \n>  libcamera_base_deps = [\n> +    dependency('threads'),\n>  ]\n>  \n>  libcamera_base_lib = shared_library('libcamera-base',\n> diff --git a/src/libcamera/message.cpp b/src/libcamera/base/message.cpp\n> similarity index 96%\n> rename from src/libcamera/message.cpp\n> rename to src/libcamera/base/message.cpp\n> index bc985c077a4f..f1d772e43465 100644\n> --- a/src/libcamera/message.cpp\n> +++ b/src/libcamera/base/message.cpp\n> @@ -5,14 +5,13 @@\n>   * message.cpp - Message queue support\n>   */\n>  \n> -#include \"libcamera/internal/message.h\"\n> +#include <libcamera/base/message.h>\n>  \n> -#include <libcamera/signal.h>\n> -\n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  /**\n> - * \\file message.h\n> + * \\file base/message.h\n>   * \\brief Message queue support\n>   *\n>   * The messaging API enables inter-thread communication through message\n> diff --git a/src/libcamera/object.cpp b/src/libcamera/base/object.cpp\n> similarity index 97%\n> rename from src/libcamera/object.cpp\n> rename to src/libcamera/base/object.cpp\n> index 51cac64ea313..25410ecd949e 100644\n> --- a/src/libcamera/object.cpp\n> +++ b/src/libcamera/base/object.cpp\n> @@ -5,21 +5,19 @@\n>   * object.cpp - Base object\n>   */\n>  \n> -#include <libcamera/object.h>\n> +#include <libcamera/base/object.h>\n>  \n>  #include <algorithm>\n>  \n> -#include <libcamera/signal.h>\n> -\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/semaphore.h>\n> +#include <libcamera/base/signal.h>\n> +#include <libcamera/base/thread.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/semaphore.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -\n>  /**\n> - * \\file object.h\n> + * \\file base/object.h\n>   * \\brief Base object to support automatic signal disconnection\n>   */\n>  \n> diff --git a/src/libcamera/semaphore.cpp b/src/libcamera/base/semaphore.cpp\n> similarity index 96%\n> rename from src/libcamera/semaphore.cpp\n> rename to src/libcamera/base/semaphore.cpp\n> index d8988a9189e8..7aedc6a8c48b 100644\n> --- a/src/libcamera/semaphore.cpp\n> +++ b/src/libcamera/base/semaphore.cpp\n> @@ -5,11 +5,11 @@\n>   * semaphore.cpp - General-purpose counting semaphore\n>   */\n>  \n> -#include \"libcamera/internal/semaphore.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/semaphore.h>\n> +#include <libcamera/base/thread.h>\n>  \n>  /**\n> - * \\file semaphore.h\n> + * \\file base/semaphore.h\n>   * \\brief General-purpose counting semaphore\n>   */\n>  \n> diff --git a/src/libcamera/signal.cpp b/src/libcamera/base/signal.cpp\n> similarity index 98%\n> rename from src/libcamera/signal.cpp\n> rename to src/libcamera/base/signal.cpp\n> index 2532df3c3073..298b2d4b3619 100644\n> --- a/src/libcamera/signal.cpp\n> +++ b/src/libcamera/base/signal.cpp\n> @@ -5,12 +5,12 @@\n>   * signal.cpp - Signal & slot implementation\n>   */\n>  \n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>  \n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/thread.h>\n>  \n>  /**\n> - * \\file signal.h\n> + * \\file base/signal.h\n>   * \\brief Signal & slot implementation\n>   */\n>  \n> diff --git a/src/libcamera/thread.cpp b/src/libcamera/base/thread.cpp\n> similarity index 98%\n> rename from src/libcamera/thread.cpp\n> rename to src/libcamera/base/thread.cpp\n> index 91e4737ad032..c7c2d6b29d6a 100644\n> --- a/src/libcamera/thread.cpp\n> +++ b/src/libcamera/base/thread.cpp\n> @@ -5,7 +5,7 @@\n>   * thread.cpp - Thread support\n>   */\n>  \n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/thread.h>\n>  \n>  #include <atomic>\n>  #include <condition_variable>\n> @@ -14,10 +14,10 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/event_dispatcher_poll.h\"\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/message.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/event_dispatcher_poll.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/message.h>\n>  \n>  /**\n>   * \\page thread Thread Support\n> @@ -102,7 +102,7 @@\n>   */\n>  \n>  /**\n> - * \\file thread.h\n> + * \\file base/thread.h\n>   * \\brief Thread support\n>   */\n>  \n> diff --git a/src/libcamera/timer.cpp b/src/libcamera/base/timer.cpp\n> similarity index 94%\n> rename from src/libcamera/timer.cpp\n> rename to src/libcamera/base/timer.cpp\n> index 9496671edffc..9c54352d46bd 100644\n> --- a/src/libcamera/timer.cpp\n> +++ b/src/libcamera/base/timer.cpp\n> @@ -5,21 +5,20 @@\n>   * timer.cpp - Generic timer\n>   */\n>  \n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/timer.h>\n>  \n>  #include <chrono>\n>  \n> -#include <libcamera/camera_manager.h>\n> -\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/thread.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/camera_manager.h>\n>  \n>  /**\n> - * \\file timer.h\n> + * \\file base/timer.h\n>   * \\brief Generic timer\n>   */\n>  \n> diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp\n> index ca999429dce5..e4c345d518da 100644\n> --- a/src/libcamera/buffer.cpp\n> +++ b/src/libcamera/buffer.cpp\n> @@ -13,7 +13,7 @@\n>  #include <sys/mman.h>\n>  #include <unistd.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  /**\n>   * \\file libcamera/buffer.h\n> diff --git a/src/libcamera/byte_stream_buffer.cpp b/src/libcamera/byte_stream_buffer.cpp\n> index 7fc6f6944471..b67bb928f8c1 100644\n> --- a/src/libcamera/byte_stream_buffer.cpp\n> +++ b/src/libcamera/byte_stream_buffer.cpp\n> @@ -10,7 +10,7 @@\n>  #include <stdint.h>\n>  #include <string.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  /**\n>   * \\file byte_stream_buffer.h\n> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> index 1340c266cc5f..de0123aeafca 100644\n> --- a/src/libcamera/camera.cpp\n> +++ b/src/libcamera/camera.cpp\n> @@ -11,13 +11,14 @@\n>  #include <atomic>\n>  #include <iomanip>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +\n>  #include <libcamera/framebuffer_allocator.h>\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/thread.h\"\n>  \n>  /**\n>   * \\file camera.h\n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index a3784db6e697..fc3bd88c737b 100644\n> --- a/src/libcamera/camera_manager.cpp\n> +++ b/src/libcamera/camera_manager.cpp\n> @@ -14,12 +14,13 @@\n>  \n>  #include <libcamera/base/utils.h>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n>  \n>  /**\n>   * \\file camera_manager.h\n> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp\n> index fc4ea78d1fc7..7b7279efbba8 100644\n> --- a/src/libcamera/camera_sensor_properties.cpp\n> +++ b/src/libcamera/camera_sensor_properties.cpp\n> @@ -9,9 +9,9 @@\n>  \n>  #include <map>\n>  \n> -#include <libcamera/control_ids.h>\n> +#include <libcamera/base/log.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/control_ids.h>\n>  \n>  /**\n>   * \\file camera_sensor_properties.h\n> diff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp\n> index 097444130ef7..dd5a26083747 100644\n> --- a/src/libcamera/control_serializer.cpp\n> +++ b/src/libcamera/control_serializer.cpp\n> @@ -11,13 +11,14 @@\n>  #include <memory>\n>  #include <vector>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/ipa/ipa_controls.h>\n>  #include <libcamera/span.h>\n>  \n>  #include \"libcamera/internal/byte_stream_buffer.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  /**\n>   * \\file control_serializer.h\n> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\n> index 7df372ad3b6c..34317fa0f65d 100644\n> --- a/src/libcamera/controls.cpp\n> +++ b/src/libcamera/controls.cpp\n> @@ -12,10 +12,10 @@\n>  #include <string>\n>  #include <string.h>\n>  \n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n>  #include \"libcamera/internal/control_validator.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  /**\n>   * \\file controls.h\n> diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp\n> index 0bf81b510d16..90ce7e0b5b52 100644\n> --- a/src/libcamera/delayed_controls.cpp\n> +++ b/src/libcamera/delayed_controls.cpp\n> @@ -7,9 +7,10 @@\n>  \n>  #include \"libcamera/internal/delayed_controls.h\"\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/controls.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/v4l2_device.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp\n> index e6ecc360e32f..1f33faf5e7aa 100644\n> --- a/src/libcamera/device_enumerator.cpp\n> +++ b/src/libcamera/device_enumerator.cpp\n> @@ -11,7 +11,8 @@\n>  \n>  #include <string.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/media_device.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/device_enumerator_sysfs.cpp b/src/libcamera/device_enumerator_sysfs.cpp\n> index ff72885288c3..686bb8099485 100644\n> --- a/src/libcamera/device_enumerator_sysfs.cpp\n> +++ b/src/libcamera/device_enumerator_sysfs.cpp\n> @@ -17,7 +17,8 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/media_device.h\"\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> index d26fcf10b3c4..4b842773fcd6 100644\n> --- a/src/libcamera/device_enumerator_udev.cpp\n> +++ b/src/libcamera/device_enumerator_udev.cpp\n> @@ -17,8 +17,9 @@\n>  #include <sys/sysmacros.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp\n> index 6b0575c0db77..784016a9f907 100644\n> --- a/src/libcamera/event_notifier.cpp\n> +++ b/src/libcamera/event_notifier.cpp\n> @@ -9,9 +9,9 @@\n>  \n>  #include <libcamera/camera_manager.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/thread.h>\n>  \n>  /**\n>   * \\file event_notifier.h\n> diff --git a/src/libcamera/file.cpp b/src/libcamera/file.cpp\n> index bce2b6138239..def0f60d044b 100644\n> --- a/src/libcamera/file.cpp\n> +++ b/src/libcamera/file.cpp\n> @@ -14,7 +14,7 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  /**\n>   * \\file file.h\n> diff --git a/src/libcamera/file_descriptor.cpp b/src/libcamera/file_descriptor.cpp\n> index 8b505ed3b6b2..638b3bbe0449 100644\n> --- a/src/libcamera/file_descriptor.cpp\n> +++ b/src/libcamera/file_descriptor.cpp\n> @@ -11,7 +11,7 @@\n>  #include <unistd.h>\n>  #include <utility>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  /**\n>   * \\file file_descriptor.h\n> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\n> index 55822f4cc97b..f5fbaf0b95f9 100644\n> --- a/src/libcamera/formats.cpp\n> +++ b/src/libcamera/formats.cpp\n> @@ -12,7 +12,7 @@\n>  \n>  #include <libcamera/formats.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  /**\n>   * \\file internal/formats.h\n> diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp\n> index 2fbba37a1b0b..86a57923286c 100644\n> --- a/src/libcamera/framebuffer_allocator.cpp\n> +++ b/src/libcamera/framebuffer_allocator.cpp\n> @@ -9,11 +9,12 @@\n>  \n>  #include <errno.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/stream.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp\n> index 136446895eb6..9bbef0b537f1 100644\n> --- a/src/libcamera/geometry.cpp\n> +++ b/src/libcamera/geometry.cpp\n> @@ -10,7 +10,7 @@\n>  #include <sstream>\n>  #include <stdint.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  /**\n>   * \\file geometry.h\n> diff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp\n> index 131b3bd616fd..fb941e6bcd8a 100644\n> --- a/src/libcamera/ipa_data_serializer.cpp\n> +++ b/src/libcamera/ipa_data_serializer.cpp\n> @@ -7,7 +7,7 @@\n>  \n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  /**\n>   * \\file ipa_data_serializer.h\n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index 263cacd64737..35c7259801fa 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -12,12 +12,12 @@\n>  #include <string.h>\n>  #include <sys/types.h>\n>  \n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n>  #include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/ipa_proxy.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n> index a4e7fb861138..7ab5557916e7 100644\n> --- a/src/libcamera/ipa_module.cpp\n> +++ b/src/libcamera/ipa_module.cpp\n> @@ -23,10 +23,10 @@\n>  \n>  #include <libcamera/span.h>\n>  \n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n>  #include \"libcamera/internal/file.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> index ca980ec705a6..babcc48bcfd0 100644\n> --- a/src/libcamera/ipa_proxy.cpp\n> +++ b/src/libcamera/ipa_proxy.cpp\n> @@ -12,10 +12,10 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n>  #include \"libcamera/internal/ipa_module.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  /**\n>   * \\file ipa_proxy.h\n> diff --git a/src/libcamera/ipc_pipe.cpp b/src/libcamera/ipc_pipe.cpp\n> index c402c8d08699..28e20e031623 100644\n> --- a/src/libcamera/ipc_pipe.cpp\n> +++ b/src/libcamera/ipc_pipe.cpp\n> @@ -7,7 +7,7 @@\n>  \n>  #include \"libcamera/internal/ipc_pipe.h\"\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  /**\n>   * \\file ipc_pipe.h\n> diff --git a/src/libcamera/ipc_pipe_unixsocket.cpp b/src/libcamera/ipc_pipe_unixsocket.cpp\n> index db0e260f22b1..4511775fb467 100644\n> --- a/src/libcamera/ipc_pipe_unixsocket.cpp\n> +++ b/src/libcamera/ipc_pipe_unixsocket.cpp\n> @@ -9,13 +9,14 @@\n>  \n>  #include <vector>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/ipc_pipe.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> index fdb359f7fcd1..1466597077d4 100644\n> --- a/src/libcamera/ipc_unixsocket.cpp\n> +++ b/src/libcamera/ipc_unixsocket.cpp\n> @@ -12,8 +12,9 @@\n>  #include <sys/socket.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  /**\n>   * \\file ipc_unixsocket.h\n> diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\n> index 9ec84e560b77..e12ab1abb10d 100644\n> --- a/src/libcamera/media_device.cpp\n> +++ b/src/libcamera/media_device.cpp\n> @@ -18,7 +18,7 @@\n>  \n>  #include <linux/media.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  /**\n>   * \\file media_device.h\n> diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp\n> index 94aeb50402ca..815edc8e3b2d 100644\n> --- a/src/libcamera/media_object.cpp\n> +++ b/src/libcamera/media_object.cpp\n> @@ -15,7 +15,8 @@\n>  \n>  #include <linux/media.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/media_device.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index a341004c0c19..86212cec0281 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -2,7 +2,6 @@\n>  \n>  libcamera_sources = files([\n>      'bayer_format.cpp',\n> -    'bound_method.cpp',\n>      'buffer.cpp',\n>      'byte_stream_buffer.cpp',\n>      'camera.cpp',\n> @@ -16,8 +15,6 @@ libcamera_sources = files([\n>      'delayed_controls.cpp',\n>      'device_enumerator.cpp',\n>      'device_enumerator_sysfs.cpp',\n> -    'event_dispatcher.cpp',\n> -    'event_dispatcher_poll.cpp',\n>      'event_notifier.cpp',\n>      'file.cpp',\n>      'file_descriptor.cpp',\n> @@ -33,23 +30,16 @@ libcamera_sources = files([\n>      'ipc_pipe.cpp',\n>      'ipc_pipe_unixsocket.cpp',\n>      'ipc_unixsocket.cpp',\n> -    'log.cpp',\n>      'media_device.cpp',\n>      'media_object.cpp',\n> -    'message.cpp',\n> -    'object.cpp',\n>      'pipeline_handler.cpp',\n>      'pixel_format.cpp',\n>      'process.cpp',\n>      'pub_key.cpp',\n>      'request.cpp',\n> -    'semaphore.cpp',\n> -    'signal.cpp',\n>      'source-paths.cpp',\n>      'stream.cpp',\n>      'sysfs.cpp',\n> -    'thread.cpp',\n> -    'timer.cpp',\n>      'transform.cpp',\n>      'v4l2_device.cpp',\n>      'v4l2_pixelformat.cpp',\n> @@ -128,7 +118,6 @@ libcamera_deps = [\n>      liblttng,\n>      libudev,\n>      libcamera_base,\n> -    dependency('threads'),\n>  ]\n>  \n>  # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.\n> diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h\n> index d8d4a181ffd1..f28e9f1ddf42 100644\n> --- a/src/libcamera/pipeline/ipu3/cio2.h\n> +++ b/src/libcamera/pipeline/ipu3/cio2.h\n> @@ -11,7 +11,7 @@\n>  #include <queue>\n>  #include <vector>\n>  \n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n> diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h\n> index 59e64e8170a2..3ef7e4454693 100644\n> --- a/src/libcamera/pipeline/ipu3/frames.h\n> +++ b/src/libcamera/pipeline/ipu3/frames.h\n> @@ -12,7 +12,7 @@\n>  #include <queue>\n>  #include <vector>\n>  \n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\n> index 32d143a862b2..e955bc3456ba 100644\n> --- a/src/libcamera/pipeline/ipu3/imgu.cpp\n> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n> @@ -13,12 +13,12 @@\n>  \n>  #include <linux/media-bus-format.h>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/formats.h>\n>  #include <libcamera/stream.h>\n>  \n> -#include <libcamera/base/utils.h>\n> -\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 6b43ad2fb2b1..76c3bb3d8aa9 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -11,6 +11,9 @@\n>  #include <queue>\n>  #include <vector>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/formats.h>\n> @@ -20,13 +23,10 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/delayed_controls.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  \n> diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n> index 4d5dd6cb87cc..573ea11de607 100644\n> --- a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n> @@ -14,7 +14,7 @@\n>  #include <sys/ioctl.h>\n>  #include <unistd.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  /*\n>   * /dev/dma-heap/linux,cma is the dma-heap allocator, which allows dmaheap-cma\n> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> index f2430415d32d..b3265d0e8aab 100644\n> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> @@ -6,9 +6,9 @@\n>   */\n>  #include \"rpi_stream.h\"\n>  \n> -#include <libcamera/ipa/raspberrypi_ipa_interface.h>\n> +#include <libcamera/base/log.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/ipa/raspberrypi_ipa_interface.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index c625d7248f5c..00df4f0b3e6b 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -14,6 +14,9 @@\n>  \n>  #include <linux/media-bus-format.h>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n> @@ -24,13 +27,10 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/delayed_controls.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n> index 3b3e37d258d0..c185ac3992dd 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n> @@ -10,10 +10,11 @@\n>  #include <memory>\n>  #include <vector>\n>  \n> +#include <libcamera/base/signal.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/pixel_format.h>\n> -#include <libcamera/signal.h>\n>  #include <libcamera/span.h>\n>  \n>  #include \"libcamera/internal/media_object.h\"\n> diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp\n> index 589f185b1bf1..9af1096be834 100644\n> --- a/src/libcamera/pipeline/simple/converter.cpp\n> +++ b/src/libcamera/pipeline/simple/converter.cpp\n> @@ -10,14 +10,14 @@\n>  #include <algorithm>\n>  #include <limits.h>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/geometry.h>\n> -#include <libcamera/signal.h>\n>  #include <libcamera/stream.h>\n>  \n> -#include <libcamera/base/utils.h>\n> -\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n> diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h\n> index 480e528d2210..276a2a291c21 100644\n> --- a/src/libcamera/pipeline/simple/converter.h\n> +++ b/src/libcamera/pipeline/simple/converter.h\n> @@ -16,9 +16,9 @@\n>  #include <vector>\n>  \n>  #include <libcamera/pixel_format.h>\n> -#include <libcamera/signal.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 1894014d8fc7..4d78e6faf403 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -21,6 +21,8 @@\n>  \n>  #include <linux/media-bus-format.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/request.h>\n> @@ -28,7 +30,6 @@\n>  \n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n> diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> index d8c17dccae53..0f634b8da609 100644\n> --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> @@ -12,6 +12,9 @@\n>  #include <memory>\n>  #include <tuple>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n> @@ -19,10 +22,7 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n> index 025ca56205f8..361b715778ef 100644\n> --- a/src/libcamera/pipeline/vimc/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n> @@ -14,21 +14,23 @@\n>  #include <linux/media-bus-format.h>\n>  #include <linux/version.h>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/controls.h>\n>  #include <libcamera/formats.h>\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n> +#include <libcamera/ipa/vimc_ipa_interface.h>\n> +#include <libcamera/ipa/vimc_ipa_proxy.h>\n\nI thought these are already included below?\n\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n\nLike below here.\n\nWith that resolved,\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> index 6fb2a743c3c2..f626eddd321f 100644\n> --- a/src/libcamera/pipeline_handler.cpp\n> +++ b/src/libcamera/pipeline_handler.cpp\n> @@ -9,14 +9,14 @@\n>  \n>  #include <sys/sysmacros.h>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/camera_manager.h>\n>  \n> -#include <libcamera/base/utils.h>\n> -\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/tracepoints.h\"\n>  \n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 35091f60c1e9..463380299a65 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -20,10 +20,10 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  /**\n>   * \\file process.h\n> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\n> index 6611e74d1800..518384eb8cf6 100644\n> --- a/src/libcamera/request.cpp\n> +++ b/src/libcamera/request.cpp\n> @@ -10,13 +10,14 @@\n>  #include <map>\n>  #include <sstream>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/stream.h>\n>  \n>  #include \"libcamera/internal/camera_controls.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/tracepoints.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> index d5d68427e658..b8626775d224 100644\n> --- a/src/libcamera/stream.cpp\n> +++ b/src/libcamera/stream.cpp\n> @@ -15,9 +15,9 @@\n>  \n>  #include <libcamera/request.h>\n>  \n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n>  \n>  /**\n>   * \\file stream.h\n> diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp\n> index e9004b2b59c8..4372b1348178 100644\n> --- a/src/libcamera/sysfs.cpp\n> +++ b/src/libcamera/sysfs.cpp\n> @@ -12,8 +12,9 @@\n>  #include <sys/stat.h>\n>  #include <sys/sysmacros.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/file.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  /**\n>   * \\file sysfs.h\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index facb53e13169..334b9b78b812 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -16,10 +16,10 @@\n>  #include <sys/syscall.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\n> index 166d93cf1d20..87d728fe5577 100644\n> --- a/src/libcamera/v4l2_pixelformat.cpp\n> +++ b/src/libcamera/v4l2_pixelformat.cpp\n> @@ -12,11 +12,12 @@\n>  #include <map>\n>  #include <string.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/formats.h>\n>  #include <libcamera/pixel_format.h>\n>  \n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  /**\n>   * \\file v4l2_pixelformat.h\n> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> index 2c56cfafbce4..8fe5e45b31ee 100644\n> --- a/src/libcamera/v4l2_subdevice.cpp\n> +++ b/src/libcamera/v4l2_subdevice.cpp\n> @@ -19,9 +19,9 @@\n>  \n>  #include <libcamera/geometry.h>\n>  \n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/media_object.h\"\n>  \n> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> index 12c09dc7578d..dc23510bc5aa 100644\n> --- a/src/libcamera/v4l2_videodevice.cpp\n> +++ b/src/libcamera/v4l2_videodevice.cpp\n> @@ -21,10 +21,11 @@\n>  \n>  #include <linux/version.h>\n>  \n> +#include <libcamera/base/log.h>\n> +\n>  #include <libcamera/file_descriptor.h>\n>  \n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/media_object.h\"\n>  \n> diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp\n> index 97825c715bba..157ab94e0544 100644\n> --- a/src/v4l2/v4l2_camera.cpp\n> +++ b/src/v4l2/v4l2_camera.cpp\n> @@ -10,7 +10,7 @@\n>  #include <errno.h>\n>  #include <unistd.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/base/log.h>\n>  \n>  using namespace libcamera;\n>  \n> diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h\n> index d238046250e3..dbe0573bd3a4 100644\n> --- a/src/v4l2/v4l2_camera.h\n> +++ b/src/v4l2/v4l2_camera.h\n> @@ -12,13 +12,13 @@\n>  #include <mutex>\n>  #include <utility>\n>  \n> +#include <libcamera/base/semaphore.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/camera.h>\n>  #include <libcamera/file_descriptor.h>\n>  #include <libcamera/framebuffer_allocator.h>\n>  \n> -#include \"libcamera/internal/semaphore.h\"\n> -\n>  using namespace libcamera;\n>  \n>  class V4L2Camera\n> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\n> index a5a25507462e..7682c4bddf90 100644\n> --- a/src/v4l2/v4l2_camera_proxy.cpp\n> +++ b/src/v4l2/v4l2_camera_proxy.cpp\n> @@ -18,12 +18,12 @@\n>  \n>  #include <libcamera/camera.h>\n>  #include <libcamera/formats.h>\n> -#include <libcamera/object.h>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/object.h>\n>  #include <libcamera/base/utils.h>\n>  \n>  #include \"libcamera/internal/formats.h\"\n> -#include \"libcamera/internal/log.h\"\n>  \n>  #include \"v4l2_camera.h\"\n>  #include \"v4l2_camera_file.h\"\n> diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp\n> index 27de6c50ff4e..e566125a70ac 100644\n> --- a/src/v4l2/v4l2_compat_manager.cpp\n> +++ b/src/v4l2/v4l2_compat_manager.cpp\n> @@ -19,12 +19,11 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/camera.h>\n> -#include <libcamera/camera_manager.h>\n> -\n> +#include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/camera.h>\n> +#include <libcamera/camera_manager.h>\n>  \n>  #include \"v4l2_camera_file.h\"\n>  \n> diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp\n> index 61f4eb92ae95..c504ea09e64b 100644\n> --- a/test/camera/buffer_import.cpp\n> +++ b/test/camera/buffer_import.cpp\n> @@ -12,11 +12,12 @@\n>  #include <numeric>\n>  #include <vector>\n>  \n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/media_device.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  #include \"buffer_source.h\"\n> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> index c4bc21100777..238d98dbba16 100644\n> --- a/test/camera/capture.cpp\n> +++ b/test/camera/capture.cpp\n> @@ -9,9 +9,9 @@\n>  \n>  #include <libcamera/framebuffer_allocator.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  \n>  #include \"camera_test.h\"\n>  #include \"test.h\"\n> diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp\n> index 8ae05ac62985..1cc17b045ec0 100644\n> --- a/test/event-dispatcher.cpp\n> +++ b/test/event-dispatcher.cpp\n> @@ -10,9 +10,9 @@\n>  #include <signal.h>\n>  #include <sys/time.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/event-thread.cpp b/test/event-thread.cpp\n> index aeb8b3bf4bac..05c5d26d3611 100644\n> --- a/test/event-thread.cpp\n> +++ b/test/event-thread.cpp\n> @@ -10,9 +10,10 @@\n>  #include <string.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/event.cpp b/test/event.cpp\n> index 1f16c97bbab5..aa79da99c286 100644\n> --- a/test/event.cpp\n> +++ b/test/event.cpp\n> @@ -9,10 +9,11 @@\n>  #include <string.h>\n>  #include <unistd.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp\n> index 94cb859352ec..bb160537c5d5 100644\n> --- a/test/hotplug-cameras.cpp\n> +++ b/test/hotplug-cameras.cpp\n> @@ -14,10 +14,11 @@\n>  #include <libcamera/camera.h>\n>  #include <libcamera/camera_manager.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/file.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\n> index d6ca6f5137b0..656d86552d85 100644\n> --- a/test/ipa/ipa_interface_test.cpp\n> +++ b/test/ipa/ipa_interface_test.cpp\n> @@ -14,15 +14,16 @@\n>  \n>  #include <libcamera/ipa/vimc_ipa_proxy.h>\n>  \n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp\n> index 80157b342795..aa35c8f071f1 100644\n> --- a/test/ipc/unixsocket.cpp\n> +++ b/test/ipc/unixsocket.cpp\n> @@ -16,10 +16,11 @@\n>  #include <sys/wait.h>\n>  #include <unistd.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp\n> index 161d09b98719..6fe7fd9b8fc5 100644\n> --- a/test/ipc/unixsocket_ipc.cpp\n> +++ b/test/ipc/unixsocket_ipc.cpp\n> @@ -15,19 +15,18 @@\n>  #include <sys/wait.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>  #include \"libcamera/internal/ipc_pipe.h\"\n>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> -\n>  using namespace std;\n>  using namespace libcamera;\n>  \n> diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp\n> index ae3c607a6881..5311896095a9 100644\n> --- a/test/log/log_api.cpp\n> +++ b/test/log/log_api.cpp\n> @@ -16,9 +16,9 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/logging.h>\n> +#include <libcamera/base/log.h>\n>  \n> -#include \"libcamera/internal/log.h\"\n> +#include <libcamera/logging.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> index 413d9207ea68..d138aa7ff562 100644\n> --- a/test/log/log_process.cpp\n> +++ b/test/log/log_process.cpp\n> @@ -16,13 +16,13 @@\n>  \n>  #include <libcamera/logging.h>\n>  \n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/message.cpp b/test/message.cpp\n> index 9553ba8cbaed..eeea57feab76 100644\n> --- a/test/message.cpp\n> +++ b/test/message.cpp\n> @@ -9,8 +9,8 @@\n>  #include <iostream>\n>  #include <thread>\n>  \n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/thread.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/object-delete.cpp b/test/object-delete.cpp\n> index a1a6f5ccefd5..eabefe935974 100644\n> --- a/test/object-delete.cpp\n> +++ b/test/object-delete.cpp\n> @@ -7,9 +7,8 @@\n>  \n>  #include <iostream>\n>  \n> -#include <libcamera/object.h>\n> -\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/thread.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp\n> index a6f816f395eb..b1c0f473ba5c 100644\n> --- a/test/object-invoke.cpp\n> +++ b/test/object-invoke.cpp\n> @@ -8,10 +8,9 @@\n>  #include <iostream>\n>  #include <thread>\n>  \n> -#include <libcamera/object.h>\n> -\n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/thread.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/object.cpp b/test/object.cpp\n> index 264659b405d9..cbd0d3ececab 100644\n> --- a/test/object.cpp\n> +++ b/test/object.cpp\n> @@ -7,10 +7,9 @@\n>  \n>  #include <iostream>\n>  \n> -#include <libcamera/object.h>\n> -\n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/thread.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> index a5155bae3162..8f7a1f05f681 100644\n> --- a/test/process/process_test.cpp\n> +++ b/test/process/process_test.cpp\n> @@ -9,12 +9,13 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> +\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp\n> index dbbba8912386..880bcd02c6be 100644\n> --- a/test/serialization/ipa_data_serializer_test.cpp\n> +++ b/test/serialization/ipa_data_serializer_test.cpp\n> @@ -17,13 +17,14 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"serialization_test.h\"\n>  #include \"test.h\"\n> diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp\n> index 8a96b5d2abb3..d5e2eb662df2 100644\n> --- a/test/signal-threads.cpp\n> +++ b/test/signal-threads.cpp\n> @@ -9,11 +9,10 @@\n>  #include <iostream>\n>  #include <thread>\n>  \n> +#include <libcamera/base/message.h>\n> +#include <libcamera/base/thread.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -\n>  #include \"test.h\"\n>  \n>  using namespace std;\n> diff --git a/test/signal.cpp b/test/signal.cpp\n> index f83ceb05f091..aceb02789cf4 100644\n> --- a/test/signal.cpp\n> +++ b/test/signal.cpp\n> @@ -8,8 +8,8 @@\n>  #include <iostream>\n>  #include <string.h>\n>  \n> -#include <libcamera/object.h>\n> -#include <libcamera/signal.h>\n> +#include <libcamera/base/object.h>\n> +#include <libcamera/base/signal.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/threads.cpp b/test/threads.cpp\n> index e0c50dc90a65..d83b5833998f 100644\n> --- a/test/threads.cpp\n> +++ b/test/threads.cpp\n> @@ -10,7 +10,7 @@\n>  #include <memory>\n>  #include <thread>\n>  \n> -#include \"libcamera/internal/thread.h\"\n> +#include <libcamera/base/thread.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> index be29eee1bdb6..2c14865b74d5 100644\n> --- a/test/timer-thread.cpp\n> +++ b/test/timer-thread.cpp\n> @@ -8,9 +8,9 @@\n>  #include <chrono>\n>  #include <iostream>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/timer.cpp b/test/timer.cpp\n> index fc90b11040d8..88f226e79f5f 100644\n> --- a/test/timer.cpp\n> +++ b/test/timer.cpp\n> @@ -8,9 +8,9 @@\n>  #include <chrono>\n>  #include <iostream>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp\n> index c75259be0d10..91b3e4a0dad6 100644\n> --- a/test/v4l2_videodevice/buffer_sharing.cpp\n> +++ b/test/v4l2_videodevice/buffer_sharing.cpp\n> @@ -14,9 +14,9 @@\n>  \n>  #include <libcamera/buffer.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  \n>  #include \"v4l2_videodevice_test.h\"\n>  \n> diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp\n> index accdb34a699c..f12c8bef97f6 100644\n> --- a/test/v4l2_videodevice/capture_async.cpp\n> +++ b/test/v4l2_videodevice/capture_async.cpp\n> @@ -9,9 +9,9 @@\n>  \n>  #include <libcamera/buffer.h>\n>  \n> -#include \"libcamera/internal/event_dispatcher.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n>  \n>  #include \"v4l2_videodevice_test.h\"\n>  \n> diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> index e0f068082c01..fe4b3cc6487f 100644\n> --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> @@ -9,11 +9,12 @@\n>  \n>  #include <libcamera/buffer.h>\n>  \n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/timer.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/media_device.h\"\n> -#include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  #include \"test.h\"\n> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> index dc6748153445..5a64fe9cfeee 100644\n> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n> @@ -23,6 +23,9 @@\n>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>\n>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>\n>  \n> +#include <libcamera/base/log.h>\n> +#include <libcamera/base/thread.h>\n> +\n>  #include \"libcamera/internal/control_serializer.h\"\n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n> @@ -30,9 +33,7 @@\n>  #include \"libcamera/internal/ipc_pipe.h\"\n>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n> -#include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/process.h\"\n> -#include \"libcamera/internal/thread.h\"\n>  \n>  namespace libcamera {\n>  \n> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n> index 017b870c9dad..ae168548492c 100644\n> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n> @@ -19,12 +19,13 @@\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>\n>  \n> +#include <libcamera/base/thread.h>\n> +\n>  #include \"libcamera/internal/control_serializer.h\"\n>  #include \"libcamera/internal/ipa_proxy.h\"\n>  #include \"libcamera/internal/ipc_pipe.h\"\n>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n> -#include \"libcamera/internal/thread.h\"\n>  \n>  namespace libcamera {\n>  {%- if has_namespace %}\n> 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\n> index 8a57b6cc8b34..d993e39e5a5f 100644\n> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n> @@ -26,17 +26,18 @@\n>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>\n>  #include <libcamera/logging.h>\n>  \n> +#include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/thread.h>\n> +#include <libcamera/base/log.h>\n> +\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/control_serializer.h\"\n> -#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/ipa_proxy.h\"\n>  #include \"libcamera/internal/ipc_pipe.h\"\n>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n> -#include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/thread.h\"\n>  \n>  using namespace libcamera;\n>  \n> -- \n> 2.30.2\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 87217C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 04:31:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DA320684CF;\n\tFri, 25 Jun 2021 06:31:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4E30C60508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 06:31:43 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B14ED501;\n\tFri, 25 Jun 2021 06:31:40 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"I6vcIDRx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624595503;\n\tbh=QV1LBBgwat4vEm4r/Rkdx6Ycd84/HyO/3lCMTM0nCUs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=I6vcIDRxL38Dk9In4WBOd/sfGAIdy+fm0kI2SIeb6IME5d7XavMacMUFCvDtwozPt\n\tOCQK0iUhQgheltE1/F2Ti5jTIYq3S0bLafpeCAr1n7L6mmtPRbQcPMCIhJphuGvZiR\n\tMPZDqgCSSFhX84xYHj6UEbjDkjDu8JbuEPpGwp/c=","Date":"Fri, 25 Jun 2021 13:31:33 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625043133.GJ2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-10-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-10-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 09/16] libcamera/base: Move extended\n\tbase functionality","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17795,"web_url":"https://patchwork.libcamera.org/comment/17795/","msgid":"<60e77aff-d906-4729-b51f-8d1762e04f14@ideasonboard.com>","date":"2021-06-25T10:47:50","subject":"Re: [libcamera-devel] [PATCH 09/16] libcamera/base: Move extended\n\tbase functionality","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Paul,\n\nOn 25/06/2021 05:31, paul.elder@ideasonboard.com wrote:\n> On Fri, Jun 25, 2021 at 02:35:32AM +0100, Kieran Bingham wrote:\n>> Move the functionality for the following components to the new\n>> base support library:\n>>\n>>  - BoundMethod\n>>  - EventDispatcher\n>>  - EventDispatcherPoll\n>>  - Log\n>>  - Message\n>>  - Object\n>>  - Signal\n>>  - Semaphore\n>>  - Thread\n>>  - Timer\n>>\n>> While it would be preferable to see these split to move one component\n>> per commit, these components are all interdependant upon each other,\n>> which leaves us with one big change performing the move for all of them.\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  Documentation/guides/pipeline-handler.rst        |  3 ++-\n>>  include/libcamera/{ => base}/bound_method.h      |  6 +++---\n>>  .../{internal => base}/event_dispatcher.h        |  6 +++---\n>>  .../{internal => base}/event_dispatcher_poll.h   |  8 ++++----\n>>  include/libcamera/{internal => base}/log.h       |  6 +++---\n>>  include/libcamera/base/meson.build               | 10 ++++++++++\n>>  include/libcamera/{internal => base}/message.h   |  8 ++++----\n>>  include/libcamera/{ => base}/object.h            |  8 ++++----\n>>  include/libcamera/{internal => base}/semaphore.h |  8 ++++----\n>>  include/libcamera/{ => base}/signal.h            | 10 +++++-----\n>>  include/libcamera/{internal => base}/thread.h    | 12 +++++-------\n>>  include/libcamera/{internal => base}/timer.h     | 10 +++++-----\n>>  include/libcamera/camera.h                       |  4 ++--\n>>  include/libcamera/camera_manager.h               |  5 ++---\n>>  include/libcamera/internal/camera_sensor.h       |  2 +-\n>>  include/libcamera/internal/device_enumerator.h   |  2 +-\n>>  include/libcamera/internal/event_notifier.h      |  4 ++--\n>>  include/libcamera/internal/ipa_data_serializer.h |  3 ++-\n>>  include/libcamera/internal/ipa_manager.h         |  3 ++-\n>>  include/libcamera/internal/ipa_module.h          |  3 ++-\n>>  include/libcamera/internal/ipc_pipe.h            |  4 ++--\n>>  include/libcamera/internal/ipc_unixsocket.h      |  2 +-\n>>  include/libcamera/internal/media_device.h        |  4 ++--\n>>  include/libcamera/internal/meson.build           |  7 -------\n>>  include/libcamera/internal/pipeline_handler.h    |  2 +-\n>>  include/libcamera/internal/process.h             |  2 +-\n>>  include/libcamera/internal/v4l2_device.h         |  6 +++---\n>>  include/libcamera/internal/v4l2_subdevice.h      |  2 +-\n>>  include/libcamera/internal/v4l2_videodevice.h    |  4 ++--\n>>  include/libcamera/ipa/ipa_interface.h            |  3 ++-\n>>  include/libcamera/meson.build                    |  3 ---\n>>  include/libcamera/request.h                      |  2 +-\n>>  src/android/camera3_hal.cpp                      |  2 +-\n>>  src/android/camera_capabilities.cpp              |  3 ++-\n>>  src/android/camera_device.cpp                    |  9 ++++-----\n>>  src/android/camera_device.h                      |  7 ++++---\n>>  src/android/camera_hal_config.cpp                |  2 +-\n>>  src/android/camera_hal_manager.cpp               |  4 ++--\n>>  src/android/camera_metadata.cpp                  |  2 +-\n>>  src/android/camera_worker.h                      |  6 +++---\n>>  src/android/jpeg/encoder_libjpeg.cpp             |  3 ++-\n>>  src/android/jpeg/exif.cpp                        |  3 +--\n>>  src/android/jpeg/post_processor_jpeg.cpp         |  4 ++--\n>>  src/android/jpeg/thumbnailer.cpp                 |  4 ++--\n>>  src/android/mm/cros_camera_buffer.cpp            |  2 +-\n>>  src/android/mm/generic_camera_buffer.cpp         |  3 ++-\n>>  src/android/yuv/post_processor_yuv.cpp           |  3 ++-\n>>  src/ipa/ipu3/ipu3.cpp                            |  3 ++-\n>>  src/ipa/ipu3/ipu3_agc.cpp                        |  4 ++--\n>>  src/ipa/ipu3/ipu3_awb.cpp                        |  2 +-\n>>  src/ipa/libipa/histogram.cpp                     |  2 +-\n>>  src/ipa/raspberrypi/cam_helper.hpp               |  4 ++--\n>>  src/ipa/raspberrypi/controller/controller.cpp    |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/agc.cpp       |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/alsc.cpp      |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/awb.cpp       |  2 +-\n>>  .../raspberrypi/controller/rpi/black_level.cpp   |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/ccm.cpp       |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/contrast.cpp  |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/dpc.cpp       |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/focus.cpp     |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/geq.cpp       |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/lux.cpp       |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/noise.cpp     |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/sdn.cpp       |  2 +-\n>>  src/ipa/raspberrypi/controller/rpi/sharpen.cpp   |  2 +-\n>>  src/ipa/raspberrypi/raspberrypi.cpp              |  7 ++++---\n>>  src/ipa/rkisp1/rkisp1.cpp                        |  4 ++--\n>>  src/ipa/vimc/vimc.cpp                            |  3 ++-\n>>  src/libcamera/{ => base}/bound_method.cpp        | 11 +++++------\n>>  src/libcamera/{ => base}/event_dispatcher.cpp    |  7 +++----\n>>  .../{ => base}/event_dispatcher_poll.cpp         | 10 +++++-----\n>>  src/libcamera/{ => base}/log.cpp                 |  7 +++----\n>>  src/libcamera/base/meson.build                   | 11 +++++++++++\n>>  src/libcamera/{ => base}/message.cpp             |  9 ++++-----\n>>  src/libcamera/{ => base}/object.cpp              | 16 +++++++---------\n>>  src/libcamera/{ => base}/semaphore.cpp           |  6 +++---\n>>  src/libcamera/{ => base}/signal.cpp              |  6 +++---\n>>  src/libcamera/{ => base}/thread.cpp              | 12 ++++++------\n>>  src/libcamera/{ => base}/timer.cpp               | 15 +++++++--------\n>>  src/libcamera/buffer.cpp                         |  2 +-\n>>  src/libcamera/byte_stream_buffer.cpp             |  2 +-\n>>  src/libcamera/camera.cpp                         |  5 +++--\n>>  src/libcamera/camera_manager.cpp                 |  5 +++--\n>>  src/libcamera/camera_sensor_properties.cpp       |  4 ++--\n>>  src/libcamera/control_serializer.cpp             |  3 ++-\n>>  src/libcamera/controls.cpp                       |  2 +-\n>>  src/libcamera/delayed_controls.cpp               |  3 ++-\n>>  src/libcamera/device_enumerator.cpp              |  3 ++-\n>>  src/libcamera/device_enumerator_sysfs.cpp        |  3 ++-\n>>  src/libcamera/device_enumerator_udev.cpp         |  3 ++-\n>>  src/libcamera/event_notifier.cpp                 |  6 +++---\n>>  src/libcamera/file.cpp                           |  2 +-\n>>  src/libcamera/file_descriptor.cpp                |  2 +-\n>>  src/libcamera/formats.cpp                        |  2 +-\n>>  src/libcamera/framebuffer_allocator.cpp          |  3 ++-\n>>  src/libcamera/geometry.cpp                       |  2 +-\n>>  src/libcamera/ipa_data_serializer.cpp            |  2 +-\n>>  src/libcamera/ipa_manager.cpp                    |  2 +-\n>>  src/libcamera/ipa_module.cpp                     |  2 +-\n>>  src/libcamera/ipa_proxy.cpp                      |  2 +-\n>>  src/libcamera/ipc_pipe.cpp                       |  2 +-\n>>  src/libcamera/ipc_pipe_unixsocket.cpp            |  9 +++++----\n>>  src/libcamera/ipc_unixsocket.cpp                 |  3 ++-\n>>  src/libcamera/media_device.cpp                   |  2 +-\n>>  src/libcamera/media_object.cpp                   |  3 ++-\n>>  src/libcamera/meson.build                        | 11 -----------\n>>  src/libcamera/pipeline/ipu3/cio2.h               |  2 +-\n>>  src/libcamera/pipeline/ipu3/frames.h             |  2 +-\n>>  src/libcamera/pipeline/ipu3/imgu.cpp             |  6 +++---\n>>  src/libcamera/pipeline/ipu3/ipu3.cpp             |  6 +++---\n>>  src/libcamera/pipeline/raspberrypi/dma_heaps.cpp |  2 +-\n>>  .../pipeline/raspberrypi/rpi_stream.cpp          |  4 ++--\n>>  src/libcamera/pipeline/rkisp1/rkisp1.cpp         |  6 +++---\n>>  src/libcamera/pipeline/rkisp1/rkisp1_path.h      |  3 ++-\n>>  src/libcamera/pipeline/simple/converter.cpp      |  8 ++++----\n>>  src/libcamera/pipeline/simple/converter.h        |  4 ++--\n>>  src/libcamera/pipeline/simple/simple.cpp         |  3 ++-\n>>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp     |  6 +++---\n>>  src/libcamera/pipeline/vimc/vimc.cpp             |  8 +++++---\n>>  src/libcamera/pipeline_handler.cpp               |  6 +++---\n>>  src/libcamera/process.cpp                        |  2 +-\n>>  src/libcamera/request.cpp                        |  3 ++-\n>>  src/libcamera/stream.cpp                         |  2 +-\n>>  src/libcamera/sysfs.cpp                          |  3 ++-\n>>  src/libcamera/v4l2_device.cpp                    |  2 +-\n>>  src/libcamera/v4l2_pixelformat.cpp               |  3 ++-\n>>  src/libcamera/v4l2_subdevice.cpp                 |  2 +-\n>>  src/libcamera/v4l2_videodevice.cpp               |  3 ++-\n>>  src/v4l2/v4l2_camera.cpp                         |  2 +-\n>>  src/v4l2/v4l2_camera.h                           |  4 ++--\n>>  src/v4l2/v4l2_camera_proxy.cpp                   |  4 ++--\n>>  src/v4l2/v4l2_compat_manager.cpp                 |  7 +++----\n>>  test/camera/buffer_import.cpp                    |  7 ++++---\n>>  test/camera/capture.cpp                          |  6 +++---\n>>  test/event-dispatcher.cpp                        |  6 +++---\n>>  test/event-thread.cpp                            |  5 +++--\n>>  test/event.cpp                                   |  7 ++++---\n>>  test/hotplug-cameras.cpp                         |  7 ++++---\n>>  test/ipa/ipa_interface_test.cpp                  |  7 ++++---\n>>  test/ipc/unixsocket.cpp                          |  7 ++++---\n>>  test/ipc/unixsocket_ipc.cpp                      |  7 +++----\n>>  test/log/log_api.cpp                             |  4 ++--\n>>  test/log/log_process.cpp                         |  8 ++++----\n>>  test/message.cpp                                 |  4 ++--\n>>  test/object-delete.cpp                           |  5 ++---\n>>  test/object-invoke.cpp                           |  7 +++----\n>>  test/object.cpp                                  |  7 +++----\n>>  test/process/process_test.cpp                    |  7 ++++---\n>>  test/serialization/ipa_data_serializer_test.cpp  |  5 +++--\n>>  test/signal-threads.cpp                          |  5 ++---\n>>  test/signal.cpp                                  |  4 ++--\n>>  test/threads.cpp                                 |  2 +-\n>>  test/timer-thread.cpp                            |  6 +++---\n>>  test/timer.cpp                                   |  6 +++---\n>>  test/v4l2_videodevice/buffer_sharing.cpp         |  6 +++---\n>>  test/v4l2_videodevice/capture_async.cpp          |  6 +++---\n>>  test/v4l2_videodevice/v4l2_m2mdevice.cpp         |  7 ++++---\n>>  .../module_ipa_proxy.cpp.tmpl                    |  5 +++--\n>>  .../libcamera_templates/module_ipa_proxy.h.tmpl  |  3 ++-\n>>  .../module_ipa_proxy_worker.cpp.tmpl             |  7 ++++---\n>>  161 files changed, 384 insertions(+), 358 deletions(-)\n>>  rename include/libcamera/{ => base}/bound_method.h (97%)\n>>  rename include/libcamera/{internal => base}/event_dispatcher.h (79%)\n>>  rename include/libcamera/{internal => base}/event_dispatcher_poll.h (82%)\n>>  rename include/libcamera/{internal => base}/log.h (96%)\n>>  rename include/libcamera/{internal => base}/message.h (87%)\n>>  rename include/libcamera/{ => base}/object.h (89%)\n>>  rename include/libcamera/{internal => base}/semaphore.h (74%)\n>>  rename include/libcamera/{ => base}/signal.h (93%)\n>>  rename include/libcamera/{internal => base}/thread.h (86%)\n>>  rename include/libcamera/{internal => base}/timer.h (81%)\n>>  rename src/libcamera/{ => base}/bound_method.cpp (94%)\n>>  rename src/libcamera/{ => base}/event_dispatcher.cpp (97%)\n>>  rename src/libcamera/{ => base}/event_dispatcher_poll.cpp (97%)\n>>  rename src/libcamera/{ => base}/log.cpp (99%)\n>>  rename src/libcamera/{ => base}/message.cpp (96%)\n>>  rename src/libcamera/{ => base}/object.cpp (97%)\n>>  rename src/libcamera/{ => base}/semaphore.cpp (96%)\n>>  rename src/libcamera/{ => base}/signal.cpp (98%)\n>>  rename src/libcamera/{ => base}/thread.cpp (98%)\n>>  rename src/libcamera/{ => base}/timer.cpp (94%)\n>>\n>> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst\n>> index 3047e006e5b6..152776935a33 100644\n>> --- a/Documentation/guides/pipeline-handler.rst\n>> +++ b/Documentation/guides/pipeline-handler.rst\n>> @@ -288,7 +288,8 @@ features:\n>>  \n>>  .. code-block:: cpp\n>>  \n>> -   #include \"libcamera/internal/log.h\"\n>> +   #include <libcamera/base/log.h>\n>> +   \n>>     #include \"libcamera/internal/pipeline_handler.h\"\n>>  \n>>  Run the following commands:\n>> diff --git a/include/libcamera/bound_method.h b/include/libcamera/base/bound_method.h\n>> similarity index 97%\n>> rename from include/libcamera/bound_method.h\n>> rename to include/libcamera/base/bound_method.h\n>> index 4fc445ecd191..282f9b58ab60 100644\n>> --- a/include/libcamera/bound_method.h\n>> +++ b/include/libcamera/base/bound_method.h\n>> @@ -4,8 +4,8 @@\n>>   *\n>>   * bound_method.h - Method bind and invocation\n>>   */\n>> -#ifndef __LIBCAMERA_BOUND_METHOD_H__\n>> -#define __LIBCAMERA_BOUND_METHOD_H__\n>> +#ifndef __LIBCAMERA_BASE_BOUND_METHOD_H__\n>> +#define __LIBCAMERA_BASE_BOUND_METHOD_H__\n>>  \n>>  #include <memory>\n>>  #include <tuple>\n>> @@ -236,4 +236,4 @@ private:\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_BOUND_METHOD_H__ */\n>> +#endif /* __LIBCAMERA_BASE_BOUND_METHOD_H__ */\n>> diff --git a/include/libcamera/internal/event_dispatcher.h b/include/libcamera/base/event_dispatcher.h\n>> similarity index 79%\n>> rename from include/libcamera/internal/event_dispatcher.h\n>> rename to include/libcamera/base/event_dispatcher.h\n>> index e6a8ad65ce0a..045df27fff16 100644\n>> --- a/include/libcamera/internal/event_dispatcher.h\n>> +++ b/include/libcamera/base/event_dispatcher.h\n>> @@ -4,8 +4,8 @@\n>>   *\n>>   * event_dispatcher.h - Event dispatcher\n>>   */\n>> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__\n>> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__\n>> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_H__\n>> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_H__\n>>  \n>>  #include <vector>\n>>  \n>> @@ -32,4 +32,4 @@ public:\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__ */\n>> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_H__ */\n>> diff --git a/include/libcamera/internal/event_dispatcher_poll.h b/include/libcamera/base/event_dispatcher_poll.h\n>> similarity index 82%\n>> rename from include/libcamera/internal/event_dispatcher_poll.h\n>> rename to include/libcamera/base/event_dispatcher_poll.h\n>> index 33de051de261..ae2a3f04e4b9 100644\n>> --- a/include/libcamera/internal/event_dispatcher_poll.h\n>> +++ b/include/libcamera/base/event_dispatcher_poll.h\n>> @@ -4,14 +4,14 @@\n>>   *\n>>   * event_dispatcher_poll.h - Poll-based event dispatcher\n>>   */\n>> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__\n>> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__\n>> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__\n>> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__\n>>  \n>>  #include <list>\n>>  #include <map>\n>>  #include <vector>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>>  \n>>  struct pollfd;\n>>  \n>> @@ -55,4 +55,4 @@ private:\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__ */\n>> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__ */\n>> diff --git a/include/libcamera/internal/log.h b/include/libcamera/base/log.h\n>> similarity index 96%\n>> rename from include/libcamera/internal/log.h\n>> rename to include/libcamera/base/log.h\n>> index 82e55a623e04..b93c947ae7db 100644\n>> --- a/include/libcamera/internal/log.h\n>> +++ b/include/libcamera/base/log.h\n>> @@ -4,8 +4,8 @@\n>>   *\n>>   * log.h - Logging infrastructure\n>>   */\n>> -#ifndef __LIBCAMERA_INTERNAL_LOG_H__\n>> -#define __LIBCAMERA_INTERNAL_LOG_H__\n>> +#ifndef __LIBCAMERA_BASE_LOG_H__\n>> +#define __LIBCAMERA_BASE_LOG_H__\n>>  \n>>  #include <chrono>\n>>  #include <sstream>\n>> @@ -127,4 +127,4 @@ LogMessage _log(const LogCategory *category, LogSeverity severity,\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_INTERNAL_LOG_H__ */\n>> +#endif /* __LIBCAMERA_BASE_LOG_H__ */\n>> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n>> index 2db756c504c9..7a858dcb6f1a 100644\n>> --- a/include/libcamera/base/meson.build\n>> +++ b/include/libcamera/base/meson.build\n>> @@ -3,7 +3,17 @@\n>>  libcamera_base_include_dir = libcamera_include_dir / 'base'\n>>  \n>>  libcamera_base_headers = files([\n>> +    'bound_method.h',\n>>      'class.h',\n>> +    'event_dispatcher.h',\n>> +    'event_dispatcher_poll.h',\n>> +    'log.h',\n>> +    'message.h',\n>> +    'object.h',\n>> +    'semaphore.h',\n>> +    'signal.h',\n>> +    'thread.h',\n>> +    'timer.h',\n>>      'utils.h',\n>>  ])\n>>  \n>> diff --git a/include/libcamera/internal/message.h b/include/libcamera/base/message.h\n>> similarity index 87%\n>> rename from include/libcamera/internal/message.h\n>> rename to include/libcamera/base/message.h\n>> index f1b133bfb2ba..5d2a9f04f0a7 100644\n>> --- a/include/libcamera/internal/message.h\n>> +++ b/include/libcamera/base/message.h\n>> @@ -4,12 +4,12 @@\n>>   *\n>>   * message.h - Message queue support\n>>   */\n>> -#ifndef __LIBCAMERA_INTERNAL_MESSAGE_H__\n>> -#define __LIBCAMERA_INTERNAL_MESSAGE_H__\n>> +#ifndef __LIBCAMERA_BASE_MESSAGE_H__\n>> +#define __LIBCAMERA_BASE_MESSAGE_H__\n>>  \n>>  #include <atomic>\n>>  \n>> -#include <libcamera/bound_method.h>\n>> +#include <libcamera/base/bound_method.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> @@ -68,4 +68,4 @@ private:\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_INTERNAL_MESSAGE_H__ */\n>> +#endif /* __LIBCAMERA_BASE_MESSAGE_H__ */\n>> diff --git a/include/libcamera/object.h b/include/libcamera/base/object.h\n>> similarity index 89%\n>> rename from include/libcamera/object.h\n>> rename to include/libcamera/base/object.h\n>> index a1882f05fb77..5c385ab4b140 100644\n>> --- a/include/libcamera/object.h\n>> +++ b/include/libcamera/base/object.h\n>> @@ -4,14 +4,14 @@\n>>   *\n>>   * object.h - Base object\n>>   */\n>> -#ifndef __LIBCAMERA_OBJECT_H__\n>> -#define __LIBCAMERA_OBJECT_H__\n>> +#ifndef __LIBCAMERA_BASE_OBJECT_H__\n>> +#define __LIBCAMERA_BASE_OBJECT_H__\n>>  \n>>  #include <list>\n>>  #include <memory>\n>>  #include <vector>\n>>  \n>> -#include <libcamera/bound_method.h>\n>> +#include <libcamera/base/bound_method.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> @@ -68,4 +68,4 @@ private:\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_OBJECT_H__ */\n>> +#endif /* __LIBCAMERA_BASE_OBJECT_H__ */\n>> diff --git a/include/libcamera/internal/semaphore.h b/include/libcamera/base/semaphore.h\n>> similarity index 74%\n>> rename from include/libcamera/internal/semaphore.h\n>> rename to include/libcamera/base/semaphore.h\n>> index 9dc65d299cfd..c8e62e3ee68b 100644\n>> --- a/include/libcamera/internal/semaphore.h\n>> +++ b/include/libcamera/base/semaphore.h\n>> @@ -4,12 +4,12 @@\n>>   *\n>>   * semaphore.h - General-purpose counting semaphore\n>>   */\n>> -#ifndef __LIBCAMERA_INTERNAL_SEMAPHORE_H__\n>> -#define __LIBCAMERA_INTERNAL_SEMAPHORE_H__\n>> +#ifndef __LIBCAMERA_BASE_SEMAPHORE_H__\n>> +#define __LIBCAMERA_BASE_SEMAPHORE_H__\n>>  \n>>  #include <condition_variable>\n>>  \n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/base/thread.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> @@ -31,4 +31,4 @@ private:\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_INTERNAL_SEMAPHORE_H__ */\n>> +#endif /* __LIBCAMERA_BASE_SEMAPHORE_H__ */\n>> diff --git a/include/libcamera/signal.h b/include/libcamera/base/signal.h\n>> similarity index 93%\n>> rename from include/libcamera/signal.h\n>> rename to include/libcamera/base/signal.h\n>> index 3233529a1275..c2521769a843 100644\n>> --- a/include/libcamera/signal.h\n>> +++ b/include/libcamera/base/signal.h\n>> @@ -4,16 +4,16 @@\n>>   *\n>>   * signal.h - Signal & slot implementation\n>>   */\n>> -#ifndef __LIBCAMERA_SIGNAL_H__\n>> -#define __LIBCAMERA_SIGNAL_H__\n>> +#ifndef __LIBCAMERA_BASE_SIGNAL_H__\n>> +#define __LIBCAMERA_BASE_SIGNAL_H__\n>>  \n>>  #include <functional>\n>>  #include <list>\n>>  #include <type_traits>\n>>  #include <vector>\n>>  \n>> -#include <libcamera/bound_method.h>\n>> -#include <libcamera/object.h>\n>> +#include <libcamera/base/bound_method.h>\n>> +#include <libcamera/base/object.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> @@ -129,4 +129,4 @@ public:\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_SIGNAL_H__ */\n>> +#endif /* __LIBCAMERA_BASE_SIGNAL_H__ */\n>> diff --git a/include/libcamera/internal/thread.h b/include/libcamera/base/thread.h\n>> similarity index 86%\n>> rename from include/libcamera/internal/thread.h\n>> rename to include/libcamera/base/thread.h\n>> index 9662e28bb581..2ed18d49c978 100644\n>> --- a/include/libcamera/internal/thread.h\n>> +++ b/include/libcamera/base/thread.h\n>> @@ -4,20 +4,18 @@\n>>   *\n>>   * thread.h - Thread support\n>>   */\n>> -#ifndef __LIBCAMERA_INTERNAL_THREAD_H__\n>> -#define __LIBCAMERA_INTERNAL_THREAD_H__\n>> +#ifndef __LIBCAMERA_BASE_THREAD_H__\n>> +#define __LIBCAMERA_BASE_THREAD_H__\n>>  \n>>  #include <memory>\n>>  #include <mutex>\n>>  #include <sys/types.h>\n>>  #include <thread>\n>>  \n>> -#include <libcamera/signal.h>\n>> -\n>> +#include <libcamera/base/message.h>\n>> +#include <libcamera/base/signal.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/message.h\"\n>> -\n>>  namespace libcamera {\n>>  \n>>  class EventDispatcher;\n>> @@ -75,4 +73,4 @@ private:\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_INTERNAL_THREAD_H__ */\n>> +#endif /* __LIBCAMERA_BASE_THREAD_H__ */\n>> diff --git a/include/libcamera/internal/timer.h b/include/libcamera/base/timer.h\n>> similarity index 81%\n>> rename from include/libcamera/internal/timer.h\n>> rename to include/libcamera/base/timer.h\n>> index 013e93c0b4e6..e79e85f1ef0d 100644\n>> --- a/include/libcamera/internal/timer.h\n>> +++ b/include/libcamera/base/timer.h\n>> @@ -4,14 +4,14 @@\n>>   *\n>>   * timer.h - Generic timer\n>>   */\n>> -#ifndef __LIBCAMERA_INTERNAL_TIMER_H__\n>> -#define __LIBCAMERA_INTERNAL_TIMER_H__\n>> +#ifndef __LIBCAMERA_BASE_TIMER_H__\n>> +#define __LIBCAMERA_BASE_TIMER_H__\n>>  \n>>  #include <chrono>\n>>  #include <stdint.h>\n>>  \n>> -#include <libcamera/object.h>\n>> -#include <libcamera/signal.h>\n>> +#include <libcamera/base/object.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> @@ -46,4 +46,4 @@ private:\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_INTERNAL_TIMER_H__ */\n>> +#endif /* __LIBCAMERA_BASE_TIMER_H__ */\n>> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n>> index ea0914009c2b..b081907e0cb1 100644\n>> --- a/include/libcamera/camera.h\n>> +++ b/include/libcamera/camera.h\n>> @@ -13,11 +13,11 @@\n>>  #include <string>\n>>  \n>>  #include <libcamera/base/class.h>\n>> +#include <libcamera/base/object.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  #include <libcamera/controls.h>\n>> -#include <libcamera/object.h>\n>>  #include <libcamera/request.h>\n>> -#include <libcamera/signal.h>\n>>  #include <libcamera/stream.h>\n>>  #include <libcamera/transform.h>\n>>  \n>> diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h\n>> index 5deede035115..744e5a06c78c 100644\n>> --- a/include/libcamera/camera_manager.h\n>> +++ b/include/libcamera/camera_manager.h\n>> @@ -13,9 +13,8 @@\n>>  #include <vector>\n>>  \n>>  #include <libcamera/base/class.h>\n>> -\n>> -#include <libcamera/object.h>\n>> -#include <libcamera/signal.h>\n>> +#include <libcamera/base/object.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n>> index 7bc540619721..db12b07ee8cc 100644\n>> --- a/include/libcamera/internal/camera_sensor.h\n>> +++ b/include/libcamera/internal/camera_sensor.h\n>> @@ -12,13 +12,13 @@\n>>  #include <vector>\n>>  \n>>  #include <libcamera/base/class.h>\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include <libcamera/controls.h>\n>>  #include <libcamera/geometry.h>\n>>  #include <libcamera/ipa/core_ipa_interface.h>\n>>  \n>>  #include \"libcamera/internal/formats.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>>  \n>>  namespace libcamera {\n>> diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h\n>> index 707cfe8f309d..222caf75a0db 100644\n>> --- a/include/libcamera/internal/device_enumerator.h\n>> +++ b/include/libcamera/internal/device_enumerator.h\n>> @@ -13,7 +13,7 @@\n>>  \n>>  #include <linux/media.h>\n>>  \n>> -#include <libcamera/signal.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/include/libcamera/internal/event_notifier.h b/include/libcamera/internal/event_notifier.h\n>> index cc3495c024f0..8a6419f23004 100644\n>> --- a/include/libcamera/internal/event_notifier.h\n>> +++ b/include/libcamera/internal/event_notifier.h\n>> @@ -7,8 +7,8 @@\n>>  #ifndef __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__\n>>  #define __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__\n>>  \n>> -#include <libcamera/object.h>\n>> -#include <libcamera/signal.h>\n>> +#include <libcamera/base/object.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h\n>> index 70168acc25a5..76325b1d109f 100644\n>> --- a/include/libcamera/internal/ipa_data_serializer.h\n>> +++ b/include/libcamera/internal/ipa_data_serializer.h\n>> @@ -14,6 +14,8 @@\n>>  #include <type_traits>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/geometry.h>\n>> @@ -22,7 +24,6 @@\n>>  #include \"libcamera/internal/byte_stream_buffer.h\"\n>>  #include \"libcamera/internal/camera_sensor.h\"\n>>  #include \"libcamera/internal/control_serializer.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h\n>> index e904a2be796b..34224e330da7 100644\n>> --- a/include/libcamera/internal/ipa_manager.h\n>> +++ b/include/libcamera/internal/ipa_manager.h\n>> @@ -10,11 +10,12 @@\n>>  #include <stdint.h>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/ipa/ipa_interface.h>\n>>  #include <libcamera/ipa/ipa_module_info.h>\n>>  \n>>  #include \"libcamera/internal/ipa_module.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  #include \"libcamera/internal/pub_key.h\"\n>>  \n>> diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h\n>> index 19fc58272210..a87f56502b9a 100644\n>> --- a/include/libcamera/internal/ipa_module.h\n>> +++ b/include/libcamera/internal/ipa_module.h\n>> @@ -11,10 +11,11 @@\n>>  #include <string>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/ipa/ipa_interface.h>\n>>  #include <libcamera/ipa/ipa_module_info.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  \n>>  namespace libcamera {\n>> diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h\n>> index c9a84b78cbe5..e58de3402006 100644\n>> --- a/include/libcamera/internal/ipc_pipe.h\n>> +++ b/include/libcamera/internal/ipc_pipe.h\n>> @@ -9,9 +9,9 @@\n>>  \n>>  #include <vector>\n>>  \n>> -#include \"libcamera/internal/ipc_unixsocket.h\"\n>> +#include <libcamera/base/signal.h>\n>>  \n>> -#include <libcamera/signal.h>\n>> +#include \"libcamera/internal/ipc_unixsocket.h\"\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h\n>> index e871b65036bd..9f5b06773ced 100644\n>> --- a/include/libcamera/internal/ipc_unixsocket.h\n>> +++ b/include/libcamera/internal/ipc_unixsocket.h\n>> @@ -12,7 +12,7 @@\n>>  #include <sys/types.h>\n>>  #include <vector>\n>>  \n>> -#include <libcamera/signal.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h\n>> index c3292508c87b..8424611d7eda 100644\n>> --- a/include/libcamera/internal/media_device.h\n>> +++ b/include/libcamera/internal/media_device.h\n>> @@ -14,9 +14,9 @@\n>>  \n>>  #include <linux/media.h>\n>>  \n>> -#include <libcamera/signal.h>\n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_object.h\"\n>>  \n>>  namespace libcamera {\n>> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n>> index c84f9822ef6e..64f50373a7fb 100644\n>> --- a/include/libcamera/internal/meson.build\n>> +++ b/include/libcamera/internal/meson.build\n>> @@ -22,8 +22,6 @@ libcamera_internal_headers = files([\n>>      'device_enumerator.h',\n>>      'device_enumerator_sysfs.h',\n>>      'device_enumerator_udev.h',\n>> -    'event_dispatcher.h',\n>> -    'event_dispatcher_poll.h',\n>>      'event_notifier.h',\n>>      'file.h',\n>>      'formats.h',\n>> @@ -31,18 +29,13 @@ libcamera_internal_headers = files([\n>>      'ipa_module.h',\n>>      'ipa_proxy.h',\n>>      'ipc_unixsocket.h',\n>> -    'log.h',\n>>      'media_device.h',\n>>      'media_object.h',\n>> -    'message.h',\n>>      'pipeline_handler.h',\n>>      'process.h',\n>>      'pub_key.h',\n>> -    'semaphore.h',\n>>      'source-paths.h',\n>>      'sysfs.h',\n>> -    'thread.h',\n>> -    'timer.h',\n>>      'v4l2_device.h',\n>>      'v4l2_pixelformat.h',\n>>      'v4l2_subdevice.h',\n>> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\n>> index 8beb6b76dd3f..9e2d65d6f2c5 100644\n>> --- a/include/libcamera/internal/pipeline_handler.h\n>> +++ b/include/libcamera/internal/pipeline_handler.h\n>> @@ -16,9 +16,9 @@\n>>  #include <vector>\n>>  \n>>  #include <libcamera/base/class.h>\n>> +#include <libcamera/base/object.h>\n>>  \n>>  #include <libcamera/controls.h>\n>> -#include <libcamera/object.h>\n>>  #include <libcamera/stream.h>\n>>  \n>>  #include \"libcamera/internal/ipa_proxy.h\"\n>> diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h\n>> index 254cda8535ae..c4d5d9c1c009 100644\n>> --- a/include/libcamera/internal/process.h\n>> +++ b/include/libcamera/internal/process.h\n>> @@ -11,7 +11,7 @@\n>>  #include <string>\n>>  #include <vector>\n>>  \n>> -#include <libcamera/signal.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h\n>> index c318e976ad8e..1edd664a9aef 100644\n>> --- a/include/libcamera/internal/v4l2_device.h\n>> +++ b/include/libcamera/internal/v4l2_device.h\n>> @@ -13,12 +13,12 @@\n>>  \n>>  #include <linux/videodev2.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/signal.h>\n>> +\n>>  #include <libcamera/controls.h>\n>> -#include <libcamera/signal.h>\n>>  #include <libcamera/span.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> -\n>>  namespace libcamera {\n>>  \n>>  class EventNotifier;\n>> diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h\n>> index d07dd6b444d0..97b89fb95087 100644\n>> --- a/include/libcamera/internal/v4l2_subdevice.h\n>> +++ b/include/libcamera/internal/v4l2_subdevice.h\n>> @@ -12,11 +12,11 @@\n>>  #include <vector>\n>>  \n>>  #include <libcamera/base/class.h>\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include <libcamera/geometry.h>\n>>  \n>>  #include \"libcamera/internal/formats.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_object.h\"\n>>  #include \"libcamera/internal/v4l2_device.h\"\n>>  \n>> diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\n>> index 227d015e8937..a7c3d5290d92 100644\n>> --- a/include/libcamera/internal/v4l2_videodevice.h\n>> +++ b/include/libcamera/internal/v4l2_videodevice.h\n>> @@ -17,14 +17,14 @@\n>>  #include <linux/videodev2.h>\n>>  \n>>  #include <libcamera/base/class.h>\n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/geometry.h>\n>>  #include <libcamera/pixel_format.h>\n>> -#include <libcamera/signal.h>\n>>  \n>>  #include \"libcamera/internal/formats.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/v4l2_device.h\"\n>>  #include \"libcamera/internal/v4l2_pixelformat.h\"\n>>  \n>> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\n>> index 4aefaa7153b1..9a15c86b16e2 100644\n>> --- a/include/libcamera/ipa/ipa_interface.h\n>> +++ b/include/libcamera/ipa/ipa_interface.h\n>> @@ -13,10 +13,11 @@\n>>  #include <map>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/signal.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/controls.h>\n>>  #include <libcamera/geometry.h>\n>> -#include <libcamera/signal.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n>> index 7cba3de6ca96..d08bb3096aff 100644\n>> --- a/include/libcamera/meson.build\n>> +++ b/include/libcamera/meson.build\n>> @@ -1,7 +1,6 @@\n>>  # SPDX-License-Identifier: CC0-1.0\n>>  \n>>  libcamera_public_headers = files([\n>> -    'bound_method.h',\n>>      'buffer.h',\n>>      'camera.h',\n>>      'camera_manager.h',\n>> @@ -11,10 +10,8 @@ libcamera_public_headers = files([\n>>      'framebuffer_allocator.h',\n>>      'geometry.h',\n>>      'logging.h',\n>> -    'object.h',\n>>      'pixel_format.h',\n>>      'request.h',\n>> -    'signal.h',\n>>      'span.h',\n>>      'stream.h',\n>>      'transform.h',\n>> diff --git a/include/libcamera/request.h b/include/libcamera/request.h\n>> index 00c646fea7f2..2d361c9d97dc 100644\n>> --- a/include/libcamera/request.h\n>> +++ b/include/libcamera/request.h\n>> @@ -14,9 +14,9 @@\n>>  #include <unordered_set>\n>>  \n>>  #include <libcamera/base/class.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  #include <libcamera/controls.h>\n>> -#include <libcamera/signal.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp\n>> index e6d435e0501f..da836baec903 100644\n>> --- a/src/android/camera3_hal.cpp\n>> +++ b/src/android/camera3_hal.cpp\n>> @@ -7,7 +7,7 @@\n>>  \n>>  #include <hardware/camera_common.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"camera_device.h\"\n>>  #include \"camera_hal_manager.h\"\n>> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\n>> index 00224a6d64b4..6b5edb66fad2 100644\n>> --- a/src/android/camera_capabilities.cpp\n>> +++ b/src/android/camera_capabilities.cpp\n>> @@ -12,12 +12,13 @@\n>>  \n>>  #include <hardware/camera3.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/controls.h>\n>>  #include <libcamera/property_ids.h>\n>>  \n>>  #include \"libcamera/internal/formats.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  using namespace libcamera;\n>>  \n>> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n>> index 6243c07e231e..86ea22b61467 100644\n>> --- a/src/android/camera_device.cpp\n>> +++ b/src/android/camera_device.cpp\n>> @@ -15,16 +15,15 @@\n>>  #include <unistd.h>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/utils.h>\n>> +\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/controls.h>\n>>  #include <libcamera/formats.h>\n>>  #include <libcamera/property_ids.h>\n>>  \n>> -#include <libcamera/base/utils.h>\n>> -\n>> -#include \"libcamera/internal/log.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -\n>>  #include \"system/graphics.h\"\n>>  \n>>  using namespace libcamera;\n>> diff --git a/src/android/camera_device.h b/src/android/camera_device.h\n>> index 090fe28a551e..4747f577a3e4 100644\n>> --- a/src/android/camera_device.h\n>> +++ b/src/android/camera_device.h\n>> @@ -14,15 +14,16 @@\n>>  \n>>  #include <hardware/camera3.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/message.h>\n>> +#include <libcamera/base/thread.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/request.h>\n>>  #include <libcamera/stream.h>\n>>  \n>>  #include \"libcamera/internal/buffer.h\"\n>> -#include \"libcamera/internal/log.h\"\n>> -#include \"libcamera/internal/message.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>>  \n>>  #include \"camera_capabilities.h\"\n>>  #include \"camera_metadata.h\"\n>> diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp\n>> index f33ba26935da..d84de4fd6f90 100644\n>> --- a/src/android/camera_hal_config.cpp\n>> +++ b/src/android/camera_hal_config.cpp\n>> @@ -21,7 +21,7 @@ namespace filesystem = std::experimental::filesystem;\n>>  \n>>  #include <hardware/camera3.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  using namespace libcamera;\n>>  \n>> diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp\n>> index 54087d3a2e45..4cd67544f0df 100644\n>> --- a/src/android/camera_hal_manager.cpp\n>> +++ b/src/android/camera_hal_manager.cpp\n>> @@ -7,11 +7,11 @@\n>>  \n>>  #include \"camera_hal_manager.h\"\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/property_ids.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> -\n>>  #include \"camera_device.h\"\n>>  \n>>  using namespace libcamera;\n>> diff --git a/src/android/camera_metadata.cpp b/src/android/camera_metadata.cpp\n>> index c7298d620668..3fc7cf273650 100644\n>> --- a/src/android/camera_metadata.cpp\n>> +++ b/src/android/camera_metadata.cpp\n>> @@ -7,7 +7,7 @@\n>>  \n>>  #include \"camera_metadata.h\"\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  using namespace libcamera;\n>>  \n>> diff --git a/src/android/camera_worker.h b/src/android/camera_worker.h\n>> index e289ef9b8655..6e1aee4a3247 100644\n>> --- a/src/android/camera_worker.h\n>> +++ b/src/android/camera_worker.h\n>> @@ -9,14 +9,14 @@\n>>  \n>>  #include <memory>\n>>  \n>> +#include <libcamera/base/object.h>\n>> +#include <libcamera/base/thread.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/camera.h>\n>> -#include <libcamera/object.h>\n>>  #include <libcamera/request.h>\n>>  #include <libcamera/stream.h>\n>>  \n>> -#include \"libcamera/internal/thread.h\"\n>> -\n>>  class CameraDevice;\n>>  \n>>  class CaptureRequest\n>> diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp\n>> index f006e1d1999a..e6358ca9466f 100644\n>> --- a/src/android/jpeg/encoder_libjpeg.cpp\n>> +++ b/src/android/jpeg/encoder_libjpeg.cpp\n>> @@ -16,12 +16,13 @@\n>>  #include <unistd.h>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/formats.h>\n>>  #include <libcamera/pixel_format.h>\n>>  \n>>  #include \"libcamera/internal/formats.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  using namespace libcamera;\n>>  \n>> diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp\n>> index 747f1cfaa8ac..0ba4cb85ffd0 100644\n>> --- a/src/android/jpeg/exif.cpp\n>> +++ b/src/android/jpeg/exif.cpp\n>> @@ -14,10 +14,9 @@\n>>  #include <tuple>\n>>  #include <uchar.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> -\n>>  using namespace libcamera;\n>>  \n>>  LOG_DEFINE_CATEGORY(EXIF)\n>> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\n>> index 058ccc998c6f..0e93f365d6db 100644\n>> --- a/src/android/jpeg/post_processor_jpeg.cpp\n>> +++ b/src/android/jpeg/post_processor_jpeg.cpp\n>> @@ -14,9 +14,9 @@\n>>  #include \"encoder_libjpeg.h\"\n>>  #include \"exif.h\"\n>>  \n>> -#include <libcamera/formats.h>\n>> +#include <libcamera/base/log.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/formats.h>\n>>  \n>>  using namespace libcamera;\n>>  using namespace std::chrono_literals;\n>> diff --git a/src/android/jpeg/thumbnailer.cpp b/src/android/jpeg/thumbnailer.cpp\n>> index f709d3435d9c..5cb00744a688 100644\n>> --- a/src/android/jpeg/thumbnailer.cpp\n>> +++ b/src/android/jpeg/thumbnailer.cpp\n>> @@ -7,9 +7,9 @@\n>>  \n>>  #include \"thumbnailer.h\"\n>>  \n>> -#include <libcamera/formats.h>\n>> +#include <libcamera/base/log.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/formats.h>\n>>  \n>>  using namespace libcamera;\n>>  \n>> diff --git a/src/android/mm/cros_camera_buffer.cpp b/src/android/mm/cros_camera_buffer.cpp\n>> index 59e26d1b5972..3cfa39a1714d 100644\n>> --- a/src/android/mm/cros_camera_buffer.cpp\n>> +++ b/src/android/mm/cros_camera_buffer.cpp\n>> @@ -7,7 +7,7 @@\n>>  \n>>  #include \"../camera_buffer.h\"\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"cros-camera/camera_buffer_manager.h\"\n>>  \n>> diff --git a/src/android/mm/generic_camera_buffer.cpp b/src/android/mm/generic_camera_buffer.cpp\n>> index cca88cf3632f..326fdc066499 100644\n>> --- a/src/android/mm/generic_camera_buffer.cpp\n>> +++ b/src/android/mm/generic_camera_buffer.cpp\n>> @@ -9,8 +9,9 @@\n>>  \n>>  #include <unistd.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include \"libcamera/internal/buffer.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  using namespace libcamera;\n>>  \n>> diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp\n>> index b67364c8f147..772e805b32cc 100644\n>> --- a/src/android/yuv/post_processor_yuv.cpp\n>> +++ b/src/android/yuv/post_processor_yuv.cpp\n>> @@ -9,12 +9,13 @@\n>>  \n>>  #include <libyuv/scale.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/formats.h>\n>>  #include <libcamera/geometry.h>\n>>  #include <libcamera/pixel_format.h>\n>>  \n>>  #include \"libcamera/internal/formats.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  using namespace libcamera;\n>>  \n>> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n>> index 8b4c7351e9db..31a3c006a6eb 100644\n>> --- a/src/ipa/ipu3/ipu3.cpp\n>> +++ b/src/ipa/ipu3/ipu3.cpp\n>> @@ -11,6 +11,8 @@\n>>  #include <linux/intel-ipu3.h>\n>>  #include <linux/v4l2-controls.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/ipa/ipa_interface.h>\n>> @@ -19,7 +21,6 @@\n>>  #include <libcamera/request.h>\n>>  \n>>  #include \"libcamera/internal/buffer.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  #include \"ipu3_agc.h\"\n>>  #include \"ipu3_awb.h\"\n>> diff --git a/src/ipa/ipu3/ipu3_agc.cpp b/src/ipa/ipu3/ipu3_agc.cpp\n>> index c476a60d4cb8..fd0b70f02d25 100644\n>> --- a/src/ipa/ipu3/ipu3_agc.cpp\n>> +++ b/src/ipa/ipu3/ipu3_agc.cpp\n>> @@ -11,9 +11,9 @@\n>>  #include <cmath>\n>>  #include <numeric>\n>>  \n>> -#include <libcamera/ipa/core_ipa_interface.h>\n>> +#include <libcamera/base/log.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/ipa/core_ipa_interface.h>\n>>  \n>>  #include \"libipa/histogram.h\"\n>>  \n>> diff --git a/src/ipa/ipu3/ipu3_awb.cpp b/src/ipa/ipu3/ipu3_awb.cpp\n>> index 54ce8e67124e..9b409c8ffad9 100644\n>> --- a/src/ipa/ipu3/ipu3_awb.cpp\n>> +++ b/src/ipa/ipu3/ipu3_awb.cpp\n>> @@ -10,7 +10,7 @@\n>>  #include <numeric>\n>>  #include <unordered_map>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/src/ipa/libipa/histogram.cpp b/src/ipa/libipa/histogram.cpp\n>> index d4d7cfdffa84..fb1eb2a2f0b1 100644\n>> --- a/src/ipa/libipa/histogram.cpp\n>> +++ b/src/ipa/libipa/histogram.cpp\n>> @@ -8,7 +8,7 @@\n>>  \n>>  #include <cmath>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /**\n>>   * \\file histogram.h\n>> diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp\n>> index 221898ceb40d..a66648197140 100644\n>> --- a/src/ipa/raspberrypi/cam_helper.hpp\n>> +++ b/src/ipa/raspberrypi/cam_helper.hpp\n>> @@ -10,13 +10,13 @@\n>>  \n>>  #include <libcamera/span.h>\n>>  \n>> +#include <libcamera/base/utils.h>\n>> +\n>>  #include \"camera_mode.h\"\n>>  #include \"controller/controller.hpp\"\n>>  #include \"controller/metadata.hpp\"\n>>  #include \"md_parser.hpp\"\n>>  \n>> -#include <libcamera/base/utils.h>\n>> -\n>>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>>  \n>>  namespace RPiController {\n>> diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp\n>> index 96b58359a9e5..d3433ad2e7e8 100644\n>> --- a/src/ipa/raspberrypi/controller/controller.cpp\n>> +++ b/src/ipa/raspberrypi/controller/controller.cpp\n>> @@ -5,7 +5,7 @@\n>>   * controller.cpp - ISP controller\n>>   */\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"algorithm.hpp\"\n>>  #include \"controller.hpp\"\n>> diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n>> index 55e80ac74ae1..1ed578cfdbb6 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n>> @@ -9,7 +9,7 @@\n>>  \n>>  #include \"linux/bcm2835-isp.h\"\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../awb_status.h\"\n>>  #include \"../device_status.h\"\n>> diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n>> index b0d24aa2ef44..3cdc95a99949 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp\n>> @@ -6,7 +6,7 @@\n>>   */\n>>  #include <math.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../awb_status.h\"\n>>  #include \"alsc.hpp\"\n>> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n>> index 1c917e4f3408..5cfd33a384e7 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n>> @@ -5,7 +5,7 @@\n>>   * awb.cpp - AWB control algorithm\n>>   */\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../lux_status.h\"\n>>  \n>> diff --git a/src/ipa/raspberrypi/controller/rpi/black_level.cpp b/src/ipa/raspberrypi/controller/rpi/black_level.cpp\n>> index 9ac855f50014..6b3497f13c19 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/black_level.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/black_level.cpp\n>> @@ -8,7 +8,7 @@\n>>  #include <math.h>\n>>  #include <stdint.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../black_level_status.h\"\n>>  \n>> diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n>> index dbdcbb39dd12..821a4c7c98c5 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/ccm.cpp\n>> @@ -5,7 +5,7 @@\n>>   * ccm.cpp - CCM (colour correction matrix) control algorithm\n>>   */\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../awb_status.h\"\n>>  #include \"../ccm_status.h\"\n>> diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.cpp b/src/ipa/raspberrypi/controller/rpi/contrast.cpp\n>> index 2bc43027a291..ae55aad56739 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/contrast.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/contrast.cpp\n>> @@ -6,7 +6,7 @@\n>>   */\n>>  #include <stdint.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../contrast_status.h\"\n>>  #include \"../histogram.hpp\"\n>> diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n>> index e533cd53e63b..110f50560e76 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp\n>> @@ -5,7 +5,7 @@\n>>   * dpc.cpp - DPC (defective pixel correction) control algorithm\n>>   */\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"dpc.hpp\"\n>>  \n>> diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp\n>> index bab4406fe3a1..a87ec802b964 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/focus.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp\n>> @@ -6,7 +6,7 @@\n>>   */\n>>  #include <stdint.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../focus_status.h\"\n>>  #include \"focus.hpp\"\n>> diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp\n>> index 5eff116cd055..bdceb1f3d3eb 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/geq.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp\n>> @@ -5,7 +5,7 @@\n>>   * geq.cpp - GEQ (green equalisation) control algorithm\n>>   */\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../device_status.h\"\n>>  #include \"../lux_status.h\"\n>> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp\n>> index 258e44f4dcce..f58d69397e1c 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/lux.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp\n>> @@ -8,7 +8,7 @@\n>>  \n>>  #include \"linux/bcm2835-isp.h\"\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../device_status.h\"\n>>  \n>> diff --git a/src/ipa/raspberrypi/controller/rpi/noise.cpp b/src/ipa/raspberrypi/controller/rpi/noise.cpp\n>> index 156f750192f8..63cad639f313 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/noise.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/noise.cpp\n>> @@ -7,7 +7,7 @@\n>>  \n>>  #include <math.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../device_status.h\"\n>>  #include \"../noise_status.h\"\n>> diff --git a/src/ipa/raspberrypi/controller/rpi/sdn.cpp b/src/ipa/raspberrypi/controller/rpi/sdn.cpp\n>> index 959bc7406a01..9384550983e7 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/sdn.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/sdn.cpp\n>> @@ -5,7 +5,7 @@\n>>   * sdn.cpp - SDN (spatial denoise) control algorithm\n>>   */\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../denoise_status.h\"\n>>  #include \"../noise_status.h\"\n>> diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n>> index 2cd861ca6898..b0c2e00a8ee1 100644\n>> --- a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n>> +++ b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp\n>> @@ -7,7 +7,7 @@\n>>  \n>>  #include <math.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include \"../sharpen_status.h\"\n>>  \n>> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n>> index 1c1e802a2cdc..a3f014495e80 100644\n>> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n>> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n>> @@ -13,6 +13,10 @@\n>>  #include <string.h>\n>>  #include <sys/mman.h>\n>>  \n>> +#include <linux/bcm2835-isp.h>\n>> +\n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/controls.h>\n>> @@ -25,9 +29,6 @@\n>>  #include <libcamera/span.h>\n>>  \n>>  #include \"libcamera/internal/buffer.h\"\n>> -#include \"libcamera/internal/log.h\"\n>> -\n>> -#include <linux/bcm2835-isp.h>\n>>  \n>>  #include \"agc_algorithm.hpp\"\n>>  #include \"agc_status.h\"\n>> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n>> index b47ea3240f63..cdfb4d139e41 100644\n>> --- a/src/ipa/rkisp1/rkisp1.cpp\n>> +++ b/src/ipa/rkisp1/rkisp1.cpp\n>> @@ -15,6 +15,8 @@\n>>  #include <linux/rkisp1-config.h>\n>>  #include <linux/v4l2-controls.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/ipa/ipa_interface.h>\n>> @@ -22,8 +24,6 @@\n>>  #include <libcamera/ipa/rkisp1_ipa_interface.h>\n>>  #include <libcamera/request.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> -\n>>  namespace libcamera {\n>>  \n>>  LOG_DEFINE_CATEGORY(IPARkISP1)\n>> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\n>> index 13681d8833ff..9ffd07f493a1 100644\n>> --- a/src/ipa/vimc/vimc.cpp\n>> +++ b/src/ipa/vimc/vimc.cpp\n>> @@ -17,8 +17,9 @@\n>>  #include <libcamera/ipa/ipa_interface.h>\n>>  #include <libcamera/ipa/ipa_module_info.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include \"libcamera/internal/file.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/src/libcamera/bound_method.cpp b/src/libcamera/base/bound_method.cpp\n>> similarity index 94%\n>> rename from src/libcamera/bound_method.cpp\n>> rename to src/libcamera/base/bound_method.cpp\n>> index 4965bb5e167b..3ecec51c4b75 100644\n>> --- a/src/libcamera/bound_method.cpp\n>> +++ b/src/libcamera/base/bound_method.cpp\n>> @@ -5,14 +5,13 @@\n>>   * bound_method.cpp - Method bind and invocation\n>>   */\n>>  \n>> -#include <libcamera/bound_method.h>\n>> -\n>> -#include \"libcamera/internal/message.h\"\n>> -#include \"libcamera/internal/semaphore.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/base/bound_method.h>\n>> +#include <libcamera/base/message.h>\n>> +#include <libcamera/base/semaphore.h>\n>> +#include <libcamera/base/thread.h>\n>>  \n>>  /**\n>> - * \\file bound_method.h\n>> + * \\file base/bound_method.h\n>>   * \\brief Method bind and invocation\n>>   */\n>>  \n>> diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/base/event_dispatcher.cpp\n>> similarity index 97%\n>> rename from src/libcamera/event_dispatcher.cpp\n>> rename to src/libcamera/base/event_dispatcher.cpp\n>> index e0ce1eb3cc04..4be89e819832 100644\n>> --- a/src/libcamera/event_dispatcher.cpp\n>> +++ b/src/libcamera/base/event_dispatcher.cpp\n>> @@ -5,12 +5,11 @@\n>>   * event_dispatcher.cpp - Event dispatcher\n>>   */\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -\n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /**\n>> - * \\file event_dispatcher.h\n>> + * \\file base/event_dispatcher.h\n>>   */\n>>  \n>>  namespace libcamera {\n>> diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp\n>> similarity index 97%\n>> rename from src/libcamera/event_dispatcher_poll.cpp\n>> rename to src/libcamera/base/event_dispatcher_poll.cpp\n>> index 0b6aee187063..d76ca7fc2c32 100644\n>> --- a/src/libcamera/event_dispatcher_poll.cpp\n>> +++ b/src/libcamera/base/event_dispatcher_poll.cpp\n>> @@ -5,7 +5,7 @@\n>>   * event_dispatcher_poll.cpp - Poll-based event dispatcher\n>>   */\n>>  \n>> -#include \"libcamera/internal/event_dispatcher_poll.h\"\n>> +#include <libcamera/base/event_dispatcher_poll.h>\n>>  \n>>  #include <algorithm>\n>>  #include <chrono>\n>> @@ -16,15 +16,15 @@\n>>  #include <sys/eventfd.h>\n>>  #include <unistd.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>>  #include \"libcamera/internal/event_notifier.h\"\n>> -#include \"libcamera/internal/log.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  \n>>  /**\n>> - * \\file event_dispatcher_poll.h\n>> + * \\file base/event_dispatcher_poll.h\n>>   */\n>>  \n>>  namespace libcamera {\n>> diff --git a/src/libcamera/log.cpp b/src/libcamera/base/log.cpp\n>> similarity index 99%\n>> rename from src/libcamera/log.cpp\n>> rename to src/libcamera/base/log.cpp\n>> index 5ff0e9017648..1801ae26a2e3 100644\n>> --- a/src/libcamera/log.cpp\n>> +++ b/src/libcamera/base/log.cpp\n>> @@ -5,7 +5,7 @@\n>>   * log.cpp - Logging infrastructure\n>>   */\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include <array>\n>>  #if HAVE_BACKTRACE\n>> @@ -23,12 +23,11 @@\n>>  \n>>  #include <libcamera/logging.h>\n>>  \n>> +#include <libcamera/base/thread.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/thread.h\"\n>> -\n>>  /**\n>> - * \\file log.h\n>> + * \\file base/log.h\n>>   * \\brief Logging infrastructure\n>>   *\n>>   * libcamera includes a logging infrastructure used through the library that\n>> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n>> index 302a288685d3..7a19c67c51b8 100644\n>> --- a/src/libcamera/base/meson.build\n>> +++ b/src/libcamera/base/meson.build\n>> @@ -2,10 +2,21 @@\n>>  \n>>  libcamera_base_sources = files([\n>>      'class.cpp',\n>> +    'bound_method.cpp',\n>> +    'event_dispatcher.cpp',\n>> +    'event_dispatcher_poll.cpp',\n>> +    'log.cpp',\n>> +    'message.cpp',\n>> +    'object.cpp',\n>> +    'semaphore.cpp',\n>> +    'signal.cpp',\n>> +    'thread.cpp',\n>> +    'timer.cpp',\n>>      'utils.cpp',\n>>  ])\n>>  \n>>  libcamera_base_deps = [\n>> +    dependency('threads'),\n>>  ]\n>>  \n>>  libcamera_base_lib = shared_library('libcamera-base',\n>> diff --git a/src/libcamera/message.cpp b/src/libcamera/base/message.cpp\n>> similarity index 96%\n>> rename from src/libcamera/message.cpp\n>> rename to src/libcamera/base/message.cpp\n>> index bc985c077a4f..f1d772e43465 100644\n>> --- a/src/libcamera/message.cpp\n>> +++ b/src/libcamera/base/message.cpp\n>> @@ -5,14 +5,13 @@\n>>   * message.cpp - Message queue support\n>>   */\n>>  \n>> -#include \"libcamera/internal/message.h\"\n>> +#include <libcamera/base/message.h>\n>>  \n>> -#include <libcamera/signal.h>\n>> -\n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  /**\n>> - * \\file message.h\n>> + * \\file base/message.h\n>>   * \\brief Message queue support\n>>   *\n>>   * The messaging API enables inter-thread communication through message\n>> diff --git a/src/libcamera/object.cpp b/src/libcamera/base/object.cpp\n>> similarity index 97%\n>> rename from src/libcamera/object.cpp\n>> rename to src/libcamera/base/object.cpp\n>> index 51cac64ea313..25410ecd949e 100644\n>> --- a/src/libcamera/object.cpp\n>> +++ b/src/libcamera/base/object.cpp\n>> @@ -5,21 +5,19 @@\n>>   * object.cpp - Base object\n>>   */\n>>  \n>> -#include <libcamera/object.h>\n>> +#include <libcamera/base/object.h>\n>>  \n>>  #include <algorithm>\n>>  \n>> -#include <libcamera/signal.h>\n>> -\n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/message.h>\n>> +#include <libcamera/base/semaphore.h>\n>> +#include <libcamera/base/signal.h>\n>> +#include <libcamera/base/thread.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> -#include \"libcamera/internal/message.h\"\n>> -#include \"libcamera/internal/semaphore.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -\n>>  /**\n>> - * \\file object.h\n>> + * \\file base/object.h\n>>   * \\brief Base object to support automatic signal disconnection\n>>   */\n>>  \n>> diff --git a/src/libcamera/semaphore.cpp b/src/libcamera/base/semaphore.cpp\n>> similarity index 96%\n>> rename from src/libcamera/semaphore.cpp\n>> rename to src/libcamera/base/semaphore.cpp\n>> index d8988a9189e8..7aedc6a8c48b 100644\n>> --- a/src/libcamera/semaphore.cpp\n>> +++ b/src/libcamera/base/semaphore.cpp\n>> @@ -5,11 +5,11 @@\n>>   * semaphore.cpp - General-purpose counting semaphore\n>>   */\n>>  \n>> -#include \"libcamera/internal/semaphore.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/base/semaphore.h>\n>> +#include <libcamera/base/thread.h>\n>>  \n>>  /**\n>> - * \\file semaphore.h\n>> + * \\file base/semaphore.h\n>>   * \\brief General-purpose counting semaphore\n>>   */\n>>  \n>> diff --git a/src/libcamera/signal.cpp b/src/libcamera/base/signal.cpp\n>> similarity index 98%\n>> rename from src/libcamera/signal.cpp\n>> rename to src/libcamera/base/signal.cpp\n>> index 2532df3c3073..298b2d4b3619 100644\n>> --- a/src/libcamera/signal.cpp\n>> +++ b/src/libcamera/base/signal.cpp\n>> @@ -5,12 +5,12 @@\n>>   * signal.cpp - Signal & slot implementation\n>>   */\n>>  \n>> -#include <libcamera/signal.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/base/thread.h>\n>>  \n>>  /**\n>> - * \\file signal.h\n>> + * \\file base/signal.h\n>>   * \\brief Signal & slot implementation\n>>   */\n>>  \n>> diff --git a/src/libcamera/thread.cpp b/src/libcamera/base/thread.cpp\n>> similarity index 98%\n>> rename from src/libcamera/thread.cpp\n>> rename to src/libcamera/base/thread.cpp\n>> index 91e4737ad032..c7c2d6b29d6a 100644\n>> --- a/src/libcamera/thread.cpp\n>> +++ b/src/libcamera/base/thread.cpp\n>> @@ -5,7 +5,7 @@\n>>   * thread.cpp - Thread support\n>>   */\n>>  \n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/base/thread.h>\n>>  \n>>  #include <atomic>\n>>  #include <condition_variable>\n>> @@ -14,10 +14,10 @@\n>>  #include <sys/types.h>\n>>  #include <unistd.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -#include \"libcamera/internal/event_dispatcher_poll.h\"\n>> -#include \"libcamera/internal/log.h\"\n>> -#include \"libcamera/internal/message.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/event_dispatcher_poll.h>\n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/message.h>\n>>  \n>>  /**\n>>   * \\page thread Thread Support\n>> @@ -102,7 +102,7 @@\n>>   */\n>>  \n>>  /**\n>> - * \\file thread.h\n>> + * \\file base/thread.h\n>>   * \\brief Thread support\n>>   */\n>>  \n>> diff --git a/src/libcamera/timer.cpp b/src/libcamera/base/timer.cpp\n>> similarity index 94%\n>> rename from src/libcamera/timer.cpp\n>> rename to src/libcamera/base/timer.cpp\n>> index 9496671edffc..9c54352d46bd 100644\n>> --- a/src/libcamera/timer.cpp\n>> +++ b/src/libcamera/base/timer.cpp\n>> @@ -5,21 +5,20 @@\n>>   * timer.cpp - Generic timer\n>>   */\n>>  \n>> -#include \"libcamera/internal/timer.h\"\n>> +#include <libcamera/base/timer.h>\n>>  \n>>  #include <chrono>\n>>  \n>> -#include <libcamera/camera_manager.h>\n>> -\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/message.h>\n>> +#include <libcamera/base/thread.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -#include \"libcamera/internal/log.h\"\n>> -#include \"libcamera/internal/message.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/camera_manager.h>\n>>  \n>>  /**\n>> - * \\file timer.h\n>> + * \\file base/timer.h\n>>   * \\brief Generic timer\n>>   */\n>>  \n>> diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp\n>> index ca999429dce5..e4c345d518da 100644\n>> --- a/src/libcamera/buffer.cpp\n>> +++ b/src/libcamera/buffer.cpp\n>> @@ -13,7 +13,7 @@\n>>  #include <sys/mman.h>\n>>  #include <unistd.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /**\n>>   * \\file libcamera/buffer.h\n>> diff --git a/src/libcamera/byte_stream_buffer.cpp b/src/libcamera/byte_stream_buffer.cpp\n>> index 7fc6f6944471..b67bb928f8c1 100644\n>> --- a/src/libcamera/byte_stream_buffer.cpp\n>> +++ b/src/libcamera/byte_stream_buffer.cpp\n>> @@ -10,7 +10,7 @@\n>>  #include <stdint.h>\n>>  #include <string.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /**\n>>   * \\file byte_stream_buffer.h\n>> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n>> index 1340c266cc5f..de0123aeafca 100644\n>> --- a/src/libcamera/camera.cpp\n>> +++ b/src/libcamera/camera.cpp\n>> @@ -11,13 +11,14 @@\n>>  #include <atomic>\n>>  #include <iomanip>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/thread.h>\n>> +\n>>  #include <libcamera/framebuffer_allocator.h>\n>>  #include <libcamera/request.h>\n>>  #include <libcamera/stream.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>>  \n>>  /**\n>>   * \\file camera.h\n>> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n>> index a3784db6e697..fc3bd88c737b 100644\n>> --- a/src/libcamera/camera_manager.cpp\n>> +++ b/src/libcamera/camera_manager.cpp\n>> @@ -14,12 +14,13 @@\n>>  \n>>  #include <libcamera/base/utils.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/thread.h>\n>> +\n>>  #include \"libcamera/internal/device_enumerator.h\"\n>>  #include \"libcamera/internal/ipa_manager.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  #include \"libcamera/internal/process.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>>  \n>>  /**\n>>   * \\file camera_manager.h\n>> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp\n>> index fc4ea78d1fc7..7b7279efbba8 100644\n>> --- a/src/libcamera/camera_sensor_properties.cpp\n>> +++ b/src/libcamera/camera_sensor_properties.cpp\n>> @@ -9,9 +9,9 @@\n>>  \n>>  #include <map>\n>>  \n>> -#include <libcamera/control_ids.h>\n>> +#include <libcamera/base/log.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/control_ids.h>\n>>  \n>>  /**\n>>   * \\file camera_sensor_properties.h\n>> diff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp\n>> index 097444130ef7..dd5a26083747 100644\n>> --- a/src/libcamera/control_serializer.cpp\n>> +++ b/src/libcamera/control_serializer.cpp\n>> @@ -11,13 +11,14 @@\n>>  #include <memory>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/controls.h>\n>>  #include <libcamera/ipa/ipa_controls.h>\n>>  #include <libcamera/span.h>\n>>  \n>>  #include \"libcamera/internal/byte_stream_buffer.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  /**\n>>   * \\file control_serializer.h\n>> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\n>> index 7df372ad3b6c..34317fa0f65d 100644\n>> --- a/src/libcamera/controls.cpp\n>> +++ b/src/libcamera/controls.cpp\n>> @@ -12,10 +12,10 @@\n>>  #include <string>\n>>  #include <string.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>>  #include \"libcamera/internal/control_validator.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  /**\n>>   * \\file controls.h\n>> diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp\n>> index 0bf81b510d16..90ce7e0b5b52 100644\n>> --- a/src/libcamera/delayed_controls.cpp\n>> +++ b/src/libcamera/delayed_controls.cpp\n>> @@ -7,9 +7,10 @@\n>>  \n>>  #include \"libcamera/internal/delayed_controls.h\"\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/controls.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/v4l2_device.h\"\n>>  \n>>  /**\n>> diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp\n>> index e6ecc360e32f..1f33faf5e7aa 100644\n>> --- a/src/libcamera/device_enumerator.cpp\n>> +++ b/src/libcamera/device_enumerator.cpp\n>> @@ -11,7 +11,8 @@\n>>  \n>>  #include <string.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include \"libcamera/internal/media_device.h\"\n>>  \n>>  /**\n>> diff --git a/src/libcamera/device_enumerator_sysfs.cpp b/src/libcamera/device_enumerator_sysfs.cpp\n>> index ff72885288c3..686bb8099485 100644\n>> --- a/src/libcamera/device_enumerator_sysfs.cpp\n>> +++ b/src/libcamera/device_enumerator_sysfs.cpp\n>> @@ -17,7 +17,8 @@\n>>  #include <sys/types.h>\n>>  #include <unistd.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include \"libcamera/internal/media_device.h\"\n>>  \n>>  namespace libcamera {\n>> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n>> index d26fcf10b3c4..4b842773fcd6 100644\n>> --- a/src/libcamera/device_enumerator_udev.cpp\n>> +++ b/src/libcamera/device_enumerator_udev.cpp\n>> @@ -17,8 +17,9 @@\n>>  #include <sys/sysmacros.h>\n>>  #include <unistd.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include \"libcamera/internal/event_notifier.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>>  \n>>  namespace libcamera {\n>> diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp\n>> index 6b0575c0db77..784016a9f907 100644\n>> --- a/src/libcamera/event_notifier.cpp\n>> +++ b/src/libcamera/event_notifier.cpp\n>> @@ -9,9 +9,9 @@\n>>  \n>>  #include <libcamera/camera_manager.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -#include \"libcamera/internal/message.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/message.h>\n>> +#include <libcamera/base/thread.h>\n>>  \n>>  /**\n>>   * \\file event_notifier.h\n>> diff --git a/src/libcamera/file.cpp b/src/libcamera/file.cpp\n>> index bce2b6138239..def0f60d044b 100644\n>> --- a/src/libcamera/file.cpp\n>> +++ b/src/libcamera/file.cpp\n>> @@ -14,7 +14,7 @@\n>>  #include <sys/types.h>\n>>  #include <unistd.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /**\n>>   * \\file file.h\n>> diff --git a/src/libcamera/file_descriptor.cpp b/src/libcamera/file_descriptor.cpp\n>> index 8b505ed3b6b2..638b3bbe0449 100644\n>> --- a/src/libcamera/file_descriptor.cpp\n>> +++ b/src/libcamera/file_descriptor.cpp\n>> @@ -11,7 +11,7 @@\n>>  #include <unistd.h>\n>>  #include <utility>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /**\n>>   * \\file file_descriptor.h\n>> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\n>> index 55822f4cc97b..f5fbaf0b95f9 100644\n>> --- a/src/libcamera/formats.cpp\n>> +++ b/src/libcamera/formats.cpp\n>> @@ -12,7 +12,7 @@\n>>  \n>>  #include <libcamera/formats.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /**\n>>   * \\file internal/formats.h\n>> diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp\n>> index 2fbba37a1b0b..86a57923286c 100644\n>> --- a/src/libcamera/framebuffer_allocator.cpp\n>> +++ b/src/libcamera/framebuffer_allocator.cpp\n>> @@ -9,11 +9,12 @@\n>>  \n>>  #include <errno.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/stream.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  \n>>  /**\n>> diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp\n>> index 136446895eb6..9bbef0b537f1 100644\n>> --- a/src/libcamera/geometry.cpp\n>> +++ b/src/libcamera/geometry.cpp\n>> @@ -10,7 +10,7 @@\n>>  #include <sstream>\n>>  #include <stdint.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /**\n>>   * \\file geometry.h\n>> diff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp\n>> index 131b3bd616fd..fb941e6bcd8a 100644\n>> --- a/src/libcamera/ipa_data_serializer.cpp\n>> +++ b/src/libcamera/ipa_data_serializer.cpp\n>> @@ -7,7 +7,7 @@\n>>  \n>>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /**\n>>   * \\file ipa_data_serializer.h\n>> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n>> index 263cacd64737..35c7259801fa 100644\n>> --- a/src/libcamera/ipa_manager.cpp\n>> +++ b/src/libcamera/ipa_manager.cpp\n>> @@ -12,12 +12,12 @@\n>>  #include <string.h>\n>>  #include <sys/types.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>>  #include \"libcamera/internal/file.h\"\n>>  #include \"libcamera/internal/ipa_module.h\"\n>>  #include \"libcamera/internal/ipa_proxy.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  \n>>  /**\n>> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n>> index a4e7fb861138..7ab5557916e7 100644\n>> --- a/src/libcamera/ipa_module.cpp\n>> +++ b/src/libcamera/ipa_module.cpp\n>> @@ -23,10 +23,10 @@\n>>  \n>>  #include <libcamera/span.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>>  #include \"libcamera/internal/file.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  \n>>  /**\n>> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n>> index ca980ec705a6..babcc48bcfd0 100644\n>> --- a/src/libcamera/ipa_proxy.cpp\n>> +++ b/src/libcamera/ipa_proxy.cpp\n>> @@ -12,10 +12,10 @@\n>>  #include <sys/types.h>\n>>  #include <unistd.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>>  #include \"libcamera/internal/ipa_module.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  /**\n>>   * \\file ipa_proxy.h\n>> diff --git a/src/libcamera/ipc_pipe.cpp b/src/libcamera/ipc_pipe.cpp\n>> index c402c8d08699..28e20e031623 100644\n>> --- a/src/libcamera/ipc_pipe.cpp\n>> +++ b/src/libcamera/ipc_pipe.cpp\n>> @@ -7,7 +7,7 @@\n>>  \n>>  #include \"libcamera/internal/ipc_pipe.h\"\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /**\n>>   * \\file ipc_pipe.h\n>> diff --git a/src/libcamera/ipc_pipe_unixsocket.cpp b/src/libcamera/ipc_pipe_unixsocket.cpp\n>> index db0e260f22b1..4511775fb467 100644\n>> --- a/src/libcamera/ipc_pipe_unixsocket.cpp\n>> +++ b/src/libcamera/ipc_pipe_unixsocket.cpp\n>> @@ -9,13 +9,14 @@\n>>  \n>>  #include <vector>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>> +\n>>  #include \"libcamera/internal/ipc_pipe.h\"\n>>  #include \"libcamera/internal/ipc_unixsocket.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/process.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n>> index fdb359f7fcd1..1466597077d4 100644\n>> --- a/src/libcamera/ipc_unixsocket.cpp\n>> +++ b/src/libcamera/ipc_unixsocket.cpp\n>> @@ -12,8 +12,9 @@\n>>  #include <sys/socket.h>\n>>  #include <unistd.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include \"libcamera/internal/event_notifier.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  /**\n>>   * \\file ipc_unixsocket.h\n>> diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\n>> index 9ec84e560b77..e12ab1abb10d 100644\n>> --- a/src/libcamera/media_device.cpp\n>> +++ b/src/libcamera/media_device.cpp\n>> @@ -18,7 +18,7 @@\n>>  \n>>  #include <linux/media.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /**\n>>   * \\file media_device.h\n>> diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp\n>> index 94aeb50402ca..815edc8e3b2d 100644\n>> --- a/src/libcamera/media_object.cpp\n>> +++ b/src/libcamera/media_object.cpp\n>> @@ -15,7 +15,8 @@\n>>  \n>>  #include <linux/media.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include \"libcamera/internal/media_device.h\"\n>>  \n>>  /**\n>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n>> index a341004c0c19..86212cec0281 100644\n>> --- a/src/libcamera/meson.build\n>> +++ b/src/libcamera/meson.build\n>> @@ -2,7 +2,6 @@\n>>  \n>>  libcamera_sources = files([\n>>      'bayer_format.cpp',\n>> -    'bound_method.cpp',\n>>      'buffer.cpp',\n>>      'byte_stream_buffer.cpp',\n>>      'camera.cpp',\n>> @@ -16,8 +15,6 @@ libcamera_sources = files([\n>>      'delayed_controls.cpp',\n>>      'device_enumerator.cpp',\n>>      'device_enumerator_sysfs.cpp',\n>> -    'event_dispatcher.cpp',\n>> -    'event_dispatcher_poll.cpp',\n>>      'event_notifier.cpp',\n>>      'file.cpp',\n>>      'file_descriptor.cpp',\n>> @@ -33,23 +30,16 @@ libcamera_sources = files([\n>>      'ipc_pipe.cpp',\n>>      'ipc_pipe_unixsocket.cpp',\n>>      'ipc_unixsocket.cpp',\n>> -    'log.cpp',\n>>      'media_device.cpp',\n>>      'media_object.cpp',\n>> -    'message.cpp',\n>> -    'object.cpp',\n>>      'pipeline_handler.cpp',\n>>      'pixel_format.cpp',\n>>      'process.cpp',\n>>      'pub_key.cpp',\n>>      'request.cpp',\n>> -    'semaphore.cpp',\n>> -    'signal.cpp',\n>>      'source-paths.cpp',\n>>      'stream.cpp',\n>>      'sysfs.cpp',\n>> -    'thread.cpp',\n>> -    'timer.cpp',\n>>      'transform.cpp',\n>>      'v4l2_device.cpp',\n>>      'v4l2_pixelformat.cpp',\n>> @@ -128,7 +118,6 @@ libcamera_deps = [\n>>      liblttng,\n>>      libudev,\n>>      libcamera_base,\n>> -    dependency('threads'),\n>>  ]\n>>  \n>>  # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.\n>> diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h\n>> index d8d4a181ffd1..f28e9f1ddf42 100644\n>> --- a/src/libcamera/pipeline/ipu3/cio2.h\n>> +++ b/src/libcamera/pipeline/ipu3/cio2.h\n>> @@ -11,7 +11,7 @@\n>>  #include <queue>\n>>  #include <vector>\n>>  \n>> -#include <libcamera/signal.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>> diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h\n>> index 59e64e8170a2..3ef7e4454693 100644\n>> --- a/src/libcamera/pipeline/ipu3/frames.h\n>> +++ b/src/libcamera/pipeline/ipu3/frames.h\n>> @@ -12,7 +12,7 @@\n>>  #include <queue>\n>>  #include <vector>\n>>  \n>> -#include <libcamera/signal.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\n>> index 32d143a862b2..e955bc3456ba 100644\n>> --- a/src/libcamera/pipeline/ipu3/imgu.cpp\n>> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n>> @@ -13,12 +13,12 @@\n>>  \n>>  #include <linux/media-bus-format.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/utils.h>\n>> +\n>>  #include <libcamera/formats.h>\n>>  #include <libcamera/stream.h>\n>>  \n>> -#include <libcamera/base/utils.h>\n>> -\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>>  \n>>  namespace libcamera {\n>> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n>> index 6b43ad2fb2b1..76c3bb3d8aa9 100644\n>> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n>> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n>> @@ -11,6 +11,9 @@\n>>  #include <queue>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/utils.h>\n>> +\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/formats.h>\n>> @@ -20,13 +23,10 @@\n>>  #include <libcamera/request.h>\n>>  #include <libcamera/stream.h>\n>>  \n>> -#include <libcamera/base/utils.h>\n>> -\n>>  #include \"libcamera/internal/camera_sensor.h\"\n>>  #include \"libcamera/internal/delayed_controls.h\"\n>>  #include \"libcamera/internal/device_enumerator.h\"\n>>  #include \"libcamera/internal/ipa_manager.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  \n>> diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n>> index 4d5dd6cb87cc..573ea11de607 100644\n>> --- a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n>> +++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n>> @@ -14,7 +14,7 @@\n>>  #include <sys/ioctl.h>\n>>  #include <unistd.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  /*\n>>   * /dev/dma-heap/linux,cma is the dma-heap allocator, which allows dmaheap-cma\n>> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n>> index f2430415d32d..b3265d0e8aab 100644\n>> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n>> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n>> @@ -6,9 +6,9 @@\n>>   */\n>>  #include \"rpi_stream.h\"\n>>  \n>> -#include <libcamera/ipa/raspberrypi_ipa_interface.h>\n>> +#include <libcamera/base/log.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/ipa/raspberrypi_ipa_interface.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>> index c625d7248f5c..00df4f0b3e6b 100644\n>> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n>> @@ -14,6 +14,9 @@\n>>  \n>>  #include <linux/media-bus-format.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/utils.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/control_ids.h>\n>> @@ -24,13 +27,10 @@\n>>  #include <libcamera/request.h>\n>>  #include <libcamera/stream.h>\n>>  \n>> -#include <libcamera/base/utils.h>\n>> -\n>>  #include \"libcamera/internal/camera_sensor.h\"\n>>  #include \"libcamera/internal/delayed_controls.h\"\n>>  #include \"libcamera/internal/device_enumerator.h\"\n>>  #include \"libcamera/internal/ipa_manager.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n>> index 3b3e37d258d0..c185ac3992dd 100644\n>> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n>> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n>> @@ -10,10 +10,11 @@\n>>  #include <memory>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/signal.h>\n>> +\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/geometry.h>\n>>  #include <libcamera/pixel_format.h>\n>> -#include <libcamera/signal.h>\n>>  #include <libcamera/span.h>\n>>  \n>>  #include \"libcamera/internal/media_object.h\"\n>> diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp\n>> index 589f185b1bf1..9af1096be834 100644\n>> --- a/src/libcamera/pipeline/simple/converter.cpp\n>> +++ b/src/libcamera/pipeline/simple/converter.cpp\n>> @@ -10,14 +10,14 @@\n>>  #include <algorithm>\n>>  #include <limits.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/signal.h>\n>> +#include <libcamera/base/utils.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/geometry.h>\n>> -#include <libcamera/signal.h>\n>>  #include <libcamera/stream.h>\n>>  \n>> -#include <libcamera/base/utils.h>\n>> -\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>>  \n>> diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h\n>> index 480e528d2210..276a2a291c21 100644\n>> --- a/src/libcamera/pipeline/simple/converter.h\n>> +++ b/src/libcamera/pipeline/simple/converter.h\n>> @@ -16,9 +16,9 @@\n>>  #include <vector>\n>>  \n>>  #include <libcamera/pixel_format.h>\n>> -#include <libcamera/signal.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n>> index 1894014d8fc7..4d78e6faf403 100644\n>> --- a/src/libcamera/pipeline/simple/simple.cpp\n>> +++ b/src/libcamera/pipeline/simple/simple.cpp\n>> @@ -21,6 +21,8 @@\n>>  \n>>  #include <linux/media-bus-format.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/request.h>\n>> @@ -28,7 +30,6 @@\n>>  \n>>  #include \"libcamera/internal/camera_sensor.h\"\n>>  #include \"libcamera/internal/device_enumerator.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>> diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n>> index d8c17dccae53..0f634b8da609 100644\n>> --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n>> +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n>> @@ -12,6 +12,9 @@\n>>  #include <memory>\n>>  #include <tuple>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/utils.h>\n>> +\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/controls.h>\n>> @@ -19,10 +22,7 @@\n>>  #include <libcamera/request.h>\n>>  #include <libcamera/stream.h>\n>>  \n>> -#include <libcamera/base/utils.h>\n>> -\n>>  #include \"libcamera/internal/device_enumerator.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  #include \"libcamera/internal/sysfs.h\"\n>> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n>> index 025ca56205f8..361b715778ef 100644\n>> --- a/src/libcamera/pipeline/vimc/vimc.cpp\n>> +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n>> @@ -14,21 +14,23 @@\n>>  #include <linux/media-bus-format.h>\n>>  #include <linux/version.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/utils.h>\n>> +\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/controls.h>\n>>  #include <libcamera/formats.h>\n>>  #include <libcamera/ipa/ipa_interface.h>\n>>  #include <libcamera/ipa/ipa_module_info.h>\n>> +#include <libcamera/ipa/vimc_ipa_interface.h>\n>> +#include <libcamera/ipa/vimc_ipa_proxy.h>\n> \n> I thought these are already included below?\n> \n>>  #include <libcamera/request.h>\n>>  #include <libcamera/stream.h>\n>>  \n>> -#include <libcamera/base/utils.h>\n>> -\n>>  #include \"libcamera/internal/camera_sensor.h\"\n>>  #include \"libcamera/internal/device_enumerator.h\"\n>>  #include \"libcamera/internal/ipa_manager.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  #include \"libcamera/internal/v4l2_subdevice.h\"\n> \n> Like below here.\n> \n> With that resolved,\n\nYes, I think they are - this patch shouldn't be introducing new lines,\nonly moving them.\n\nI think this was an artifact of my trying to use automated tooling to\nsort all the headers. I guess it's mostly worked out ;-)\n\nI'll fix it now.\n\nWow - that turned out to be a rabbit hole.\n\nOther things fixed, and clang-format sort orders re-improved.\n\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\nThanks\n\n> \n>> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n>> index 6fb2a743c3c2..f626eddd321f 100644\n>> --- a/src/libcamera/pipeline_handler.cpp\n>> +++ b/src/libcamera/pipeline_handler.cpp\n>> @@ -9,14 +9,14 @@\n>>  \n>>  #include <sys/sysmacros.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/utils.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/camera_manager.h>\n>>  \n>> -#include <libcamera/base/utils.h>\n>> -\n>>  #include \"libcamera/internal/device_enumerator.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>>  #include \"libcamera/internal/tracepoints.h\"\n>>  \n>> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n>> index 35091f60c1e9..463380299a65 100644\n>> --- a/src/libcamera/process.cpp\n>> +++ b/src/libcamera/process.cpp\n>> @@ -20,10 +20,10 @@\n>>  #include <unistd.h>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>>  #include \"libcamera/internal/event_notifier.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  /**\n>>   * \\file process.h\n>> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\n>> index 6611e74d1800..518384eb8cf6 100644\n>> --- a/src/libcamera/request.cpp\n>> +++ b/src/libcamera/request.cpp\n>> @@ -10,13 +10,14 @@\n>>  #include <map>\n>>  #include <sstream>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/control_ids.h>\n>>  #include <libcamera/stream.h>\n>>  \n>>  #include \"libcamera/internal/camera_controls.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/tracepoints.h\"\n>>  \n>>  /**\n>> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n>> index d5d68427e658..b8626775d224 100644\n>> --- a/src/libcamera/stream.cpp\n>> +++ b/src/libcamera/stream.cpp\n>> @@ -15,9 +15,9 @@\n>>  \n>>  #include <libcamera/request.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  /**\n>>   * \\file stream.h\n>> diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp\n>> index e9004b2b59c8..4372b1348178 100644\n>> --- a/src/libcamera/sysfs.cpp\n>> +++ b/src/libcamera/sysfs.cpp\n>> @@ -12,8 +12,9 @@\n>>  #include <sys/stat.h>\n>>  #include <sys/sysmacros.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include \"libcamera/internal/file.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  /**\n>>   * \\file sysfs.h\n>> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n>> index facb53e13169..334b9b78b812 100644\n>> --- a/src/libcamera/v4l2_device.cpp\n>> +++ b/src/libcamera/v4l2_device.cpp\n>> @@ -16,10 +16,10 @@\n>>  #include <sys/syscall.h>\n>>  #include <unistd.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>>  #include \"libcamera/internal/event_notifier.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/sysfs.h\"\n>>  \n>>  /**\n>> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\n>> index 166d93cf1d20..87d728fe5577 100644\n>> --- a/src/libcamera/v4l2_pixelformat.cpp\n>> +++ b/src/libcamera/v4l2_pixelformat.cpp\n>> @@ -12,11 +12,12 @@\n>>  #include <map>\n>>  #include <string.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/formats.h>\n>>  #include <libcamera/pixel_format.h>\n>>  \n>>  #include \"libcamera/internal/formats.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  /**\n>>   * \\file v4l2_pixelformat.h\n>> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n>> index 2c56cfafbce4..8fe5e45b31ee 100644\n>> --- a/src/libcamera/v4l2_subdevice.cpp\n>> +++ b/src/libcamera/v4l2_subdevice.cpp\n>> @@ -19,9 +19,9 @@\n>>  \n>>  #include <libcamera/geometry.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>>  #include \"libcamera/internal/media_object.h\"\n>>  \n>> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n>> index 12c09dc7578d..dc23510bc5aa 100644\n>> --- a/src/libcamera/v4l2_videodevice.cpp\n>> +++ b/src/libcamera/v4l2_videodevice.cpp\n>> @@ -21,10 +21,11 @@\n>>  \n>>  #include <linux/version.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include <libcamera/file_descriptor.h>\n>>  \n>>  #include \"libcamera/internal/event_notifier.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>>  #include \"libcamera/internal/media_object.h\"\n>>  \n>> diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp\n>> index 97825c715bba..157ab94e0544 100644\n>> --- a/src/v4l2/v4l2_camera.cpp\n>> +++ b/src/v4l2/v4l2_camera.cpp\n>> @@ -10,7 +10,7 @@\n>>  #include <errno.h>\n>>  #include <unistd.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/base/log.h>\n>>  \n>>  using namespace libcamera;\n>>  \n>> diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h\n>> index d238046250e3..dbe0573bd3a4 100644\n>> --- a/src/v4l2/v4l2_camera.h\n>> +++ b/src/v4l2/v4l2_camera.h\n>> @@ -12,13 +12,13 @@\n>>  #include <mutex>\n>>  #include <utility>\n>>  \n>> +#include <libcamera/base/semaphore.h>\n>> +\n>>  #include <libcamera/buffer.h>\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/file_descriptor.h>\n>>  #include <libcamera/framebuffer_allocator.h>\n>>  \n>> -#include \"libcamera/internal/semaphore.h\"\n>> -\n>>  using namespace libcamera;\n>>  \n>>  class V4L2Camera\n>> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\n>> index a5a25507462e..7682c4bddf90 100644\n>> --- a/src/v4l2/v4l2_camera_proxy.cpp\n>> +++ b/src/v4l2/v4l2_camera_proxy.cpp\n>> @@ -18,12 +18,12 @@\n>>  \n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/formats.h>\n>> -#include <libcamera/object.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/object.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>>  #include \"libcamera/internal/formats.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  \n>>  #include \"v4l2_camera.h\"\n>>  #include \"v4l2_camera_file.h\"\n>> diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp\n>> index 27de6c50ff4e..e566125a70ac 100644\n>> --- a/src/v4l2/v4l2_compat_manager.cpp\n>> +++ b/src/v4l2/v4l2_compat_manager.cpp\n>> @@ -19,12 +19,11 @@\n>>  #include <sys/types.h>\n>>  #include <unistd.h>\n>>  \n>> -#include <libcamera/camera.h>\n>> -#include <libcamera/camera_manager.h>\n>> -\n>> +#include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/camera.h>\n>> +#include <libcamera/camera_manager.h>\n>>  \n>>  #include \"v4l2_camera_file.h\"\n>>  \n>> diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp\n>> index 61f4eb92ae95..c504ea09e64b 100644\n>> --- a/test/camera/buffer_import.cpp\n>> +++ b/test/camera/buffer_import.cpp\n>> @@ -12,11 +12,12 @@\n>>  #include <numeric>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>> +\n>>  #include \"libcamera/internal/device_enumerator.h\"\n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>>  \n>>  #include \"buffer_source.h\"\n>> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n>> index c4bc21100777..238d98dbba16 100644\n>> --- a/test/camera/capture.cpp\n>> +++ b/test/camera/capture.cpp\n>> @@ -9,9 +9,9 @@\n>>  \n>>  #include <libcamera/framebuffer_allocator.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>>  \n>>  #include \"camera_test.h\"\n>>  #include \"test.h\"\n>> diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp\n>> index 8ae05ac62985..1cc17b045ec0 100644\n>> --- a/test/event-dispatcher.cpp\n>> +++ b/test/event-dispatcher.cpp\n>> @@ -10,9 +10,9 @@\n>>  #include <signal.h>\n>>  #include <sys/time.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/event-thread.cpp b/test/event-thread.cpp\n>> index aeb8b3bf4bac..05c5d26d3611 100644\n>> --- a/test/event-thread.cpp\n>> +++ b/test/event-thread.cpp\n>> @@ -10,9 +10,10 @@\n>>  #include <string.h>\n>>  #include <unistd.h>\n>>  \n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>> +\n>>  #include \"libcamera/internal/event_notifier.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/event.cpp b/test/event.cpp\n>> index 1f16c97bbab5..aa79da99c286 100644\n>> --- a/test/event.cpp\n>> +++ b/test/event.cpp\n>> @@ -9,10 +9,11 @@\n>>  #include <string.h>\n>>  #include <unistd.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>> +\n>>  #include \"libcamera/internal/event_notifier.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp\n>> index 94cb859352ec..bb160537c5d5 100644\n>> --- a/test/hotplug-cameras.cpp\n>> +++ b/test/hotplug-cameras.cpp\n>> @@ -14,10 +14,11 @@\n>>  #include <libcamera/camera.h>\n>>  #include <libcamera/camera_manager.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>> +\n>>  #include \"libcamera/internal/file.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\n>> index d6ca6f5137b0..656d86552d85 100644\n>> --- a/test/ipa/ipa_interface_test.cpp\n>> +++ b/test/ipa/ipa_interface_test.cpp\n>> @@ -14,15 +14,16 @@\n>>  \n>>  #include <libcamera/ipa/vimc_ipa_proxy.h>\n>>  \n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>> +\n>>  #include \"libcamera/internal/device_enumerator.h\"\n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>>  #include \"libcamera/internal/event_notifier.h\"\n>>  #include \"libcamera/internal/ipa_manager.h\"\n>>  #include \"libcamera/internal/ipa_module.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  #include \"libcamera/internal/process.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp\n>> index 80157b342795..aa35c8f071f1 100644\n>> --- a/test/ipc/unixsocket.cpp\n>> +++ b/test/ipc/unixsocket.cpp\n>> @@ -16,10 +16,11 @@\n>>  #include <sys/wait.h>\n>>  #include <unistd.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>> +\n>>  #include \"libcamera/internal/ipc_unixsocket.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp\n>> index 161d09b98719..6fe7fd9b8fc5 100644\n>> --- a/test/ipc/unixsocket_ipc.cpp\n>> +++ b/test/ipc/unixsocket_ipc.cpp\n>> @@ -15,19 +15,18 @@\n>>  #include <sys/wait.h>\n>>  #include <unistd.h>\n>>  \n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>>  #include \"libcamera/internal/ipc_pipe.h\"\n>>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>>  #include \"libcamera/internal/process.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  \n>>  #include \"test.h\"\n>>  \n>> -\n>>  using namespace std;\n>>  using namespace libcamera;\n>>  \n>> diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp\n>> index ae3c607a6881..5311896095a9 100644\n>> --- a/test/log/log_api.cpp\n>> +++ b/test/log/log_api.cpp\n>> @@ -16,9 +16,9 @@\n>>  #include <sys/types.h>\n>>  #include <unistd.h>\n>>  \n>> -#include <libcamera/logging.h>\n>> +#include <libcamera/base/log.h>\n>>  \n>> -#include \"libcamera/internal/log.h\"\n>> +#include <libcamera/logging.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n>> index 413d9207ea68..d138aa7ff562 100644\n>> --- a/test/log/log_process.cpp\n>> +++ b/test/log/log_process.cpp\n>> @@ -16,13 +16,13 @@\n>>  \n>>  #include <libcamera/logging.h>\n>>  \n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/process.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/message.cpp b/test/message.cpp\n>> index 9553ba8cbaed..eeea57feab76 100644\n>> --- a/test/message.cpp\n>> +++ b/test/message.cpp\n>> @@ -9,8 +9,8 @@\n>>  #include <iostream>\n>>  #include <thread>\n>>  \n>> -#include \"libcamera/internal/message.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/base/message.h>\n>> +#include <libcamera/base/thread.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/object-delete.cpp b/test/object-delete.cpp\n>> index a1a6f5ccefd5..eabefe935974 100644\n>> --- a/test/object-delete.cpp\n>> +++ b/test/object-delete.cpp\n>> @@ -7,9 +7,8 @@\n>>  \n>>  #include <iostream>\n>>  \n>> -#include <libcamera/object.h>\n>> -\n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/base/object.h>\n>> +#include <libcamera/base/thread.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp\n>> index a6f816f395eb..b1c0f473ba5c 100644\n>> --- a/test/object-invoke.cpp\n>> +++ b/test/object-invoke.cpp\n>> @@ -8,10 +8,9 @@\n>>  #include <iostream>\n>>  #include <thread>\n>>  \n>> -#include <libcamera/object.h>\n>> -\n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/object.h>\n>> +#include <libcamera/base/thread.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/object.cpp b/test/object.cpp\n>> index 264659b405d9..cbd0d3ececab 100644\n>> --- a/test/object.cpp\n>> +++ b/test/object.cpp\n>> @@ -7,10 +7,9 @@\n>>  \n>>  #include <iostream>\n>>  \n>> -#include <libcamera/object.h>\n>> -\n>> -#include \"libcamera/internal/message.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/base/message.h>\n>> +#include <libcamera/base/object.h>\n>> +#include <libcamera/base/thread.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n>> index a5155bae3162..8f7a1f05f681 100644\n>> --- a/test/process/process_test.cpp\n>> +++ b/test/process/process_test.cpp\n>> @@ -9,12 +9,13 @@\n>>  #include <unistd.h>\n>>  #include <vector>\n>>  \n>> +\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>>  #include \"libcamera/internal/process.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp\n>> index dbbba8912386..880bcd02c6be 100644\n>> --- a/test/serialization/ipa_data_serializer_test.cpp\n>> +++ b/test/serialization/ipa_data_serializer_test.cpp\n>> @@ -17,13 +17,14 @@\n>>  #include <unistd.h>\n>>  #include <vector>\n>>  \n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>> +\n>>  #include \"libcamera/internal/device_enumerator.h\"\n>>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>>  #include \"libcamera/internal/ipa_manager.h\"\n>>  #include \"libcamera/internal/ipa_module.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  \n>>  #include \"serialization_test.h\"\n>>  #include \"test.h\"\n>> diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp\n>> index 8a96b5d2abb3..d5e2eb662df2 100644\n>> --- a/test/signal-threads.cpp\n>> +++ b/test/signal-threads.cpp\n>> @@ -9,11 +9,10 @@\n>>  #include <iostream>\n>>  #include <thread>\n>>  \n>> +#include <libcamera/base/message.h>\n>> +#include <libcamera/base/thread.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/message.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -\n>>  #include \"test.h\"\n>>  \n>>  using namespace std;\n>> diff --git a/test/signal.cpp b/test/signal.cpp\n>> index f83ceb05f091..aceb02789cf4 100644\n>> --- a/test/signal.cpp\n>> +++ b/test/signal.cpp\n>> @@ -8,8 +8,8 @@\n>>  #include <iostream>\n>>  #include <string.h>\n>>  \n>> -#include <libcamera/object.h>\n>> -#include <libcamera/signal.h>\n>> +#include <libcamera/base/object.h>\n>> +#include <libcamera/base/signal.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/threads.cpp b/test/threads.cpp\n>> index e0c50dc90a65..d83b5833998f 100644\n>> --- a/test/threads.cpp\n>> +++ b/test/threads.cpp\n>> @@ -10,7 +10,7 @@\n>>  #include <memory>\n>>  #include <thread>\n>>  \n>> -#include \"libcamera/internal/thread.h\"\n>> +#include <libcamera/base/thread.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n>> index be29eee1bdb6..2c14865b74d5 100644\n>> --- a/test/timer-thread.cpp\n>> +++ b/test/timer-thread.cpp\n>> @@ -8,9 +8,9 @@\n>>  #include <chrono>\n>>  #include <iostream>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/timer.cpp b/test/timer.cpp\n>> index fc90b11040d8..88f226e79f5f 100644\n>> --- a/test/timer.cpp\n>> +++ b/test/timer.cpp\n>> @@ -8,9 +8,9 @@\n>>  #include <chrono>\n>>  #include <iostream>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp\n>> index c75259be0d10..91b3e4a0dad6 100644\n>> --- a/test/v4l2_videodevice/buffer_sharing.cpp\n>> +++ b/test/v4l2_videodevice/buffer_sharing.cpp\n>> @@ -14,9 +14,9 @@\n>>  \n>>  #include <libcamera/buffer.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>>  \n>>  #include \"v4l2_videodevice_test.h\"\n>>  \n>> diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp\n>> index accdb34a699c..f12c8bef97f6 100644\n>> --- a/test/v4l2_videodevice/capture_async.cpp\n>> +++ b/test/v4l2_videodevice/capture_async.cpp\n>> @@ -9,9 +9,9 @@\n>>  \n>>  #include <libcamera/buffer.h>\n>>  \n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>>  \n>>  #include \"v4l2_videodevice_test.h\"\n>>  \n>> diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n>> index e0f068082c01..fe4b3cc6487f 100644\n>> --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n>> +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n>> @@ -9,11 +9,12 @@\n>>  \n>>  #include <libcamera/buffer.h>\n>>  \n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/timer.h>\n>> +\n>>  #include \"libcamera/internal/device_enumerator.h\"\n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>>  #include \"libcamera/internal/media_device.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>> -#include \"libcamera/internal/timer.h\"\n>>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>>  \n>>  #include \"test.h\"\n>> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n>> index dc6748153445..5a64fe9cfeee 100644\n>> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n>> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n>> @@ -23,6 +23,9 @@\n>>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>\n>>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>\n>>  \n>> +#include <libcamera/base/log.h>\n>> +#include <libcamera/base/thread.h>\n>> +\n>>  #include \"libcamera/internal/control_serializer.h\"\n>>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>>  #include \"libcamera/internal/ipa_module.h\"\n>> @@ -30,9 +33,7 @@\n>>  #include \"libcamera/internal/ipc_pipe.h\"\n>>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>>  #include \"libcamera/internal/ipc_unixsocket.h\"\n>> -#include \"libcamera/internal/log.h\"\n>>  #include \"libcamera/internal/process.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n>> index 017b870c9dad..ae168548492c 100644\n>> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n>> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl\n>> @@ -19,12 +19,13 @@\n>>  #include <libcamera/ipa/ipa_interface.h>\n>>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>\n>>  \n>> +#include <libcamera/base/thread.h>\n>> +\n>>  #include \"libcamera/internal/control_serializer.h\"\n>>  #include \"libcamera/internal/ipa_proxy.h\"\n>>  #include \"libcamera/internal/ipc_pipe.h\"\n>>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>>  #include \"libcamera/internal/ipc_unixsocket.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>>  \n>>  namespace libcamera {\n>>  {%- if has_namespace %}\n>> 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\n>> index 8a57b6cc8b34..d993e39e5a5f 100644\n>> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n>> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n>> @@ -26,17 +26,18 @@\n>>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>\n>>  #include <libcamera/logging.h>\n>>  \n>> +#include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/thread.h>\n>> +#include <libcamera/base/log.h>\n>> +\n>>  #include \"libcamera/internal/camera_sensor.h\"\n>>  #include \"libcamera/internal/control_serializer.h\"\n>> -#include \"libcamera/internal/event_dispatcher.h\"\n>>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>>  #include \"libcamera/internal/ipa_module.h\"\n>>  #include \"libcamera/internal/ipa_proxy.h\"\n>>  #include \"libcamera/internal/ipc_pipe.h\"\n>>  #include \"libcamera/internal/ipc_pipe_unixsocket.h\"\n>>  #include \"libcamera/internal/ipc_unixsocket.h\"\n>> -#include \"libcamera/internal/log.h\"\n>> -#include \"libcamera/internal/thread.h\"\n>>  \n>>  using namespace libcamera;\n>>  \n>> -- \n>> 2.30.2\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 96F76C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 10:47:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E5353684CF;\n\tFri, 25 Jun 2021 12:47:55 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4671E684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 12:47:54 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8101C501;\n\tFri, 25 Jun 2021 12:47:53 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"dYWyRRuE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624618073;\n\tbh=b2dml/EwbuTTGcZVL7f5V990eRXV1Syuj140u9PMgX4=;\n\th=From:To:Cc:References:Subject:Date:In-Reply-To:From;\n\tb=dYWyRRuEef2p8ndscei9tuCJmrLpVbJnq7jK5msfr1mSS8TCpJgclBRIVhKTNOLKF\n\t6QiQoGpDVVGkVxelZgCQnwO3dqoZEtL4zkUkC3uSgtfKuxLYI5tYqeZp4ku4BWZ51g\n\tXP9WJkK33V905NPy+gGels+5sJGbT/G2sXYPO0aU=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"paul.elder@ideasonboard.com","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-10-kieran.bingham@ideasonboard.com>\n\t<20210625043133.GJ2599@pyrite.rasen.tech>","Message-ID":"<60e77aff-d906-4729-b51f-8d1762e04f14@ideasonboard.com>","Date":"Fri, 25 Jun 2021 11:47:50 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<20210625043133.GJ2599@pyrite.rasen.tech>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 09/16] libcamera/base: Move extended\n\tbase functionality","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]