[libcamera-devel,09/16] libcamera/base: Move extended base functionality
diff mbox series

Message ID 20210625013539.625803-10-kieran.bingham@ideasonboard.com
State Accepted
Headers show
Series
  • libcamera-base: A new split on libcamera
Related show

Commit Message

Kieran Bingham June 25, 2021, 1:35 a.m. UTC
Move the functionality for the following components to the new
base support library:

 - BoundMethod
 - EventDispatcher
 - EventDispatcherPoll
 - Log
 - Message
 - Object
 - Signal
 - Semaphore
 - Thread
 - Timer

While it would be preferable to see these split to move one component
per commit, these components are all interdependant upon each other,
which leaves us with one big change performing the move for all of them.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 Documentation/guides/pipeline-handler.rst        |  3 ++-
 include/libcamera/{ => base}/bound_method.h      |  6 +++---
 .../{internal => base}/event_dispatcher.h        |  6 +++---
 .../{internal => base}/event_dispatcher_poll.h   |  8 ++++----
 include/libcamera/{internal => base}/log.h       |  6 +++---
 include/libcamera/base/meson.build               | 10 ++++++++++
 include/libcamera/{internal => base}/message.h   |  8 ++++----
 include/libcamera/{ => base}/object.h            |  8 ++++----
 include/libcamera/{internal => base}/semaphore.h |  8 ++++----
 include/libcamera/{ => base}/signal.h            | 10 +++++-----
 include/libcamera/{internal => base}/thread.h    | 12 +++++-------
 include/libcamera/{internal => base}/timer.h     | 10 +++++-----
 include/libcamera/camera.h                       |  4 ++--
 include/libcamera/camera_manager.h               |  5 ++---
 include/libcamera/internal/camera_sensor.h       |  2 +-
 include/libcamera/internal/device_enumerator.h   |  2 +-
 include/libcamera/internal/event_notifier.h      |  4 ++--
 include/libcamera/internal/ipa_data_serializer.h |  3 ++-
 include/libcamera/internal/ipa_manager.h         |  3 ++-
 include/libcamera/internal/ipa_module.h          |  3 ++-
 include/libcamera/internal/ipc_pipe.h            |  4 ++--
 include/libcamera/internal/ipc_unixsocket.h      |  2 +-
 include/libcamera/internal/media_device.h        |  4 ++--
 include/libcamera/internal/meson.build           |  7 -------
 include/libcamera/internal/pipeline_handler.h    |  2 +-
 include/libcamera/internal/process.h             |  2 +-
 include/libcamera/internal/v4l2_device.h         |  6 +++---
 include/libcamera/internal/v4l2_subdevice.h      |  2 +-
 include/libcamera/internal/v4l2_videodevice.h    |  4 ++--
 include/libcamera/ipa/ipa_interface.h            |  3 ++-
 include/libcamera/meson.build                    |  3 ---
 include/libcamera/request.h                      |  2 +-
 src/android/camera3_hal.cpp                      |  2 +-
 src/android/camera_capabilities.cpp              |  3 ++-
 src/android/camera_device.cpp                    |  9 ++++-----
 src/android/camera_device.h                      |  7 ++++---
 src/android/camera_hal_config.cpp                |  2 +-
 src/android/camera_hal_manager.cpp               |  4 ++--
 src/android/camera_metadata.cpp                  |  2 +-
 src/android/camera_worker.h                      |  6 +++---
 src/android/jpeg/encoder_libjpeg.cpp             |  3 ++-
 src/android/jpeg/exif.cpp                        |  3 +--
 src/android/jpeg/post_processor_jpeg.cpp         |  4 ++--
 src/android/jpeg/thumbnailer.cpp                 |  4 ++--
 src/android/mm/cros_camera_buffer.cpp            |  2 +-
 src/android/mm/generic_camera_buffer.cpp         |  3 ++-
 src/android/yuv/post_processor_yuv.cpp           |  3 ++-
 src/ipa/ipu3/ipu3.cpp                            |  3 ++-
 src/ipa/ipu3/ipu3_agc.cpp                        |  4 ++--
 src/ipa/ipu3/ipu3_awb.cpp                        |  2 +-
 src/ipa/libipa/histogram.cpp                     |  2 +-
 src/ipa/raspberrypi/cam_helper.hpp               |  4 ++--
 src/ipa/raspberrypi/controller/controller.cpp    |  2 +-
 src/ipa/raspberrypi/controller/rpi/agc.cpp       |  2 +-
 src/ipa/raspberrypi/controller/rpi/alsc.cpp      |  2 +-
 src/ipa/raspberrypi/controller/rpi/awb.cpp       |  2 +-
 .../raspberrypi/controller/rpi/black_level.cpp   |  2 +-
 src/ipa/raspberrypi/controller/rpi/ccm.cpp       |  2 +-
 src/ipa/raspberrypi/controller/rpi/contrast.cpp  |  2 +-
 src/ipa/raspberrypi/controller/rpi/dpc.cpp       |  2 +-
 src/ipa/raspberrypi/controller/rpi/focus.cpp     |  2 +-
 src/ipa/raspberrypi/controller/rpi/geq.cpp       |  2 +-
 src/ipa/raspberrypi/controller/rpi/lux.cpp       |  2 +-
 src/ipa/raspberrypi/controller/rpi/noise.cpp     |  2 +-
 src/ipa/raspberrypi/controller/rpi/sdn.cpp       |  2 +-
 src/ipa/raspberrypi/controller/rpi/sharpen.cpp   |  2 +-
 src/ipa/raspberrypi/raspberrypi.cpp              |  7 ++++---
 src/ipa/rkisp1/rkisp1.cpp                        |  4 ++--
 src/ipa/vimc/vimc.cpp                            |  3 ++-
 src/libcamera/{ => base}/bound_method.cpp        | 11 +++++------
 src/libcamera/{ => base}/event_dispatcher.cpp    |  7 +++----
 .../{ => base}/event_dispatcher_poll.cpp         | 10 +++++-----
 src/libcamera/{ => base}/log.cpp                 |  7 +++----
 src/libcamera/base/meson.build                   | 11 +++++++++++
 src/libcamera/{ => base}/message.cpp             |  9 ++++-----
 src/libcamera/{ => base}/object.cpp              | 16 +++++++---------
 src/libcamera/{ => base}/semaphore.cpp           |  6 +++---
 src/libcamera/{ => base}/signal.cpp              |  6 +++---
 src/libcamera/{ => base}/thread.cpp              | 12 ++++++------
 src/libcamera/{ => base}/timer.cpp               | 15 +++++++--------
 src/libcamera/buffer.cpp                         |  2 +-
 src/libcamera/byte_stream_buffer.cpp             |  2 +-
 src/libcamera/camera.cpp                         |  5 +++--
 src/libcamera/camera_manager.cpp                 |  5 +++--
 src/libcamera/camera_sensor_properties.cpp       |  4 ++--
 src/libcamera/control_serializer.cpp             |  3 ++-
 src/libcamera/controls.cpp                       |  2 +-
 src/libcamera/delayed_controls.cpp               |  3 ++-
 src/libcamera/device_enumerator.cpp              |  3 ++-
 src/libcamera/device_enumerator_sysfs.cpp        |  3 ++-
 src/libcamera/device_enumerator_udev.cpp         |  3 ++-
 src/libcamera/event_notifier.cpp                 |  6 +++---
 src/libcamera/file.cpp                           |  2 +-
 src/libcamera/file_descriptor.cpp                |  2 +-
 src/libcamera/formats.cpp                        |  2 +-
 src/libcamera/framebuffer_allocator.cpp          |  3 ++-
 src/libcamera/geometry.cpp                       |  2 +-
 src/libcamera/ipa_data_serializer.cpp            |  2 +-
 src/libcamera/ipa_manager.cpp                    |  2 +-
 src/libcamera/ipa_module.cpp                     |  2 +-
 src/libcamera/ipa_proxy.cpp                      |  2 +-
 src/libcamera/ipc_pipe.cpp                       |  2 +-
 src/libcamera/ipc_pipe_unixsocket.cpp            |  9 +++++----
 src/libcamera/ipc_unixsocket.cpp                 |  3 ++-
 src/libcamera/media_device.cpp                   |  2 +-
 src/libcamera/media_object.cpp                   |  3 ++-
 src/libcamera/meson.build                        | 11 -----------
 src/libcamera/pipeline/ipu3/cio2.h               |  2 +-
 src/libcamera/pipeline/ipu3/frames.h             |  2 +-
 src/libcamera/pipeline/ipu3/imgu.cpp             |  6 +++---
 src/libcamera/pipeline/ipu3/ipu3.cpp             |  6 +++---
 src/libcamera/pipeline/raspberrypi/dma_heaps.cpp |  2 +-
 .../pipeline/raspberrypi/rpi_stream.cpp          |  4 ++--
 src/libcamera/pipeline/rkisp1/rkisp1.cpp         |  6 +++---
 src/libcamera/pipeline/rkisp1/rkisp1_path.h      |  3 ++-
 src/libcamera/pipeline/simple/converter.cpp      |  8 ++++----
 src/libcamera/pipeline/simple/converter.h        |  4 ++--
 src/libcamera/pipeline/simple/simple.cpp         |  3 ++-
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp     |  6 +++---
 src/libcamera/pipeline/vimc/vimc.cpp             |  8 +++++---
 src/libcamera/pipeline_handler.cpp               |  6 +++---
 src/libcamera/process.cpp                        |  2 +-
 src/libcamera/request.cpp                        |  3 ++-
 src/libcamera/stream.cpp                         |  2 +-
 src/libcamera/sysfs.cpp                          |  3 ++-
 src/libcamera/v4l2_device.cpp                    |  2 +-
 src/libcamera/v4l2_pixelformat.cpp               |  3 ++-
 src/libcamera/v4l2_subdevice.cpp                 |  2 +-
 src/libcamera/v4l2_videodevice.cpp               |  3 ++-
 src/v4l2/v4l2_camera.cpp                         |  2 +-
 src/v4l2/v4l2_camera.h                           |  4 ++--
 src/v4l2/v4l2_camera_proxy.cpp                   |  4 ++--
 src/v4l2/v4l2_compat_manager.cpp                 |  7 +++----
 test/camera/buffer_import.cpp                    |  7 ++++---
 test/camera/capture.cpp                          |  6 +++---
 test/event-dispatcher.cpp                        |  6 +++---
 test/event-thread.cpp                            |  5 +++--
 test/event.cpp                                   |  7 ++++---
 test/hotplug-cameras.cpp                         |  7 ++++---
 test/ipa/ipa_interface_test.cpp                  |  7 ++++---
 test/ipc/unixsocket.cpp                          |  7 ++++---
 test/ipc/unixsocket_ipc.cpp                      |  7 +++----
 test/log/log_api.cpp                             |  4 ++--
 test/log/log_process.cpp                         |  8 ++++----
 test/message.cpp                                 |  4 ++--
 test/object-delete.cpp                           |  5 ++---
 test/object-invoke.cpp                           |  7 +++----
 test/object.cpp                                  |  7 +++----
 test/process/process_test.cpp                    |  7 ++++---
 test/serialization/ipa_data_serializer_test.cpp  |  5 +++--
 test/signal-threads.cpp                          |  5 ++---
 test/signal.cpp                                  |  4 ++--
 test/threads.cpp                                 |  2 +-
 test/timer-thread.cpp                            |  6 +++---
 test/timer.cpp                                   |  6 +++---
 test/v4l2_videodevice/buffer_sharing.cpp         |  6 +++---
 test/v4l2_videodevice/capture_async.cpp          |  6 +++---
 test/v4l2_videodevice/v4l2_m2mdevice.cpp         |  7 ++++---
 .../module_ipa_proxy.cpp.tmpl                    |  5 +++--
 .../libcamera_templates/module_ipa_proxy.h.tmpl  |  3 ++-
 .../module_ipa_proxy_worker.cpp.tmpl             |  7 ++++---
 161 files changed, 384 insertions(+), 358 deletions(-)
 rename include/libcamera/{ => base}/bound_method.h (97%)
 rename include/libcamera/{internal => base}/event_dispatcher.h (79%)
 rename include/libcamera/{internal => base}/event_dispatcher_poll.h (82%)
 rename include/libcamera/{internal => base}/log.h (96%)
 rename include/libcamera/{internal => base}/message.h (87%)
 rename include/libcamera/{ => base}/object.h (89%)
 rename include/libcamera/{internal => base}/semaphore.h (74%)
 rename include/libcamera/{ => base}/signal.h (93%)
 rename include/libcamera/{internal => base}/thread.h (86%)
 rename include/libcamera/{internal => base}/timer.h (81%)
 rename src/libcamera/{ => base}/bound_method.cpp (94%)
 rename src/libcamera/{ => base}/event_dispatcher.cpp (97%)
 rename src/libcamera/{ => base}/event_dispatcher_poll.cpp (97%)
 rename src/libcamera/{ => base}/log.cpp (99%)
 rename src/libcamera/{ => base}/message.cpp (96%)
 rename src/libcamera/{ => base}/object.cpp (97%)
 rename src/libcamera/{ => base}/semaphore.cpp (96%)
 rename src/libcamera/{ => base}/signal.cpp (98%)
 rename src/libcamera/{ => base}/thread.cpp (98%)
 rename src/libcamera/{ => base}/timer.cpp (94%)

Comments

Hirokazu Honda June 25, 2021, 3:44 a.m. UTC | #1
/Hs/i Kieran, thank you for the patch.

On Fri, Jun 25, 2021 at 10:35 AM Kieran Bingham
<kieran.bingham@ideasonboard.com> wrote:
>
> Move the functionality for the following components to the new
> base support library:
>
>  - BoundMethod
>  - EventDispatcher
>  - EventDispatcherPoll
>  - Log
>  - Message
>  - Object
>  - Signal
>  - Semaphore
>  - Thread
>  - Timer
>
> While it would be preferable to see these split to move one component
> per commit, these components are all interdependant upon each other,

s/interdependantinterdependent/
> which leaves us with one big change performing the move for all of them.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Hirokazu Honda <hiroh@chromium.org>

> ---
>  Documentation/guides/pipeline-handler.rst        |  3 ++-
>  include/libcamera/{ => base}/bound_method.h      |  6 +++---
>  .../{internal => base}/event_dispatcher.h        |  6 +++---
>  .../{internal => base}/event_dispatcher_poll.h   |  8 ++++----
>  include/libcamera/{internal => base}/log.h       |  6 +++---
>  include/libcamera/base/meson.build               | 10 ++++++++++
>  include/libcamera/{internal => base}/message.h   |  8 ++++----
>  include/libcamera/{ => base}/object.h            |  8 ++++----
>  include/libcamera/{internal => base}/semaphore.h |  8 ++++----
>  include/libcamera/{ => base}/signal.h            | 10 +++++-----
>  include/libcamera/{internal => base}/thread.h    | 12 +++++-------
>  include/libcamera/{internal => base}/timer.h     | 10 +++++-----
>  include/libcamera/camera.h                       |  4 ++--
>  include/libcamera/camera_manager.h               |  5 ++---
>  include/libcamera/internal/camera_sensor.h       |  2 +-
>  include/libcamera/internal/device_enumerator.h   |  2 +-
>  include/libcamera/internal/event_notifier.h      |  4 ++--
>  include/libcamera/internal/ipa_data_serializer.h |  3 ++-
>  include/libcamera/internal/ipa_manager.h         |  3 ++-
>  include/libcamera/internal/ipa_module.h          |  3 ++-
>  include/libcamera/internal/ipc_pipe.h            |  4 ++--
>  include/libcamera/internal/ipc_unixsocket.h      |  2 +-
>  include/libcamera/internal/media_device.h        |  4 ++--
>  include/libcamera/internal/meson.build           |  7 -------
>  include/libcamera/internal/pipeline_handler.h    |  2 +-
>  include/libcamera/internal/process.h             |  2 +-
>  include/libcamera/internal/v4l2_device.h         |  6 +++---
>  include/libcamera/internal/v4l2_subdevice.h      |  2 +-
>  include/libcamera/internal/v4l2_videodevice.h    |  4 ++--
>  include/libcamera/ipa/ipa_interface.h            |  3 ++-
>  include/libcamera/meson.build                    |  3 ---
>  include/libcamera/request.h                      |  2 +-
>  src/android/camera3_hal.cpp                      |  2 +-
>  src/android/camera_capabilities.cpp              |  3 ++-
>  src/android/camera_device.cpp                    |  9 ++++-----
>  src/android/camera_device.h                      |  7 ++++---
>  src/android/camera_hal_config.cpp                |  2 +-
>  src/android/camera_hal_manager.cpp               |  4 ++--
>  src/android/camera_metadata.cpp                  |  2 +-
>  src/android/camera_worker.h                      |  6 +++---
>  src/android/jpeg/encoder_libjpeg.cpp             |  3 ++-
>  src/android/jpeg/exif.cpp                        |  3 +--
>  src/android/jpeg/post_processor_jpeg.cpp         |  4 ++--
>  src/android/jpeg/thumbnailer.cpp                 |  4 ++--
>  src/android/mm/cros_camera_buffer.cpp            |  2 +-
>  src/android/mm/generic_camera_buffer.cpp         |  3 ++-
>  src/android/yuv/post_processor_yuv.cpp           |  3 ++-
>  src/ipa/ipu3/ipu3.cpp                            |  3 ++-
>  src/ipa/ipu3/ipu3_agc.cpp                        |  4 ++--
>  src/ipa/ipu3/ipu3_awb.cpp                        |  2 +-
>  src/ipa/libipa/histogram.cpp                     |  2 +-
>  src/ipa/raspberrypi/cam_helper.hpp               |  4 ++--
>  src/ipa/raspberrypi/controller/controller.cpp    |  2 +-
>  src/ipa/raspberrypi/controller/rpi/agc.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/alsc.cpp      |  2 +-
>  src/ipa/raspberrypi/controller/rpi/awb.cpp       |  2 +-
>  .../raspberrypi/controller/rpi/black_level.cpp   |  2 +-
>  src/ipa/raspberrypi/controller/rpi/ccm.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/contrast.cpp  |  2 +-
>  src/ipa/raspberrypi/controller/rpi/dpc.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/focus.cpp     |  2 +-
>  src/ipa/raspberrypi/controller/rpi/geq.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/lux.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/noise.cpp     |  2 +-
>  src/ipa/raspberrypi/controller/rpi/sdn.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/sharpen.cpp   |  2 +-
>  src/ipa/raspberrypi/raspberrypi.cpp              |  7 ++++---
>  src/ipa/rkisp1/rkisp1.cpp                        |  4 ++--
>  src/ipa/vimc/vimc.cpp                            |  3 ++-
>  src/libcamera/{ => base}/bound_method.cpp        | 11 +++++------
>  src/libcamera/{ => base}/event_dispatcher.cpp    |  7 +++----
>  .../{ => base}/event_dispatcher_poll.cpp         | 10 +++++-----
>  src/libcamera/{ => base}/log.cpp                 |  7 +++----
>  src/libcamera/base/meson.build                   | 11 +++++++++++
>  src/libcamera/{ => base}/message.cpp             |  9 ++++-----
>  src/libcamera/{ => base}/object.cpp              | 16 +++++++---------
>  src/libcamera/{ => base}/semaphore.cpp           |  6 +++---
>  src/libcamera/{ => base}/signal.cpp              |  6 +++---
>  src/libcamera/{ => base}/thread.cpp              | 12 ++++++------
>  src/libcamera/{ => base}/timer.cpp               | 15 +++++++--------
>  src/libcamera/buffer.cpp                         |  2 +-
>  src/libcamera/byte_stream_buffer.cpp             |  2 +-
>  src/libcamera/camera.cpp                         |  5 +++--
>  src/libcamera/camera_manager.cpp                 |  5 +++--
>  src/libcamera/camera_sensor_properties.cpp       |  4 ++--
>  src/libcamera/control_serializer.cpp             |  3 ++-
>  src/libcamera/controls.cpp                       |  2 +-
>  src/libcamera/delayed_controls.cpp               |  3 ++-
>  src/libcamera/device_enumerator.cpp              |  3 ++-
>  src/libcamera/device_enumerator_sysfs.cpp        |  3 ++-
>  src/libcamera/device_enumerator_udev.cpp         |  3 ++-
>  src/libcamera/event_notifier.cpp                 |  6 +++---
>  src/libcamera/file.cpp                           |  2 +-
>  src/libcamera/file_descriptor.cpp                |  2 +-
>  src/libcamera/formats.cpp                        |  2 +-
>  src/libcamera/framebuffer_allocator.cpp          |  3 ++-
>  src/libcamera/geometry.cpp                       |  2 +-
>  src/libcamera/ipa_data_serializer.cpp            |  2 +-
>  src/libcamera/ipa_manager.cpp                    |  2 +-
>  src/libcamera/ipa_module.cpp                     |  2 +-
>  src/libcamera/ipa_proxy.cpp                      |  2 +-
>  src/libcamera/ipc_pipe.cpp                       |  2 +-
>  src/libcamera/ipc_pipe_unixsocket.cpp            |  9 +++++----
>  src/libcamera/ipc_unixsocket.cpp                 |  3 ++-
>  src/libcamera/media_device.cpp                   |  2 +-
>  src/libcamera/media_object.cpp                   |  3 ++-
>  src/libcamera/meson.build                        | 11 -----------
>  src/libcamera/pipeline/ipu3/cio2.h               |  2 +-
>  src/libcamera/pipeline/ipu3/frames.h             |  2 +-
>  src/libcamera/pipeline/ipu3/imgu.cpp             |  6 +++---
>  src/libcamera/pipeline/ipu3/ipu3.cpp             |  6 +++---
>  src/libcamera/pipeline/raspberrypi/dma_heaps.cpp |  2 +-
>  .../pipeline/raspberrypi/rpi_stream.cpp          |  4 ++--
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp         |  6 +++---
>  src/libcamera/pipeline/rkisp1/rkisp1_path.h      |  3 ++-
>  src/libcamera/pipeline/simple/converter.cpp      |  8 ++++----
>  src/libcamera/pipeline/simple/converter.h        |  4 ++--
>  src/libcamera/pipeline/simple/simple.cpp         |  3 ++-
>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp     |  6 +++---
>  src/libcamera/pipeline/vimc/vimc.cpp             |  8 +++++---
>  src/libcamera/pipeline_handler.cpp               |  6 +++---
>  src/libcamera/process.cpp                        |  2 +-
>  src/libcamera/request.cpp                        |  3 ++-
>  src/libcamera/stream.cpp                         |  2 +-
>  src/libcamera/sysfs.cpp                          |  3 ++-
>  src/libcamera/v4l2_device.cpp                    |  2 +-
>  src/libcamera/v4l2_pixelformat.cpp               |  3 ++-
>  src/libcamera/v4l2_subdevice.cpp                 |  2 +-
>  src/libcamera/v4l2_videodevice.cpp               |  3 ++-
>  src/v4l2/v4l2_camera.cpp                         |  2 +-
>  src/v4l2/v4l2_camera.h                           |  4 ++--
>  src/v4l2/v4l2_camera_proxy.cpp                   |  4 ++--
>  src/v4l2/v4l2_compat_manager.cpp                 |  7 +++----
>  test/camera/buffer_import.cpp                    |  7 ++++---
>  test/camera/capture.cpp                          |  6 +++---
>  test/event-dispatcher.cpp                        |  6 +++---
>  test/event-thread.cpp                            |  5 +++--
>  test/event.cpp                                   |  7 ++++---
>  test/hotplug-cameras.cpp                         |  7 ++++---
>  test/ipa/ipa_interface_test.cpp                  |  7 ++++---
>  test/ipc/unixsocket.cpp                          |  7 ++++---
>  test/ipc/unixsocket_ipc.cpp                      |  7 +++----
>  test/log/log_api.cpp                             |  4 ++--
>  test/log/log_process.cpp                         |  8 ++++----
>  test/message.cpp                                 |  4 ++--
>  test/object-delete.cpp                           |  5 ++---
>  test/object-invoke.cpp                           |  7 +++----
>  test/object.cpp                                  |  7 +++----
>  test/process/process_test.cpp                    |  7 ++++---
>  test/serialization/ipa_data_serializer_test.cpp  |  5 +++--
>  test/signal-threads.cpp                          |  5 ++---
>  test/signal.cpp                                  |  4 ++--
>  test/threads.cpp                                 |  2 +-
>  test/timer-thread.cpp                            |  6 +++---
>  test/timer.cpp                                   |  6 +++---
>  test/v4l2_videodevice/buffer_sharing.cpp         |  6 +++---
>  test/v4l2_videodevice/capture_async.cpp          |  6 +++---
>  test/v4l2_videodevice/v4l2_m2mdevice.cpp         |  7 ++++---
>  .../module_ipa_proxy.cpp.tmpl                    |  5 +++--
>  .../libcamera_templates/module_ipa_proxy.h.tmpl  |  3 ++-
>  .../module_ipa_proxy_worker.cpp.tmpl             |  7 ++++---
>  161 files changed, 384 insertions(+), 358 deletions(-)
>  rename include/libcamera/{ => base}/bound_method.h (97%)
>  rename include/libcamera/{internal => base}/event_dispatcher.h (79%)
>  rename include/libcamera/{internal => base}/event_dispatcher_poll.h (82%)
>  rename include/libcamera/{internal => base}/log.h (96%)
>  rename include/libcamera/{internal => base}/message.h (87%)
>  rename include/libcamera/{ => base}/object.h (89%)
>  rename include/libcamera/{internal => base}/semaphore.h (74%)
>  rename include/libcamera/{ => base}/signal.h (93%)
>  rename include/libcamera/{internal => base}/thread.h (86%)
>  rename include/libcamera/{internal => base}/timer.h (81%)
>  rename src/libcamera/{ => base}/bound_method.cpp (94%)
>  rename src/libcamera/{ => base}/event_dispatcher.cpp (97%)
>  rename src/libcamera/{ => base}/event_dispatcher_poll.cpp (97%)
>  rename src/libcamera/{ => base}/log.cpp (99%)
>  rename src/libcamera/{ => base}/message.cpp (96%)
>  rename src/libcamera/{ => base}/object.cpp (97%)
>  rename src/libcamera/{ => base}/semaphore.cpp (96%)
>  rename src/libcamera/{ => base}/signal.cpp (98%)
>  rename src/libcamera/{ => base}/thread.cpp (98%)
>  rename src/libcamera/{ => base}/timer.cpp (94%)
>
> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
> index 3047e006e5b6..152776935a33 100644
> --- a/Documentation/guides/pipeline-handler.rst
> +++ b/Documentation/guides/pipeline-handler.rst
> @@ -288,7 +288,8 @@ features:
>
>  .. code-block:: cpp
>
> -   #include "libcamera/internal/log.h"
> +   #include <libcamera/base/log.h>
> +
>     #include "libcamera/internal/pipeline_handler.h"
>
>  Run the following commands:
> diff --git a/include/libcamera/bound_method.h b/include/libcamera/base/bound_method.h
> similarity index 97%
> rename from include/libcamera/bound_method.h
> rename to include/libcamera/base/bound_method.h
> index 4fc445ecd191..282f9b58ab60 100644
> --- a/include/libcamera/bound_method.h
> +++ b/include/libcamera/base/bound_method.h
> @@ -4,8 +4,8 @@
>   *
>   * bound_method.h - Method bind and invocation
>   */
> -#ifndef __LIBCAMERA_BOUND_METHOD_H__
> -#define __LIBCAMERA_BOUND_METHOD_H__
> +#ifndef __LIBCAMERA_BASE_BOUND_METHOD_H__
> +#define __LIBCAMERA_BASE_BOUND_METHOD_H__
>
>  #include <memory>
>  #include <tuple>
> @@ -236,4 +236,4 @@ private:
>
>  } /* namespace libcamera */
>
> -#endif /* __LIBCAMERA_BOUND_METHOD_H__ */
> +#endif /* __LIBCAMERA_BASE_BOUND_METHOD_H__ */
> diff --git a/include/libcamera/internal/event_dispatcher.h b/include/libcamera/base/event_dispatcher.h
> similarity index 79%
> rename from include/libcamera/internal/event_dispatcher.h
> rename to include/libcamera/base/event_dispatcher.h
> index e6a8ad65ce0a..045df27fff16 100644
> --- a/include/libcamera/internal/event_dispatcher.h
> +++ b/include/libcamera/base/event_dispatcher.h
> @@ -4,8 +4,8 @@
>   *
>   * event_dispatcher.h - Event dispatcher
>   */
> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__
> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__
> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_H__
> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_H__
>
>  #include <vector>
>
> @@ -32,4 +32,4 @@ public:
>
>  } /* namespace libcamera */
>
> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__ */
> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_H__ */
> diff --git a/include/libcamera/internal/event_dispatcher_poll.h b/include/libcamera/base/event_dispatcher_poll.h
> similarity index 82%
> rename from include/libcamera/internal/event_dispatcher_poll.h
> rename to include/libcamera/base/event_dispatcher_poll.h
> index 33de051de261..ae2a3f04e4b9 100644
> --- a/include/libcamera/internal/event_dispatcher_poll.h
> +++ b/include/libcamera/base/event_dispatcher_poll.h
> @@ -4,14 +4,14 @@
>   *
>   * event_dispatcher_poll.h - Poll-based event dispatcher
>   */
> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__
> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__
> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__
> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__
>
>  #include <list>
>  #include <map>
>  #include <vector>
>
> -#include "libcamera/internal/event_dispatcher.h"
> +#include <libcamera/base/event_dispatcher.h>
>
>  struct pollfd;
>
> @@ -55,4 +55,4 @@ private:
>
>  } /* namespace libcamera */
>
> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__ */
> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__ */
> diff --git a/include/libcamera/internal/log.h b/include/libcamera/base/log.h
> similarity index 96%
> rename from include/libcamera/internal/log.h
> rename to include/libcamera/base/log.h
> index 82e55a623e04..b93c947ae7db 100644
> --- a/include/libcamera/internal/log.h
> +++ b/include/libcamera/base/log.h
> @@ -4,8 +4,8 @@
>   *
>   * log.h - Logging infrastructure
>   */
> -#ifndef __LIBCAMERA_INTERNAL_LOG_H__
> -#define __LIBCAMERA_INTERNAL_LOG_H__
> +#ifndef __LIBCAMERA_BASE_LOG_H__
> +#define __LIBCAMERA_BASE_LOG_H__
>
>  #include <chrono>
>  #include <sstream>
> @@ -127,4 +127,4 @@ LogMessage _log(const LogCategory *category, LogSeverity severity,
>
>  } /* namespace libcamera */
>
> -#endif /* __LIBCAMERA_INTERNAL_LOG_H__ */
> +#endif /* __LIBCAMERA_BASE_LOG_H__ */
> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
> index 2db756c504c9..7a858dcb6f1a 100644
> --- a/include/libcamera/base/meson.build
> +++ b/include/libcamera/base/meson.build
> @@ -3,7 +3,17 @@
>  libcamera_base_include_dir = libcamera_include_dir / 'base'
>
>  libcamera_base_headers = files([
> +    'bound_method.h',
>      'class.h',
> +    'event_dispatcher.h',
> +    'event_dispatcher_poll.h',
> +    'log.h',
> +    'message.h',
> +    'object.h',
> +    'semaphore.h',
> +    'signal.h',
> +    'thread.h',
> +    'timer.h',
>      'utils.h',
>  ])
>
> diff --git a/include/libcamera/internal/message.h b/include/libcamera/base/message.h
> similarity index 87%
> rename from include/libcamera/internal/message.h
> rename to include/libcamera/base/message.h
> index f1b133bfb2ba..5d2a9f04f0a7 100644
> --- a/include/libcamera/internal/message.h
> +++ b/include/libcamera/base/message.h
> @@ -4,12 +4,12 @@
>   *
>   * message.h - Message queue support
>   */
> -#ifndef __LIBCAMERA_INTERNAL_MESSAGE_H__
> -#define __LIBCAMERA_INTERNAL_MESSAGE_H__
> +#ifndef __LIBCAMERA_BASE_MESSAGE_H__
> +#define __LIBCAMERA_BASE_MESSAGE_H__
>
>  #include <atomic>
>
> -#include <libcamera/bound_method.h>
> +#include <libcamera/base/bound_method.h>
>
>  namespace libcamera {
>
> @@ -68,4 +68,4 @@ private:
>
>  } /* namespace libcamera */
>
> -#endif /* __LIBCAMERA_INTERNAL_MESSAGE_H__ */
> +#endif /* __LIBCAMERA_BASE_MESSAGE_H__ */
> diff --git a/include/libcamera/object.h b/include/libcamera/base/object.h
> similarity index 89%
> rename from include/libcamera/object.h
> rename to include/libcamera/base/object.h
> index a1882f05fb77..5c385ab4b140 100644
> --- a/include/libcamera/object.h
> +++ b/include/libcamera/base/object.h
> @@ -4,14 +4,14 @@
>   *
>   * object.h - Base object
>   */
> -#ifndef __LIBCAMERA_OBJECT_H__
> -#define __LIBCAMERA_OBJECT_H__
> +#ifndef __LIBCAMERA_BASE_OBJECT_H__
> +#define __LIBCAMERA_BASE_OBJECT_H__
>
>  #include <list>
>  #include <memory>
>  #include <vector>
>
> -#include <libcamera/bound_method.h>
> +#include <libcamera/base/bound_method.h>
>
>  namespace libcamera {
>
> @@ -68,4 +68,4 @@ private:
>
>  } /* namespace libcamera */
>
> -#endif /* __LIBCAMERA_OBJECT_H__ */
> +#endif /* __LIBCAMERA_BASE_OBJECT_H__ */
> diff --git a/include/libcamera/internal/semaphore.h b/include/libcamera/base/semaphore.h
> similarity index 74%
> rename from include/libcamera/internal/semaphore.h
> rename to include/libcamera/base/semaphore.h
> index 9dc65d299cfd..c8e62e3ee68b 100644
> --- a/include/libcamera/internal/semaphore.h
> +++ b/include/libcamera/base/semaphore.h
> @@ -4,12 +4,12 @@
>   *
>   * semaphore.h - General-purpose counting semaphore
>   */
> -#ifndef __LIBCAMERA_INTERNAL_SEMAPHORE_H__
> -#define __LIBCAMERA_INTERNAL_SEMAPHORE_H__
> +#ifndef __LIBCAMERA_BASE_SEMAPHORE_H__
> +#define __LIBCAMERA_BASE_SEMAPHORE_H__
>
>  #include <condition_variable>
>
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/thread.h>
>
>  namespace libcamera {
>
> @@ -31,4 +31,4 @@ private:
>
>  } /* namespace libcamera */
>
> -#endif /* __LIBCAMERA_INTERNAL_SEMAPHORE_H__ */
> +#endif /* __LIBCAMERA_BASE_SEMAPHORE_H__ */
> diff --git a/include/libcamera/signal.h b/include/libcamera/base/signal.h
> similarity index 93%
> rename from include/libcamera/signal.h
> rename to include/libcamera/base/signal.h
> index 3233529a1275..c2521769a843 100644
> --- a/include/libcamera/signal.h
> +++ b/include/libcamera/base/signal.h
> @@ -4,16 +4,16 @@
>   *
>   * signal.h - Signal & slot implementation
>   */
> -#ifndef __LIBCAMERA_SIGNAL_H__
> -#define __LIBCAMERA_SIGNAL_H__
> +#ifndef __LIBCAMERA_BASE_SIGNAL_H__
> +#define __LIBCAMERA_BASE_SIGNAL_H__
>
>  #include <functional>
>  #include <list>
>  #include <type_traits>
>  #include <vector>
>
> -#include <libcamera/bound_method.h>
> -#include <libcamera/object.h>
> +#include <libcamera/base/bound_method.h>
> +#include <libcamera/base/object.h>
>
>  namespace libcamera {
>
> @@ -129,4 +129,4 @@ public:
>
>  } /* namespace libcamera */
>
> -#endif /* __LIBCAMERA_SIGNAL_H__ */
> +#endif /* __LIBCAMERA_BASE_SIGNAL_H__ */
> diff --git a/include/libcamera/internal/thread.h b/include/libcamera/base/thread.h
> similarity index 86%
> rename from include/libcamera/internal/thread.h
> rename to include/libcamera/base/thread.h
> index 9662e28bb581..2ed18d49c978 100644
> --- a/include/libcamera/internal/thread.h
> +++ b/include/libcamera/base/thread.h
> @@ -4,20 +4,18 @@
>   *
>   * thread.h - Thread support
>   */
> -#ifndef __LIBCAMERA_INTERNAL_THREAD_H__
> -#define __LIBCAMERA_INTERNAL_THREAD_H__
> +#ifndef __LIBCAMERA_BASE_THREAD_H__
> +#define __LIBCAMERA_BASE_THREAD_H__
>
>  #include <memory>
>  #include <mutex>
>  #include <sys/types.h>
>  #include <thread>
>
> -#include <libcamera/signal.h>
> -
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/signal.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/message.h"
> -
>  namespace libcamera {
>
>  class EventDispatcher;
> @@ -75,4 +73,4 @@ private:
>
>  } /* namespace libcamera */
>
> -#endif /* __LIBCAMERA_INTERNAL_THREAD_H__ */
> +#endif /* __LIBCAMERA_BASE_THREAD_H__ */
> diff --git a/include/libcamera/internal/timer.h b/include/libcamera/base/timer.h
> similarity index 81%
> rename from include/libcamera/internal/timer.h
> rename to include/libcamera/base/timer.h
> index 013e93c0b4e6..e79e85f1ef0d 100644
> --- a/include/libcamera/internal/timer.h
> +++ b/include/libcamera/base/timer.h
> @@ -4,14 +4,14 @@
>   *
>   * timer.h - Generic timer
>   */
> -#ifndef __LIBCAMERA_INTERNAL_TIMER_H__
> -#define __LIBCAMERA_INTERNAL_TIMER_H__
> +#ifndef __LIBCAMERA_BASE_TIMER_H__
> +#define __LIBCAMERA_BASE_TIMER_H__
>
>  #include <chrono>
>  #include <stdint.h>
>
> -#include <libcamera/object.h>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/signal.h>
>
>  namespace libcamera {
>
> @@ -46,4 +46,4 @@ private:
>
>  } /* namespace libcamera */
>
> -#endif /* __LIBCAMERA_INTERNAL_TIMER_H__ */
> +#endif /* __LIBCAMERA_BASE_TIMER_H__ */
> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
> index ea0914009c2b..b081907e0cb1 100644
> --- a/include/libcamera/camera.h
> +++ b/include/libcamera/camera.h
> @@ -13,11 +13,11 @@
>  #include <string>
>
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/signal.h>
>
>  #include <libcamera/controls.h>
> -#include <libcamera/object.h>
>  #include <libcamera/request.h>
> -#include <libcamera/signal.h>
>  #include <libcamera/stream.h>
>  #include <libcamera/transform.h>
>
> diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h
> index 5deede035115..744e5a06c78c 100644
> --- a/include/libcamera/camera_manager.h
> +++ b/include/libcamera/camera_manager.h
> @@ -13,9 +13,8 @@
>  #include <vector>
>
>  #include <libcamera/base/class.h>
> -
> -#include <libcamera/object.h>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/signal.h>
>
>  namespace libcamera {
>
> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h
> index 7bc540619721..db12b07ee8cc 100644
> --- a/include/libcamera/internal/camera_sensor.h
> +++ b/include/libcamera/internal/camera_sensor.h
> @@ -12,13 +12,13 @@
>  #include <vector>
>
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/log.h>
>
>  #include <libcamera/controls.h>
>  #include <libcamera/geometry.h>
>  #include <libcamera/ipa/core_ipa_interface.h>
>
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/v4l2_subdevice.h"
>
>  namespace libcamera {
> diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h
> index 707cfe8f309d..222caf75a0db 100644
> --- a/include/libcamera/internal/device_enumerator.h
> +++ b/include/libcamera/internal/device_enumerator.h
> @@ -13,7 +13,7 @@
>
>  #include <linux/media.h>
>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>
>  namespace libcamera {
>
> diff --git a/include/libcamera/internal/event_notifier.h b/include/libcamera/internal/event_notifier.h
> index cc3495c024f0..8a6419f23004 100644
> --- a/include/libcamera/internal/event_notifier.h
> +++ b/include/libcamera/internal/event_notifier.h
> @@ -7,8 +7,8 @@
>  #ifndef __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
>  #define __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
>
> -#include <libcamera/object.h>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/signal.h>
>
>  namespace libcamera {
>
> diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h
> index 70168acc25a5..76325b1d109f 100644
> --- a/include/libcamera/internal/ipa_data_serializer.h
> +++ b/include/libcamera/internal/ipa_data_serializer.h
> @@ -14,6 +14,8 @@
>  #include <type_traits>
>  #include <vector>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/geometry.h>
> @@ -22,7 +24,6 @@
>  #include "libcamera/internal/byte_stream_buffer.h"
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/control_serializer.h"
> -#include "libcamera/internal/log.h"
>
>  namespace libcamera {
>
> diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h
> index e904a2be796b..34224e330da7 100644
> --- a/include/libcamera/internal/ipa_manager.h
> +++ b/include/libcamera/internal/ipa_manager.h
> @@ -10,11 +10,12 @@
>  #include <stdint.h>
>  #include <vector>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/ipa/ipa_interface.h>
>  #include <libcamera/ipa/ipa_module_info.h>
>
>  #include "libcamera/internal/ipa_module.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/pub_key.h"
>
> diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h
> index 19fc58272210..a87f56502b9a 100644
> --- a/include/libcamera/internal/ipa_module.h
> +++ b/include/libcamera/internal/ipa_module.h
> @@ -11,10 +11,11 @@
>  #include <string>
>  #include <vector>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/ipa/ipa_interface.h>
>  #include <libcamera/ipa/ipa_module_info.h>
>
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>
>  namespace libcamera {
> diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h
> index c9a84b78cbe5..e58de3402006 100644
> --- a/include/libcamera/internal/ipc_pipe.h
> +++ b/include/libcamera/internal/ipc_pipe.h
> @@ -9,9 +9,9 @@
>
>  #include <vector>
>
> -#include "libcamera/internal/ipc_unixsocket.h"
> +#include <libcamera/base/signal.h>
>
> -#include <libcamera/signal.h>
> +#include "libcamera/internal/ipc_unixsocket.h"
>
>  namespace libcamera {
>
> diff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h
> index e871b65036bd..9f5b06773ced 100644
> --- a/include/libcamera/internal/ipc_unixsocket.h
> +++ b/include/libcamera/internal/ipc_unixsocket.h
> @@ -12,7 +12,7 @@
>  #include <sys/types.h>
>  #include <vector>
>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>
>  namespace libcamera {
>
> diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h
> index c3292508c87b..8424611d7eda 100644
> --- a/include/libcamera/internal/media_device.h
> +++ b/include/libcamera/internal/media_device.h
> @@ -14,9 +14,9 @@
>
>  #include <linux/media.h>
>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
>
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_object.h"
>
>  namespace libcamera {
> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build
> index c84f9822ef6e..64f50373a7fb 100644
> --- a/include/libcamera/internal/meson.build
> +++ b/include/libcamera/internal/meson.build
> @@ -22,8 +22,6 @@ libcamera_internal_headers = files([
>      'device_enumerator.h',
>      'device_enumerator_sysfs.h',
>      'device_enumerator_udev.h',
> -    'event_dispatcher.h',
> -    'event_dispatcher_poll.h',
>      'event_notifier.h',
>      'file.h',
>      'formats.h',
> @@ -31,18 +29,13 @@ libcamera_internal_headers = files([
>      'ipa_module.h',
>      'ipa_proxy.h',
>      'ipc_unixsocket.h',
> -    'log.h',
>      'media_device.h',
>      'media_object.h',
> -    'message.h',
>      'pipeline_handler.h',
>      'process.h',
>      'pub_key.h',
> -    'semaphore.h',
>      'source-paths.h',
>      'sysfs.h',
> -    'thread.h',
> -    'timer.h',
>      'v4l2_device.h',
>      'v4l2_pixelformat.h',
>      'v4l2_subdevice.h',
> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
> index 8beb6b76dd3f..9e2d65d6f2c5 100644
> --- a/include/libcamera/internal/pipeline_handler.h
> +++ b/include/libcamera/internal/pipeline_handler.h
> @@ -16,9 +16,9 @@
>  #include <vector>
>
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/object.h>
>
>  #include <libcamera/controls.h>
> -#include <libcamera/object.h>
>  #include <libcamera/stream.h>
>
>  #include "libcamera/internal/ipa_proxy.h"
> diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
> index 254cda8535ae..c4d5d9c1c009 100644
> --- a/include/libcamera/internal/process.h
> +++ b/include/libcamera/internal/process.h
> @@ -11,7 +11,7 @@
>  #include <string>
>  #include <vector>
>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>
>  namespace libcamera {
>
> diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h
> index c318e976ad8e..1edd664a9aef 100644
> --- a/include/libcamera/internal/v4l2_device.h
> +++ b/include/libcamera/internal/v4l2_device.h
> @@ -13,12 +13,12 @@
>
>  #include <linux/videodev2.h>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
> +
>  #include <libcamera/controls.h>
> -#include <libcamera/signal.h>
>  #include <libcamera/span.h>
>
> -#include "libcamera/internal/log.h"
> -
>  namespace libcamera {
>
>  class EventNotifier;
> diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h
> index d07dd6b444d0..97b89fb95087 100644
> --- a/include/libcamera/internal/v4l2_subdevice.h
> +++ b/include/libcamera/internal/v4l2_subdevice.h
> @@ -12,11 +12,11 @@
>  #include <vector>
>
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/log.h>
>
>  #include <libcamera/geometry.h>
>
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_object.h"
>  #include "libcamera/internal/v4l2_device.h"
>
> diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
> index 227d015e8937..a7c3d5290d92 100644
> --- a/include/libcamera/internal/v4l2_videodevice.h
> +++ b/include/libcamera/internal/v4l2_videodevice.h
> @@ -17,14 +17,14 @@
>  #include <linux/videodev2.h>
>
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
>
>  #include <libcamera/buffer.h>
>  #include <libcamera/geometry.h>
>  #include <libcamera/pixel_format.h>
> -#include <libcamera/signal.h>
>
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/v4l2_device.h"
>  #include "libcamera/internal/v4l2_pixelformat.h"
>
> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
> index 4aefaa7153b1..9a15c86b16e2 100644
> --- a/include/libcamera/ipa/ipa_interface.h
> +++ b/include/libcamera/ipa/ipa_interface.h
> @@ -13,10 +13,11 @@
>  #include <map>
>  #include <vector>
>
> +#include <libcamera/base/signal.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/controls.h>
>  #include <libcamera/geometry.h>
> -#include <libcamera/signal.h>
>
>  namespace libcamera {
>
> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
> index 7cba3de6ca96..d08bb3096aff 100644
> --- a/include/libcamera/meson.build
> +++ b/include/libcamera/meson.build
> @@ -1,7 +1,6 @@
>  # SPDX-License-Identifier: CC0-1.0
>
>  libcamera_public_headers = files([
> -    'bound_method.h',
>      'buffer.h',
>      'camera.h',
>      'camera_manager.h',
> @@ -11,10 +10,8 @@ libcamera_public_headers = files([
>      'framebuffer_allocator.h',
>      'geometry.h',
>      'logging.h',
> -    'object.h',
>      'pixel_format.h',
>      'request.h',
> -    'signal.h',
>      'span.h',
>      'stream.h',
>      'transform.h',
> diff --git a/include/libcamera/request.h b/include/libcamera/request.h
> index 00c646fea7f2..2d361c9d97dc 100644
> --- a/include/libcamera/request.h
> +++ b/include/libcamera/request.h
> @@ -14,9 +14,9 @@
>  #include <unordered_set>
>
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/signal.h>
>
>  #include <libcamera/controls.h>
> -#include <libcamera/signal.h>
>
>  namespace libcamera {
>
> diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp
> index e6d435e0501f..da836baec903 100644
> --- a/src/android/camera3_hal.cpp
> +++ b/src/android/camera3_hal.cpp
> @@ -7,7 +7,7 @@
>
>  #include <hardware/camera_common.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "camera_device.h"
>  #include "camera_hal_manager.h"
> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
> index 00224a6d64b4..6b5edb66fad2 100644
> --- a/src/android/camera_capabilities.cpp
> +++ b/src/android/camera_capabilities.cpp
> @@ -12,12 +12,13 @@
>
>  #include <hardware/camera3.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
>  #include <libcamera/property_ids.h>
>
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>
>  using namespace libcamera;
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 6243c07e231e..86ea22b61467 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -15,16 +15,15 @@
>  #include <unistd.h>
>  #include <vector>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
>  #include <libcamera/formats.h>
>  #include <libcamera/property_ids.h>
>
> -#include <libcamera/base/utils.h>
> -
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/thread.h"
> -
>  #include "system/graphics.h"
>
>  using namespace libcamera;
> diff --git a/src/android/camera_device.h b/src/android/camera_device.h
> index 090fe28a551e..4747f577a3e4 100644
> --- a/src/android/camera_device.h
> +++ b/src/android/camera_device.h
> @@ -14,15 +14,16 @@
>
>  #include <hardware/camera3.h>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/thread.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>
>  #include "libcamera/internal/buffer.h"
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
>
>  #include "camera_capabilities.h"
>  #include "camera_metadata.h"
> diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp
> index f33ba26935da..d84de4fd6f90 100644
> --- a/src/android/camera_hal_config.cpp
> +++ b/src/android/camera_hal_config.cpp
> @@ -21,7 +21,7 @@ namespace filesystem = std::experimental::filesystem;
>
>  #include <hardware/camera3.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  using namespace libcamera;
>
> diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
> index 54087d3a2e45..4cd67544f0df 100644
> --- a/src/android/camera_hal_manager.cpp
> +++ b/src/android/camera_hal_manager.cpp
> @@ -7,11 +7,11 @@
>
>  #include "camera_hal_manager.h"
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/property_ids.h>
>
> -#include "libcamera/internal/log.h"
> -
>  #include "camera_device.h"
>
>  using namespace libcamera;
> diff --git a/src/android/camera_metadata.cpp b/src/android/camera_metadata.cpp
> index c7298d620668..3fc7cf273650 100644
> --- a/src/android/camera_metadata.cpp
> +++ b/src/android/camera_metadata.cpp
> @@ -7,7 +7,7 @@
>
>  #include "camera_metadata.h"
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  using namespace libcamera;
>
> diff --git a/src/android/camera_worker.h b/src/android/camera_worker.h
> index e289ef9b8655..6e1aee4a3247 100644
> --- a/src/android/camera_worker.h
> +++ b/src/android/camera_worker.h
> @@ -9,14 +9,14 @@
>
>  #include <memory>
>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/thread.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
> -#include <libcamera/object.h>
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>
> -#include "libcamera/internal/thread.h"
> -
>  class CameraDevice;
>
>  class CaptureRequest
> diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp
> index f006e1d1999a..e6358ca9466f 100644
> --- a/src/android/jpeg/encoder_libjpeg.cpp
> +++ b/src/android/jpeg/encoder_libjpeg.cpp
> @@ -16,12 +16,13 @@
>  #include <unistd.h>
>  #include <vector>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/formats.h>
>  #include <libcamera/pixel_format.h>
>
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>
>  using namespace libcamera;
>
> diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp
> index 747f1cfaa8ac..0ba4cb85ffd0 100644
> --- a/src/android/jpeg/exif.cpp
> +++ b/src/android/jpeg/exif.cpp
> @@ -14,10 +14,9 @@
>  #include <tuple>
>  #include <uchar.h>
>
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/log.h"
> -
>  using namespace libcamera;
>
>  LOG_DEFINE_CATEGORY(EXIF)
> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp
> index 058ccc998c6f..0e93f365d6db 100644
> --- a/src/android/jpeg/post_processor_jpeg.cpp
> +++ b/src/android/jpeg/post_processor_jpeg.cpp
> @@ -14,9 +14,9 @@
>  #include "encoder_libjpeg.h"
>  #include "exif.h"
>
> -#include <libcamera/formats.h>
> +#include <libcamera/base/log.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/formats.h>
>
>  using namespace libcamera;
>  using namespace std::chrono_literals;
> diff --git a/src/android/jpeg/thumbnailer.cpp b/src/android/jpeg/thumbnailer.cpp
> index f709d3435d9c..5cb00744a688 100644
> --- a/src/android/jpeg/thumbnailer.cpp
> +++ b/src/android/jpeg/thumbnailer.cpp
> @@ -7,9 +7,9 @@
>
>  #include "thumbnailer.h"
>
> -#include <libcamera/formats.h>
> +#include <libcamera/base/log.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/formats.h>
>
>  using namespace libcamera;
>
> diff --git a/src/android/mm/cros_camera_buffer.cpp b/src/android/mm/cros_camera_buffer.cpp
> index 59e26d1b5972..3cfa39a1714d 100644
> --- a/src/android/mm/cros_camera_buffer.cpp
> +++ b/src/android/mm/cros_camera_buffer.cpp
> @@ -7,7 +7,7 @@
>
>  #include "../camera_buffer.h"
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "cros-camera/camera_buffer_manager.h"
>
> diff --git a/src/android/mm/generic_camera_buffer.cpp b/src/android/mm/generic_camera_buffer.cpp
> index cca88cf3632f..326fdc066499 100644
> --- a/src/android/mm/generic_camera_buffer.cpp
> +++ b/src/android/mm/generic_camera_buffer.cpp
> @@ -9,8 +9,9 @@
>
>  #include <unistd.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/buffer.h"
> -#include "libcamera/internal/log.h"
>
>  using namespace libcamera;
>
> diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp
> index b67364c8f147..772e805b32cc 100644
> --- a/src/android/yuv/post_processor_yuv.cpp
> +++ b/src/android/yuv/post_processor_yuv.cpp
> @@ -9,12 +9,13 @@
>
>  #include <libyuv/scale.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/formats.h>
>  #include <libcamera/geometry.h>
>  #include <libcamera/pixel_format.h>
>
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>
>  using namespace libcamera;
>
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index 8b4c7351e9db..31a3c006a6eb 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -11,6 +11,8 @@
>  #include <linux/intel-ipu3.h>
>  #include <linux/v4l2-controls.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/ipa/ipa_interface.h>
> @@ -19,7 +21,6 @@
>  #include <libcamera/request.h>
>
>  #include "libcamera/internal/buffer.h"
> -#include "libcamera/internal/log.h"
>
>  #include "ipu3_agc.h"
>  #include "ipu3_awb.h"
> diff --git a/src/ipa/ipu3/ipu3_agc.cpp b/src/ipa/ipu3/ipu3_agc.cpp
> index c476a60d4cb8..fd0b70f02d25 100644
> --- a/src/ipa/ipu3/ipu3_agc.cpp
> +++ b/src/ipa/ipu3/ipu3_agc.cpp
> @@ -11,9 +11,9 @@
>  #include <cmath>
>  #include <numeric>
>
> -#include <libcamera/ipa/core_ipa_interface.h>
> +#include <libcamera/base/log.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/ipa/core_ipa_interface.h>
>
>  #include "libipa/histogram.h"
>
> diff --git a/src/ipa/ipu3/ipu3_awb.cpp b/src/ipa/ipu3/ipu3_awb.cpp
> index 54ce8e67124e..9b409c8ffad9 100644
> --- a/src/ipa/ipu3/ipu3_awb.cpp
> +++ b/src/ipa/ipu3/ipu3_awb.cpp
> @@ -10,7 +10,7 @@
>  #include <numeric>
>  #include <unordered_map>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  namespace libcamera {
>
> diff --git a/src/ipa/libipa/histogram.cpp b/src/ipa/libipa/histogram.cpp
> index d4d7cfdffa84..fb1eb2a2f0b1 100644
> --- a/src/ipa/libipa/histogram.cpp
> +++ b/src/ipa/libipa/histogram.cpp
> @@ -8,7 +8,7 @@
>
>  #include <cmath>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  /**
>   * \file histogram.h
> diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp
> index 221898ceb40d..a66648197140 100644
> --- a/src/ipa/raspberrypi/cam_helper.hpp
> +++ b/src/ipa/raspberrypi/cam_helper.hpp
> @@ -10,13 +10,13 @@
>
>  #include <libcamera/span.h>
>
> +#include <libcamera/base/utils.h>
> +
>  #include "camera_mode.h"
>  #include "controller/controller.hpp"
>  #include "controller/metadata.hpp"
>  #include "md_parser.hpp"
>
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/v4l2_videodevice.h"
>
>  namespace RPiController {
> diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp
> index 96b58359a9e5..d3433ad2e7e8 100644
> --- a/src/ipa/raspberrypi/controller/controller.cpp
> +++ b/src/ipa/raspberrypi/controller/controller.cpp
> @@ -5,7 +5,7 @@
>   * controller.cpp - ISP controller
>   */
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "algorithm.hpp"
>  #include "controller.hpp"
> diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp
> index 55e80ac74ae1..1ed578cfdbb6 100644
> --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp
> @@ -9,7 +9,7 @@
>
>  #include "linux/bcm2835-isp.h"
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../awb_status.h"
>  #include "../device_status.h"
> diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
> index b0d24aa2ef44..3cdc95a99949 100644
> --- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
> @@ -6,7 +6,7 @@
>   */
>  #include <math.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../awb_status.h"
>  #include "alsc.hpp"
> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp
> index 1c917e4f3408..5cfd33a384e7 100644
> --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp
> @@ -5,7 +5,7 @@
>   * awb.cpp - AWB control algorithm
>   */
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../lux_status.h"
>
> diff --git a/src/ipa/raspberrypi/controller/rpi/black_level.cpp b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
> index 9ac855f50014..6b3497f13c19 100644
> --- a/src/ipa/raspberrypi/controller/rpi/black_level.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
> @@ -8,7 +8,7 @@
>  #include <math.h>
>  #include <stdint.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../black_level_status.h"
>
> diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/raspberrypi/controller/rpi/ccm.cpp
> index dbdcbb39dd12..821a4c7c98c5 100644
> --- a/src/ipa/raspberrypi/controller/rpi/ccm.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/ccm.cpp
> @@ -5,7 +5,7 @@
>   * ccm.cpp - CCM (colour correction matrix) control algorithm
>   */
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../awb_status.h"
>  #include "../ccm_status.h"
> diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.cpp b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
> index 2bc43027a291..ae55aad56739 100644
> --- a/src/ipa/raspberrypi/controller/rpi/contrast.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
> @@ -6,7 +6,7 @@
>   */
>  #include <stdint.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../contrast_status.h"
>  #include "../histogram.hpp"
> diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp
> index e533cd53e63b..110f50560e76 100644
> --- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp
> @@ -5,7 +5,7 @@
>   * dpc.cpp - DPC (defective pixel correction) control algorithm
>   */
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "dpc.hpp"
>
> diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp
> index bab4406fe3a1..a87ec802b964 100644
> --- a/src/ipa/raspberrypi/controller/rpi/focus.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp
> @@ -6,7 +6,7 @@
>   */
>  #include <stdint.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../focus_status.h"
>  #include "focus.hpp"
> diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp
> index 5eff116cd055..bdceb1f3d3eb 100644
> --- a/src/ipa/raspberrypi/controller/rpi/geq.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp
> @@ -5,7 +5,7 @@
>   * geq.cpp - GEQ (green equalisation) control algorithm
>   */
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../device_status.h"
>  #include "../lux_status.h"
> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp
> index 258e44f4dcce..f58d69397e1c 100644
> --- a/src/ipa/raspberrypi/controller/rpi/lux.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp
> @@ -8,7 +8,7 @@
>
>  #include "linux/bcm2835-isp.h"
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../device_status.h"
>
> diff --git a/src/ipa/raspberrypi/controller/rpi/noise.cpp b/src/ipa/raspberrypi/controller/rpi/noise.cpp
> index 156f750192f8..63cad639f313 100644
> --- a/src/ipa/raspberrypi/controller/rpi/noise.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/noise.cpp
> @@ -7,7 +7,7 @@
>
>  #include <math.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../device_status.h"
>  #include "../noise_status.h"
> diff --git a/src/ipa/raspberrypi/controller/rpi/sdn.cpp b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
> index 959bc7406a01..9384550983e7 100644
> --- a/src/ipa/raspberrypi/controller/rpi/sdn.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
> @@ -5,7 +5,7 @@
>   * sdn.cpp - SDN (spatial denoise) control algorithm
>   */
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../denoise_status.h"
>  #include "../noise_status.h"
> diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
> index 2cd861ca6898..b0c2e00a8ee1 100644
> --- a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
> @@ -7,7 +7,7 @@
>
>  #include <math.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include "../sharpen_status.h"
>
> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
> index 1c1e802a2cdc..a3f014495e80 100644
> --- a/src/ipa/raspberrypi/raspberrypi.cpp
> +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> @@ -13,6 +13,10 @@
>  #include <string.h>
>  #include <sys/mman.h>
>
> +#include <linux/bcm2835-isp.h>
> +
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
> @@ -25,9 +29,6 @@
>  #include <libcamera/span.h>
>
>  #include "libcamera/internal/buffer.h"
> -#include "libcamera/internal/log.h"
> -
> -#include <linux/bcm2835-isp.h>
>
>  #include "agc_algorithm.hpp"
>  #include "agc_status.h"
> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
> index b47ea3240f63..cdfb4d139e41 100644
> --- a/src/ipa/rkisp1/rkisp1.cpp
> +++ b/src/ipa/rkisp1/rkisp1.cpp
> @@ -15,6 +15,8 @@
>  #include <linux/rkisp1-config.h>
>  #include <linux/v4l2-controls.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/ipa/ipa_interface.h>
> @@ -22,8 +24,6 @@
>  #include <libcamera/ipa/rkisp1_ipa_interface.h>
>  #include <libcamera/request.h>
>
> -#include "libcamera/internal/log.h"
> -
>  namespace libcamera {
>
>  LOG_DEFINE_CATEGORY(IPARkISP1)
> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
> index 13681d8833ff..9ffd07f493a1 100644
> --- a/src/ipa/vimc/vimc.cpp
> +++ b/src/ipa/vimc/vimc.cpp
> @@ -17,8 +17,9 @@
>  #include <libcamera/ipa/ipa_interface.h>
>  #include <libcamera/ipa/ipa_module_info.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/file.h"
> -#include "libcamera/internal/log.h"
>
>  namespace libcamera {
>
> diff --git a/src/libcamera/bound_method.cpp b/src/libcamera/base/bound_method.cpp
> similarity index 94%
> rename from src/libcamera/bound_method.cpp
> rename to src/libcamera/base/bound_method.cpp
> index 4965bb5e167b..3ecec51c4b75 100644
> --- a/src/libcamera/bound_method.cpp
> +++ b/src/libcamera/base/bound_method.cpp
> @@ -5,14 +5,13 @@
>   * bound_method.cpp - Method bind and invocation
>   */
>
> -#include <libcamera/bound_method.h>
> -
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/semaphore.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/bound_method.h>
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/semaphore.h>
> +#include <libcamera/base/thread.h>
>
>  /**
> - * \file bound_method.h
> + * \file base/bound_method.h
>   * \brief Method bind and invocation
>   */
>
> diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/base/event_dispatcher.cpp
> similarity index 97%
> rename from src/libcamera/event_dispatcher.cpp
> rename to src/libcamera/base/event_dispatcher.cpp
> index e0ce1eb3cc04..4be89e819832 100644
> --- a/src/libcamera/event_dispatcher.cpp
> +++ b/src/libcamera/base/event_dispatcher.cpp
> @@ -5,12 +5,11 @@
>   * event_dispatcher.cpp - Event dispatcher
>   */
>
> -#include "libcamera/internal/event_dispatcher.h"
> -
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/log.h>
>
>  /**
> - * \file event_dispatcher.h
> + * \file base/event_dispatcher.h
>   */
>
>  namespace libcamera {
> diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp
> similarity index 97%
> rename from src/libcamera/event_dispatcher_poll.cpp
> rename to src/libcamera/base/event_dispatcher_poll.cpp
> index 0b6aee187063..d76ca7fc2c32 100644
> --- a/src/libcamera/event_dispatcher_poll.cpp
> +++ b/src/libcamera/base/event_dispatcher_poll.cpp
> @@ -5,7 +5,7 @@
>   * event_dispatcher_poll.cpp - Poll-based event dispatcher
>   */
>
> -#include "libcamera/internal/event_dispatcher_poll.h"
> +#include <libcamera/base/event_dispatcher_poll.h>
>
>  #include <algorithm>
>  #include <chrono>
> @@ -16,15 +16,15 @@
>  #include <sys/eventfd.h>
>  #include <unistd.h>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  #include <libcamera/base/utils.h>
>
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>
>  /**
> - * \file event_dispatcher_poll.h
> + * \file base/event_dispatcher_poll.h
>   */
>
>  namespace libcamera {
> diff --git a/src/libcamera/log.cpp b/src/libcamera/base/log.cpp
> similarity index 99%
> rename from src/libcamera/log.cpp
> rename to src/libcamera/base/log.cpp
> index 5ff0e9017648..1801ae26a2e3 100644
> --- a/src/libcamera/log.cpp
> +++ b/src/libcamera/base/log.cpp
> @@ -5,7 +5,7 @@
>   * log.cpp - Logging infrastructure
>   */
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  #include <array>
>  #if HAVE_BACKTRACE
> @@ -23,12 +23,11 @@
>
>  #include <libcamera/logging.h>
>
> +#include <libcamera/base/thread.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/thread.h"
> -
>  /**
> - * \file log.h
> + * \file base/log.h
>   * \brief Logging infrastructure
>   *
>   * libcamera includes a logging infrastructure used through the library that
> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
> index 302a288685d3..7a19c67c51b8 100644
> --- a/src/libcamera/base/meson.build
> +++ b/src/libcamera/base/meson.build
> @@ -2,10 +2,21 @@
>
>  libcamera_base_sources = files([
>      'class.cpp',
> +    'bound_method.cpp',
> +    'event_dispatcher.cpp',
> +    'event_dispatcher_poll.cpp',
> +    'log.cpp',
> +    'message.cpp',
> +    'object.cpp',
> +    'semaphore.cpp',
> +    'signal.cpp',
> +    'thread.cpp',
> +    'timer.cpp',
>      'utils.cpp',
>  ])
>
>  libcamera_base_deps = [
> +    dependency('threads'),
>  ]
>
>  libcamera_base_lib = shared_library('libcamera-base',
> diff --git a/src/libcamera/message.cpp b/src/libcamera/base/message.cpp
> similarity index 96%
> rename from src/libcamera/message.cpp
> rename to src/libcamera/base/message.cpp
> index bc985c077a4f..f1d772e43465 100644
> --- a/src/libcamera/message.cpp
> +++ b/src/libcamera/base/message.cpp
> @@ -5,14 +5,13 @@
>   * message.cpp - Message queue support
>   */
>
> -#include "libcamera/internal/message.h"
> +#include <libcamera/base/message.h>
>
> -#include <libcamera/signal.h>
> -
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
>
>  /**
> - * \file message.h
> + * \file base/message.h
>   * \brief Message queue support
>   *
>   * The messaging API enables inter-thread communication through message
> diff --git a/src/libcamera/object.cpp b/src/libcamera/base/object.cpp
> similarity index 97%
> rename from src/libcamera/object.cpp
> rename to src/libcamera/base/object.cpp
> index 51cac64ea313..25410ecd949e 100644
> --- a/src/libcamera/object.cpp
> +++ b/src/libcamera/base/object.cpp
> @@ -5,21 +5,19 @@
>   * object.cpp - Base object
>   */
>
> -#include <libcamera/object.h>
> +#include <libcamera/base/object.h>
>
>  #include <algorithm>
>
> -#include <libcamera/signal.h>
> -
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/semaphore.h>
> +#include <libcamera/base/signal.h>
> +#include <libcamera/base/thread.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/semaphore.h"
> -#include "libcamera/internal/thread.h"
> -
>  /**
> - * \file object.h
> + * \file base/object.h
>   * \brief Base object to support automatic signal disconnection
>   */
>
> diff --git a/src/libcamera/semaphore.cpp b/src/libcamera/base/semaphore.cpp
> similarity index 96%
> rename from src/libcamera/semaphore.cpp
> rename to src/libcamera/base/semaphore.cpp
> index d8988a9189e8..7aedc6a8c48b 100644
> --- a/src/libcamera/semaphore.cpp
> +++ b/src/libcamera/base/semaphore.cpp
> @@ -5,11 +5,11 @@
>   * semaphore.cpp - General-purpose counting semaphore
>   */
>
> -#include "libcamera/internal/semaphore.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/semaphore.h>
> +#include <libcamera/base/thread.h>
>
>  /**
> - * \file semaphore.h
> + * \file base/semaphore.h
>   * \brief General-purpose counting semaphore
>   */
>
> diff --git a/src/libcamera/signal.cpp b/src/libcamera/base/signal.cpp
> similarity index 98%
> rename from src/libcamera/signal.cpp
> rename to src/libcamera/base/signal.cpp
> index 2532df3c3073..298b2d4b3619 100644
> --- a/src/libcamera/signal.cpp
> +++ b/src/libcamera/base/signal.cpp
> @@ -5,12 +5,12 @@
>   * signal.cpp - Signal & slot implementation
>   */
>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/thread.h>
>
>  /**
> - * \file signal.h
> + * \file base/signal.h
>   * \brief Signal & slot implementation
>   */
>
> diff --git a/src/libcamera/thread.cpp b/src/libcamera/base/thread.cpp
> similarity index 98%
> rename from src/libcamera/thread.cpp
> rename to src/libcamera/base/thread.cpp
> index 91e4737ad032..c7c2d6b29d6a 100644
> --- a/src/libcamera/thread.cpp
> +++ b/src/libcamera/base/thread.cpp
> @@ -5,7 +5,7 @@
>   * thread.cpp - Thread support
>   */
>
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/thread.h>
>
>  #include <atomic>
>  #include <condition_variable>
> @@ -14,10 +14,10 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/event_dispatcher_poll.h"
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/message.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/event_dispatcher_poll.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/message.h>
>
>  /**
>   * \page thread Thread Support
> @@ -102,7 +102,7 @@
>   */
>
>  /**
> - * \file thread.h
> + * \file base/thread.h
>   * \brief Thread support
>   */
>
> diff --git a/src/libcamera/timer.cpp b/src/libcamera/base/timer.cpp
> similarity index 94%
> rename from src/libcamera/timer.cpp
> rename to src/libcamera/base/timer.cpp
> index 9496671edffc..9c54352d46bd 100644
> --- a/src/libcamera/timer.cpp
> +++ b/src/libcamera/base/timer.cpp
> @@ -5,21 +5,20 @@
>   * timer.cpp - Generic timer
>   */
>
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/timer.h>
>
>  #include <chrono>
>
> -#include <libcamera/camera_manager.h>
> -
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/thread.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/camera_manager.h>
>
>  /**
> - * \file timer.h
> + * \file base/timer.h
>   * \brief Generic timer
>   */
>
> diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp
> index ca999429dce5..e4c345d518da 100644
> --- a/src/libcamera/buffer.cpp
> +++ b/src/libcamera/buffer.cpp
> @@ -13,7 +13,7 @@
>  #include <sys/mman.h>
>  #include <unistd.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  /**
>   * \file libcamera/buffer.h
> diff --git a/src/libcamera/byte_stream_buffer.cpp b/src/libcamera/byte_stream_buffer.cpp
> index 7fc6f6944471..b67bb928f8c1 100644
> --- a/src/libcamera/byte_stream_buffer.cpp
> +++ b/src/libcamera/byte_stream_buffer.cpp
> @@ -10,7 +10,7 @@
>  #include <stdint.h>
>  #include <string.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  /**
>   * \file byte_stream_buffer.h
> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
> index 1340c266cc5f..de0123aeafca 100644
> --- a/src/libcamera/camera.cpp
> +++ b/src/libcamera/camera.cpp
> @@ -11,13 +11,14 @@
>  #include <atomic>
>  #include <iomanip>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +
>  #include <libcamera/framebuffer_allocator.h>
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
> -#include "libcamera/internal/thread.h"
>
>  /**
>   * \file camera.h
> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp
> index a3784db6e697..fc3bd88c737b 100644
> --- a/src/libcamera/camera_manager.cpp
> +++ b/src/libcamera/camera_manager.cpp
> @@ -14,12 +14,13 @@
>
>  #include <libcamera/base/utils.h>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +
>  #include "libcamera/internal/device_enumerator.h"
>  #include "libcamera/internal/ipa_manager.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
>
>  /**
>   * \file camera_manager.h
> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp
> index fc4ea78d1fc7..7b7279efbba8 100644
> --- a/src/libcamera/camera_sensor_properties.cpp
> +++ b/src/libcamera/camera_sensor_properties.cpp
> @@ -9,9 +9,9 @@
>
>  #include <map>
>
> -#include <libcamera/control_ids.h>
> +#include <libcamera/base/log.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/control_ids.h>
>
>  /**
>   * \file camera_sensor_properties.h
> diff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp
> index 097444130ef7..dd5a26083747 100644
> --- a/src/libcamera/control_serializer.cpp
> +++ b/src/libcamera/control_serializer.cpp
> @@ -11,13 +11,14 @@
>  #include <memory>
>  #include <vector>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
>  #include <libcamera/ipa/ipa_controls.h>
>  #include <libcamera/span.h>
>
>  #include "libcamera/internal/byte_stream_buffer.h"
> -#include "libcamera/internal/log.h"
>
>  /**
>   * \file control_serializer.h
> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
> index 7df372ad3b6c..34317fa0f65d 100644
> --- a/src/libcamera/controls.cpp
> +++ b/src/libcamera/controls.cpp
> @@ -12,10 +12,10 @@
>  #include <string>
>  #include <string.h>
>
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>
>  #include "libcamera/internal/control_validator.h"
> -#include "libcamera/internal/log.h"
>
>  /**
>   * \file controls.h
> diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp
> index 0bf81b510d16..90ce7e0b5b52 100644
> --- a/src/libcamera/delayed_controls.cpp
> +++ b/src/libcamera/delayed_controls.cpp
> @@ -7,9 +7,10 @@
>
>  #include "libcamera/internal/delayed_controls.h"
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/controls.h>
>
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/v4l2_device.h"
>
>  /**
> diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
> index e6ecc360e32f..1f33faf5e7aa 100644
> --- a/src/libcamera/device_enumerator.cpp
> +++ b/src/libcamera/device_enumerator.cpp
> @@ -11,7 +11,8 @@
>
>  #include <string.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/media_device.h"
>
>  /**
> diff --git a/src/libcamera/device_enumerator_sysfs.cpp b/src/libcamera/device_enumerator_sysfs.cpp
> index ff72885288c3..686bb8099485 100644
> --- a/src/libcamera/device_enumerator_sysfs.cpp
> +++ b/src/libcamera/device_enumerator_sysfs.cpp
> @@ -17,7 +17,8 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/media_device.h"
>
>  namespace libcamera {
> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp
> index d26fcf10b3c4..4b842773fcd6 100644
> --- a/src/libcamera/device_enumerator_udev.cpp
> +++ b/src/libcamera/device_enumerator_udev.cpp
> @@ -17,8 +17,9 @@
>  #include <sys/sysmacros.h>
>  #include <unistd.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>
>  namespace libcamera {
> diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp
> index 6b0575c0db77..784016a9f907 100644
> --- a/src/libcamera/event_notifier.cpp
> +++ b/src/libcamera/event_notifier.cpp
> @@ -9,9 +9,9 @@
>
>  #include <libcamera/camera_manager.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/thread.h>
>
>  /**
>   * \file event_notifier.h
> diff --git a/src/libcamera/file.cpp b/src/libcamera/file.cpp
> index bce2b6138239..def0f60d044b 100644
> --- a/src/libcamera/file.cpp
> +++ b/src/libcamera/file.cpp
> @@ -14,7 +14,7 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  /**
>   * \file file.h
> diff --git a/src/libcamera/file_descriptor.cpp b/src/libcamera/file_descriptor.cpp
> index 8b505ed3b6b2..638b3bbe0449 100644
> --- a/src/libcamera/file_descriptor.cpp
> +++ b/src/libcamera/file_descriptor.cpp
> @@ -11,7 +11,7 @@
>  #include <unistd.h>
>  #include <utility>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  /**
>   * \file file_descriptor.h
> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
> index 55822f4cc97b..f5fbaf0b95f9 100644
> --- a/src/libcamera/formats.cpp
> +++ b/src/libcamera/formats.cpp
> @@ -12,7 +12,7 @@
>
>  #include <libcamera/formats.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  /**
>   * \file internal/formats.h
> diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp
> index 2fbba37a1b0b..86a57923286c 100644
> --- a/src/libcamera/framebuffer_allocator.cpp
> +++ b/src/libcamera/framebuffer_allocator.cpp
> @@ -9,11 +9,12 @@
>
>  #include <errno.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/stream.h>
>
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>
>  /**
> diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp
> index 136446895eb6..9bbef0b537f1 100644
> --- a/src/libcamera/geometry.cpp
> +++ b/src/libcamera/geometry.cpp
> @@ -10,7 +10,7 @@
>  #include <sstream>
>  #include <stdint.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  /**
>   * \file geometry.h
> diff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp
> index 131b3bd616fd..fb941e6bcd8a 100644
> --- a/src/libcamera/ipa_data_serializer.cpp
> +++ b/src/libcamera/ipa_data_serializer.cpp
> @@ -7,7 +7,7 @@
>
>  #include "libcamera/internal/ipa_data_serializer.h"
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  /**
>   * \file ipa_data_serializer.h
> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
> index 263cacd64737..35c7259801fa 100644
> --- a/src/libcamera/ipa_manager.cpp
> +++ b/src/libcamera/ipa_manager.cpp
> @@ -12,12 +12,12 @@
>  #include <string.h>
>  #include <sys/types.h>
>
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>
>  #include "libcamera/internal/file.h"
>  #include "libcamera/internal/ipa_module.h"
>  #include "libcamera/internal/ipa_proxy.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>
>  /**
> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp
> index a4e7fb861138..7ab5557916e7 100644
> --- a/src/libcamera/ipa_module.cpp
> +++ b/src/libcamera/ipa_module.cpp
> @@ -23,10 +23,10 @@
>
>  #include <libcamera/span.h>
>
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>
>  #include "libcamera/internal/file.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>
>  /**
> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp
> index ca980ec705a6..babcc48bcfd0 100644
> --- a/src/libcamera/ipa_proxy.cpp
> +++ b/src/libcamera/ipa_proxy.cpp
> @@ -12,10 +12,10 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>
>  #include "libcamera/internal/ipa_module.h"
> -#include "libcamera/internal/log.h"
>
>  /**
>   * \file ipa_proxy.h
> diff --git a/src/libcamera/ipc_pipe.cpp b/src/libcamera/ipc_pipe.cpp
> index c402c8d08699..28e20e031623 100644
> --- a/src/libcamera/ipc_pipe.cpp
> +++ b/src/libcamera/ipc_pipe.cpp
> @@ -7,7 +7,7 @@
>
>  #include "libcamera/internal/ipc_pipe.h"
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  /**
>   * \file ipc_pipe.h
> diff --git a/src/libcamera/ipc_pipe_unixsocket.cpp b/src/libcamera/ipc_pipe_unixsocket.cpp
> index db0e260f22b1..4511775fb467 100644
> --- a/src/libcamera/ipc_pipe_unixsocket.cpp
> +++ b/src/libcamera/ipc_pipe_unixsocket.cpp
> @@ -9,13 +9,14 @@
>
>  #include <vector>
>
> -#include "libcamera/internal/event_dispatcher.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/ipc_pipe.h"
>  #include "libcamera/internal/ipc_unixsocket.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>
>  namespace libcamera {
>
> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp
> index fdb359f7fcd1..1466597077d4 100644
> --- a/src/libcamera/ipc_unixsocket.cpp
> +++ b/src/libcamera/ipc_unixsocket.cpp
> @@ -12,8 +12,9 @@
>  #include <sys/socket.h>
>  #include <unistd.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
>
>  /**
>   * \file ipc_unixsocket.h
> diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp
> index 9ec84e560b77..e12ab1abb10d 100644
> --- a/src/libcamera/media_device.cpp
> +++ b/src/libcamera/media_device.cpp
> @@ -18,7 +18,7 @@
>
>  #include <linux/media.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  /**
>   * \file media_device.h
> diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp
> index 94aeb50402ca..815edc8e3b2d 100644
> --- a/src/libcamera/media_object.cpp
> +++ b/src/libcamera/media_object.cpp
> @@ -15,7 +15,8 @@
>
>  #include <linux/media.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/media_device.h"
>
>  /**
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> index a341004c0c19..86212cec0281 100644
> --- a/src/libcamera/meson.build
> +++ b/src/libcamera/meson.build
> @@ -2,7 +2,6 @@
>
>  libcamera_sources = files([
>      'bayer_format.cpp',
> -    'bound_method.cpp',
>      'buffer.cpp',
>      'byte_stream_buffer.cpp',
>      'camera.cpp',
> @@ -16,8 +15,6 @@ libcamera_sources = files([
>      'delayed_controls.cpp',
>      'device_enumerator.cpp',
>      'device_enumerator_sysfs.cpp',
> -    'event_dispatcher.cpp',
> -    'event_dispatcher_poll.cpp',
>      'event_notifier.cpp',
>      'file.cpp',
>      'file_descriptor.cpp',
> @@ -33,23 +30,16 @@ libcamera_sources = files([
>      'ipc_pipe.cpp',
>      'ipc_pipe_unixsocket.cpp',
>      'ipc_unixsocket.cpp',
> -    'log.cpp',
>      'media_device.cpp',
>      'media_object.cpp',
> -    'message.cpp',
> -    'object.cpp',
>      'pipeline_handler.cpp',
>      'pixel_format.cpp',
>      'process.cpp',
>      'pub_key.cpp',
>      'request.cpp',
> -    'semaphore.cpp',
> -    'signal.cpp',
>      'source-paths.cpp',
>      'stream.cpp',
>      'sysfs.cpp',
> -    'thread.cpp',
> -    'timer.cpp',
>      'transform.cpp',
>      'v4l2_device.cpp',
>      'v4l2_pixelformat.cpp',
> @@ -128,7 +118,6 @@ libcamera_deps = [
>      liblttng,
>      libudev,
>      libcamera_base,
> -    dependency('threads'),
>  ]
>
>  # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.
> diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h
> index d8d4a181ffd1..f28e9f1ddf42 100644
> --- a/src/libcamera/pipeline/ipu3/cio2.h
> +++ b/src/libcamera/pipeline/ipu3/cio2.h
> @@ -11,7 +11,7 @@
>  #include <queue>
>  #include <vector>
>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>
>  #include "libcamera/internal/v4l2_subdevice.h"
>  #include "libcamera/internal/v4l2_videodevice.h"
> diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h
> index 59e64e8170a2..3ef7e4454693 100644
> --- a/src/libcamera/pipeline/ipu3/frames.h
> +++ b/src/libcamera/pipeline/ipu3/frames.h
> @@ -12,7 +12,7 @@
>  #include <queue>
>  #include <vector>
>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>
>  namespace libcamera {
>
> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
> index 32d143a862b2..e955bc3456ba 100644
> --- a/src/libcamera/pipeline/ipu3/imgu.cpp
> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp
> @@ -13,12 +13,12 @@
>
>  #include <linux/media-bus-format.h>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/formats.h>
>  #include <libcamera/stream.h>
>
> -#include <libcamera/base/utils.h>
> -
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>
>  namespace libcamera {
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 6b43ad2fb2b1..76c3bb3d8aa9 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -11,6 +11,9 @@
>  #include <queue>
>  #include <vector>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/formats.h>
> @@ -20,13 +23,10 @@
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/delayed_controls.h"
>  #include "libcamera/internal/device_enumerator.h"
>  #include "libcamera/internal/ipa_manager.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/pipeline_handler.h"
>
> diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
> index 4d5dd6cb87cc..573ea11de607 100644
> --- a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
> @@ -14,7 +14,7 @@
>  #include <sys/ioctl.h>
>  #include <unistd.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  /*
>   * /dev/dma-heap/linux,cma is the dma-heap allocator, which allows dmaheap-cma
> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> index f2430415d32d..b3265d0e8aab 100644
> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> @@ -6,9 +6,9 @@
>   */
>  #include "rpi_stream.h"
>
> -#include <libcamera/ipa/raspberrypi_ipa_interface.h>
> +#include <libcamera/base/log.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/ipa/raspberrypi_ipa_interface.h>
>
>  namespace libcamera {
>
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index c625d7248f5c..00df4f0b3e6b 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -14,6 +14,9 @@
>
>  #include <linux/media-bus-format.h>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
> @@ -24,13 +27,10 @@
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/delayed_controls.h"
>  #include "libcamera/internal/device_enumerator.h"
>  #include "libcamera/internal/ipa_manager.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/v4l2_subdevice.h"
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
> index 3b3e37d258d0..c185ac3992dd 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
> @@ -10,10 +10,11 @@
>  #include <memory>
>  #include <vector>
>
> +#include <libcamera/base/signal.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/geometry.h>
>  #include <libcamera/pixel_format.h>
> -#include <libcamera/signal.h>
>  #include <libcamera/span.h>
>
>  #include "libcamera/internal/media_object.h"
> diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp
> index 589f185b1bf1..9af1096be834 100644
> --- a/src/libcamera/pipeline/simple/converter.cpp
> +++ b/src/libcamera/pipeline/simple/converter.cpp
> @@ -10,14 +10,14 @@
>  #include <algorithm>
>  #include <limits.h>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/geometry.h>
> -#include <libcamera/signal.h>
>  #include <libcamera/stream.h>
>
> -#include <libcamera/base/utils.h>
> -
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/v4l2_videodevice.h"
>
> diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h
> index 480e528d2210..276a2a291c21 100644
> --- a/src/libcamera/pipeline/simple/converter.h
> +++ b/src/libcamera/pipeline/simple/converter.h
> @@ -16,9 +16,9 @@
>  #include <vector>
>
>  #include <libcamera/pixel_format.h>
> -#include <libcamera/signal.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
>
>  namespace libcamera {
>
> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
> index 1894014d8fc7..4d78e6faf403 100644
> --- a/src/libcamera/pipeline/simple/simple.cpp
> +++ b/src/libcamera/pipeline/simple/simple.cpp
> @@ -21,6 +21,8 @@
>
>  #include <linux/media-bus-format.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/request.h>
> @@ -28,7 +30,6 @@
>
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/v4l2_subdevice.h"
> diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> index d8c17dccae53..0f634b8da609 100644
> --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> @@ -12,6 +12,9 @@
>  #include <memory>
>  #include <tuple>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
> @@ -19,10 +22,7 @@
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/sysfs.h"
> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
> index 025ca56205f8..361b715778ef 100644
> --- a/src/libcamera/pipeline/vimc/vimc.cpp
> +++ b/src/libcamera/pipeline/vimc/vimc.cpp
> @@ -14,21 +14,23 @@
>  #include <linux/media-bus-format.h>
>  #include <linux/version.h>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
>  #include <libcamera/formats.h>
>  #include <libcamera/ipa/ipa_interface.h>
>  #include <libcamera/ipa/ipa_module_info.h>
> +#include <libcamera/ipa/vimc_ipa_interface.h>
> +#include <libcamera/ipa/vimc_ipa_proxy.h>
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/device_enumerator.h"
>  #include "libcamera/internal/ipa_manager.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/v4l2_subdevice.h"
> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
> index 6fb2a743c3c2..f626eddd321f 100644
> --- a/src/libcamera/pipeline_handler.cpp
> +++ b/src/libcamera/pipeline_handler.cpp
> @@ -9,14 +9,14 @@
>
>  #include <sys/sysmacros.h>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/camera_manager.h>
>
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/tracepoints.h"
>
> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp
> index 35091f60c1e9..463380299a65 100644
> --- a/src/libcamera/process.cpp
> +++ b/src/libcamera/process.cpp
> @@ -20,10 +20,10 @@
>  #include <unistd.h>
>  #include <vector>
>
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
>
>  /**
>   * \file process.h
> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
> index 6611e74d1800..518384eb8cf6 100644
> --- a/src/libcamera/request.cpp
> +++ b/src/libcamera/request.cpp
> @@ -10,13 +10,14 @@
>  #include <map>
>  #include <sstream>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/stream.h>
>
>  #include "libcamera/internal/camera_controls.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/tracepoints.h"
>
>  /**
> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
> index d5d68427e658..b8626775d224 100644
> --- a/src/libcamera/stream.cpp
> +++ b/src/libcamera/stream.cpp
> @@ -15,9 +15,9 @@
>
>  #include <libcamera/request.h>
>
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/log.h"
>
>  /**
>   * \file stream.h
> diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp
> index e9004b2b59c8..4372b1348178 100644
> --- a/src/libcamera/sysfs.cpp
> +++ b/src/libcamera/sysfs.cpp
> @@ -12,8 +12,9 @@
>  #include <sys/stat.h>
>  #include <sys/sysmacros.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/file.h"
> -#include "libcamera/internal/log.h"
>
>  /**
>   * \file sysfs.h
> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
> index facb53e13169..334b9b78b812 100644
> --- a/src/libcamera/v4l2_device.cpp
> +++ b/src/libcamera/v4l2_device.cpp
> @@ -16,10 +16,10 @@
>  #include <sys/syscall.h>
>  #include <unistd.h>
>
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/sysfs.h"
>
>  /**
> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
> index 166d93cf1d20..87d728fe5577 100644
> --- a/src/libcamera/v4l2_pixelformat.cpp
> +++ b/src/libcamera/v4l2_pixelformat.cpp
> @@ -12,11 +12,12 @@
>  #include <map>
>  #include <string.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/formats.h>
>  #include <libcamera/pixel_format.h>
>
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>
>  /**
>   * \file v4l2_pixelformat.h
> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
> index 2c56cfafbce4..8fe5e45b31ee 100644
> --- a/src/libcamera/v4l2_subdevice.cpp
> +++ b/src/libcamera/v4l2_subdevice.cpp
> @@ -19,9 +19,9 @@
>
>  #include <libcamera/geometry.h>
>
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/media_object.h"
>
> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
> index 12c09dc7578d..dc23510bc5aa 100644
> --- a/src/libcamera/v4l2_videodevice.cpp
> +++ b/src/libcamera/v4l2_videodevice.cpp
> @@ -21,10 +21,11 @@
>
>  #include <linux/version.h>
>
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/file_descriptor.h>
>
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/media_object.h"
>
> diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp
> index 97825c715bba..157ab94e0544 100644
> --- a/src/v4l2/v4l2_camera.cpp
> +++ b/src/v4l2/v4l2_camera.cpp
> @@ -10,7 +10,7 @@
>  #include <errno.h>
>  #include <unistd.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>
>  using namespace libcamera;
>
> diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
> index d238046250e3..dbe0573bd3a4 100644
> --- a/src/v4l2/v4l2_camera.h
> +++ b/src/v4l2/v4l2_camera.h
> @@ -12,13 +12,13 @@
>  #include <mutex>
>  #include <utility>
>
> +#include <libcamera/base/semaphore.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/file_descriptor.h>
>  #include <libcamera/framebuffer_allocator.h>
>
> -#include "libcamera/internal/semaphore.h"
> -
>  using namespace libcamera;
>
>  class V4L2Camera
> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
> index a5a25507462e..7682c4bddf90 100644
> --- a/src/v4l2/v4l2_camera_proxy.cpp
> +++ b/src/v4l2/v4l2_camera_proxy.cpp
> @@ -18,12 +18,12 @@
>
>  #include <libcamera/camera.h>
>  #include <libcamera/formats.h>
> -#include <libcamera/object.h>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/object.h>
>  #include <libcamera/base/utils.h>
>
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>
>  #include "v4l2_camera.h"
>  #include "v4l2_camera_file.h"
> diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp
> index 27de6c50ff4e..e566125a70ac 100644
> --- a/src/v4l2/v4l2_compat_manager.cpp
> +++ b/src/v4l2/v4l2_compat_manager.cpp
> @@ -19,12 +19,11 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>
> -#include <libcamera/camera.h>
> -#include <libcamera/camera_manager.h>
> -
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/camera.h>
> +#include <libcamera/camera_manager.h>
>
>  #include "v4l2_camera_file.h"
>
> diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp
> index 61f4eb92ae95..c504ea09e64b 100644
> --- a/test/camera/buffer_import.cpp
> +++ b/test/camera/buffer_import.cpp
> @@ -12,11 +12,12 @@
>  #include <numeric>
>  #include <vector>
>
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/media_device.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  #include "libcamera/internal/v4l2_videodevice.h"
>
>  #include "buffer_source.h"
> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp
> index c4bc21100777..238d98dbba16 100644
> --- a/test/camera/capture.cpp
> +++ b/test/camera/capture.cpp
> @@ -9,9 +9,9 @@
>
>  #include <libcamera/framebuffer_allocator.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>
>  #include "camera_test.h"
>  #include "test.h"
> diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp
> index 8ae05ac62985..1cc17b045ec0 100644
> --- a/test/event-dispatcher.cpp
> +++ b/test/event-dispatcher.cpp
> @@ -10,9 +10,9 @@
>  #include <signal.h>
>  #include <sys/time.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>
>  #include "test.h"
>
> diff --git a/test/event-thread.cpp b/test/event-thread.cpp
> index aeb8b3bf4bac..05c5d26d3611 100644
> --- a/test/event-thread.cpp
> +++ b/test/event-thread.cpp
> @@ -10,9 +10,10 @@
>  #include <string.h>
>  #include <unistd.h>
>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>
>  #include "test.h"
>
> diff --git a/test/event.cpp b/test/event.cpp
> index 1f16c97bbab5..aa79da99c286 100644
> --- a/test/event.cpp
> +++ b/test/event.cpp
> @@ -9,10 +9,11 @@
>  #include <string.h>
>  #include <unistd.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>
>  #include "test.h"
>
> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp
> index 94cb859352ec..bb160537c5d5 100644
> --- a/test/hotplug-cameras.cpp
> +++ b/test/hotplug-cameras.cpp
> @@ -14,10 +14,11 @@
>  #include <libcamera/camera.h>
>  #include <libcamera/camera_manager.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/file.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>
>  #include "test.h"
>
> diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp
> index d6ca6f5137b0..656d86552d85 100644
> --- a/test/ipa/ipa_interface_test.cpp
> +++ b/test/ipa/ipa_interface_test.cpp
> @@ -14,15 +14,16 @@
>
>  #include <libcamera/ipa/vimc_ipa_proxy.h>
>
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/event_notifier.h"
>  #include "libcamera/internal/ipa_manager.h"
>  #include "libcamera/internal/ipa_module.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>
>  #include "test.h"
>
> diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp
> index 80157b342795..aa35c8f071f1 100644
> --- a/test/ipc/unixsocket.cpp
> +++ b/test/ipc/unixsocket.cpp
> @@ -16,10 +16,11 @@
>  #include <sys/wait.h>
>  #include <unistd.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/ipc_unixsocket.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>
>  #include "test.h"
>
> diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp
> index 161d09b98719..6fe7fd9b8fc5 100644
> --- a/test/ipc/unixsocket_ipc.cpp
> +++ b/test/ipc/unixsocket_ipc.cpp
> @@ -15,19 +15,18 @@
>  #include <sys/wait.h>
>  #include <unistd.h>
>
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/ipa_data_serializer.h"
>  #include "libcamera/internal/ipc_pipe.h"
>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>
>  #include "test.h"
>
> -
>  using namespace std;
>  using namespace libcamera;
>
> diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp
> index ae3c607a6881..5311896095a9 100644
> --- a/test/log/log_api.cpp
> +++ b/test/log/log_api.cpp
> @@ -16,9 +16,9 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>
> -#include <libcamera/logging.h>
> +#include <libcamera/base/log.h>
>
> -#include "libcamera/internal/log.h"
> +#include <libcamera/logging.h>
>
>  #include "test.h"
>
> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp
> index 413d9207ea68..d138aa7ff562 100644
> --- a/test/log/log_process.cpp
> +++ b/test/log/log_process.cpp
> @@ -16,13 +16,13 @@
>
>  #include <libcamera/logging.h>
>
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>
>  #include "test.h"
>
> diff --git a/test/message.cpp b/test/message.cpp
> index 9553ba8cbaed..eeea57feab76 100644
> --- a/test/message.cpp
> +++ b/test/message.cpp
> @@ -9,8 +9,8 @@
>  #include <iostream>
>  #include <thread>
>
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/thread.h>
>
>  #include "test.h"
>
> diff --git a/test/object-delete.cpp b/test/object-delete.cpp
> index a1a6f5ccefd5..eabefe935974 100644
> --- a/test/object-delete.cpp
> +++ b/test/object-delete.cpp
> @@ -7,9 +7,8 @@
>
>  #include <iostream>
>
> -#include <libcamera/object.h>
> -
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/thread.h>
>
>  #include "test.h"
>
> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp
> index a6f816f395eb..b1c0f473ba5c 100644
> --- a/test/object-invoke.cpp
> +++ b/test/object-invoke.cpp
> @@ -8,10 +8,9 @@
>  #include <iostream>
>  #include <thread>
>
> -#include <libcamera/object.h>
> -
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/thread.h>
>
>  #include "test.h"
>
> diff --git a/test/object.cpp b/test/object.cpp
> index 264659b405d9..cbd0d3ececab 100644
> --- a/test/object.cpp
> +++ b/test/object.cpp
> @@ -7,10 +7,9 @@
>
>  #include <iostream>
>
> -#include <libcamera/object.h>
> -
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/thread.h>
>
>  #include "test.h"
>
> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp
> index a5155bae3162..8f7a1f05f681 100644
> --- a/test/process/process_test.cpp
> +++ b/test/process/process_test.cpp
> @@ -9,12 +9,13 @@
>  #include <unistd.h>
>  #include <vector>
>
> +
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>
>  #include "test.h"
>
> diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp
> index dbbba8912386..880bcd02c6be 100644
> --- a/test/serialization/ipa_data_serializer_test.cpp
> +++ b/test/serialization/ipa_data_serializer_test.cpp
> @@ -17,13 +17,14 @@
>  #include <unistd.h>
>  #include <vector>
>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/device_enumerator.h"
>  #include "libcamera/internal/ipa_data_serializer.h"
>  #include "libcamera/internal/ipa_manager.h"
>  #include "libcamera/internal/ipa_module.h"
>  #include "libcamera/internal/pipeline_handler.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>
>  #include "serialization_test.h"
>  #include "test.h"
> diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp
> index 8a96b5d2abb3..d5e2eb662df2 100644
> --- a/test/signal-threads.cpp
> +++ b/test/signal-threads.cpp
> @@ -9,11 +9,10 @@
>  #include <iostream>
>  #include <thread>
>
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/thread.h>
>  #include <libcamera/base/utils.h>
>
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
> -
>  #include "test.h"
>
>  using namespace std;
> diff --git a/test/signal.cpp b/test/signal.cpp
> index f83ceb05f091..aceb02789cf4 100644
> --- a/test/signal.cpp
> +++ b/test/signal.cpp
> @@ -8,8 +8,8 @@
>  #include <iostream>
>  #include <string.h>
>
> -#include <libcamera/object.h>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/signal.h>
>
>  #include "test.h"
>
> diff --git a/test/threads.cpp b/test/threads.cpp
> index e0c50dc90a65..d83b5833998f 100644
> --- a/test/threads.cpp
> +++ b/test/threads.cpp
> @@ -10,7 +10,7 @@
>  #include <memory>
>  #include <thread>
>
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/thread.h>
>
>  #include "test.h"
>
> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp
> index be29eee1bdb6..2c14865b74d5 100644
> --- a/test/timer-thread.cpp
> +++ b/test/timer-thread.cpp
> @@ -8,9 +8,9 @@
>  #include <chrono>
>  #include <iostream>
>
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>
>  #include "test.h"
>
> diff --git a/test/timer.cpp b/test/timer.cpp
> index fc90b11040d8..88f226e79f5f 100644
> --- a/test/timer.cpp
> +++ b/test/timer.cpp
> @@ -8,9 +8,9 @@
>  #include <chrono>
>  #include <iostream>
>
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>
>  #include "test.h"
>
> diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp
> index c75259be0d10..91b3e4a0dad6 100644
> --- a/test/v4l2_videodevice/buffer_sharing.cpp
> +++ b/test/v4l2_videodevice/buffer_sharing.cpp
> @@ -14,9 +14,9 @@
>
>  #include <libcamera/buffer.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>
>  #include "v4l2_videodevice_test.h"
>
> diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp
> index accdb34a699c..f12c8bef97f6 100644
> --- a/test/v4l2_videodevice/capture_async.cpp
> +++ b/test/v4l2_videodevice/capture_async.cpp
> @@ -9,9 +9,9 @@
>
>  #include <libcamera/buffer.h>
>
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>
>  #include "v4l2_videodevice_test.h"
>
> diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
> index e0f068082c01..fe4b3cc6487f 100644
> --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp
> +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
> @@ -9,11 +9,12 @@
>
>  #include <libcamera/buffer.h>
>
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/media_device.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  #include "libcamera/internal/v4l2_videodevice.h"
>
>  #include "test.h"
> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> index dc6748153445..5a64fe9cfeee 100644
> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> @@ -23,6 +23,9 @@
>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>
>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>
>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +
>  #include "libcamera/internal/control_serializer.h"
>  #include "libcamera/internal/ipa_data_serializer.h"
>  #include "libcamera/internal/ipa_module.h"
> @@ -30,9 +33,7 @@
>  #include "libcamera/internal/ipc_pipe.h"
>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>  #include "libcamera/internal/ipc_unixsocket.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
>
>  namespace libcamera {
>
> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
> index 017b870c9dad..ae168548492c 100644
> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
> @@ -19,12 +19,13 @@
>  #include <libcamera/ipa/ipa_interface.h>
>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>
>
> +#include <libcamera/base/thread.h>
> +
>  #include "libcamera/internal/control_serializer.h"
>  #include "libcamera/internal/ipa_proxy.h"
>  #include "libcamera/internal/ipc_pipe.h"
>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>  #include "libcamera/internal/ipc_unixsocket.h"
> -#include "libcamera/internal/thread.h"
>
>  namespace libcamera {
>  {%- if has_namespace %}
> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
> index 8a57b6cc8b34..d993e39e5a5f 100644
> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
> @@ -26,17 +26,18 @@
>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>
>  #include <libcamera/logging.h>
>
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/control_serializer.h"
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/ipa_data_serializer.h"
>  #include "libcamera/internal/ipa_module.h"
>  #include "libcamera/internal/ipa_proxy.h"
>  #include "libcamera/internal/ipc_pipe.h"
>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>  #include "libcamera/internal/ipc_unixsocket.h"
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/thread.h"
>
>  using namespace libcamera;
>
> --
> 2.30.2
>
Paul Elder June 25, 2021, 4:31 a.m. UTC | #2
On Fri, Jun 25, 2021 at 02:35:32AM +0100, Kieran Bingham wrote:
> Move the functionality for the following components to the new
> base support library:
> 
>  - BoundMethod
>  - EventDispatcher
>  - EventDispatcherPoll
>  - Log
>  - Message
>  - Object
>  - Signal
>  - Semaphore
>  - Thread
>  - Timer
> 
> While it would be preferable to see these split to move one component
> per commit, these components are all interdependant upon each other,
> which leaves us with one big change performing the move for all of them.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  Documentation/guides/pipeline-handler.rst        |  3 ++-
>  include/libcamera/{ => base}/bound_method.h      |  6 +++---
>  .../{internal => base}/event_dispatcher.h        |  6 +++---
>  .../{internal => base}/event_dispatcher_poll.h   |  8 ++++----
>  include/libcamera/{internal => base}/log.h       |  6 +++---
>  include/libcamera/base/meson.build               | 10 ++++++++++
>  include/libcamera/{internal => base}/message.h   |  8 ++++----
>  include/libcamera/{ => base}/object.h            |  8 ++++----
>  include/libcamera/{internal => base}/semaphore.h |  8 ++++----
>  include/libcamera/{ => base}/signal.h            | 10 +++++-----
>  include/libcamera/{internal => base}/thread.h    | 12 +++++-------
>  include/libcamera/{internal => base}/timer.h     | 10 +++++-----
>  include/libcamera/camera.h                       |  4 ++--
>  include/libcamera/camera_manager.h               |  5 ++---
>  include/libcamera/internal/camera_sensor.h       |  2 +-
>  include/libcamera/internal/device_enumerator.h   |  2 +-
>  include/libcamera/internal/event_notifier.h      |  4 ++--
>  include/libcamera/internal/ipa_data_serializer.h |  3 ++-
>  include/libcamera/internal/ipa_manager.h         |  3 ++-
>  include/libcamera/internal/ipa_module.h          |  3 ++-
>  include/libcamera/internal/ipc_pipe.h            |  4 ++--
>  include/libcamera/internal/ipc_unixsocket.h      |  2 +-
>  include/libcamera/internal/media_device.h        |  4 ++--
>  include/libcamera/internal/meson.build           |  7 -------
>  include/libcamera/internal/pipeline_handler.h    |  2 +-
>  include/libcamera/internal/process.h             |  2 +-
>  include/libcamera/internal/v4l2_device.h         |  6 +++---
>  include/libcamera/internal/v4l2_subdevice.h      |  2 +-
>  include/libcamera/internal/v4l2_videodevice.h    |  4 ++--
>  include/libcamera/ipa/ipa_interface.h            |  3 ++-
>  include/libcamera/meson.build                    |  3 ---
>  include/libcamera/request.h                      |  2 +-
>  src/android/camera3_hal.cpp                      |  2 +-
>  src/android/camera_capabilities.cpp              |  3 ++-
>  src/android/camera_device.cpp                    |  9 ++++-----
>  src/android/camera_device.h                      |  7 ++++---
>  src/android/camera_hal_config.cpp                |  2 +-
>  src/android/camera_hal_manager.cpp               |  4 ++--
>  src/android/camera_metadata.cpp                  |  2 +-
>  src/android/camera_worker.h                      |  6 +++---
>  src/android/jpeg/encoder_libjpeg.cpp             |  3 ++-
>  src/android/jpeg/exif.cpp                        |  3 +--
>  src/android/jpeg/post_processor_jpeg.cpp         |  4 ++--
>  src/android/jpeg/thumbnailer.cpp                 |  4 ++--
>  src/android/mm/cros_camera_buffer.cpp            |  2 +-
>  src/android/mm/generic_camera_buffer.cpp         |  3 ++-
>  src/android/yuv/post_processor_yuv.cpp           |  3 ++-
>  src/ipa/ipu3/ipu3.cpp                            |  3 ++-
>  src/ipa/ipu3/ipu3_agc.cpp                        |  4 ++--
>  src/ipa/ipu3/ipu3_awb.cpp                        |  2 +-
>  src/ipa/libipa/histogram.cpp                     |  2 +-
>  src/ipa/raspberrypi/cam_helper.hpp               |  4 ++--
>  src/ipa/raspberrypi/controller/controller.cpp    |  2 +-
>  src/ipa/raspberrypi/controller/rpi/agc.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/alsc.cpp      |  2 +-
>  src/ipa/raspberrypi/controller/rpi/awb.cpp       |  2 +-
>  .../raspberrypi/controller/rpi/black_level.cpp   |  2 +-
>  src/ipa/raspberrypi/controller/rpi/ccm.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/contrast.cpp  |  2 +-
>  src/ipa/raspberrypi/controller/rpi/dpc.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/focus.cpp     |  2 +-
>  src/ipa/raspberrypi/controller/rpi/geq.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/lux.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/noise.cpp     |  2 +-
>  src/ipa/raspberrypi/controller/rpi/sdn.cpp       |  2 +-
>  src/ipa/raspberrypi/controller/rpi/sharpen.cpp   |  2 +-
>  src/ipa/raspberrypi/raspberrypi.cpp              |  7 ++++---
>  src/ipa/rkisp1/rkisp1.cpp                        |  4 ++--
>  src/ipa/vimc/vimc.cpp                            |  3 ++-
>  src/libcamera/{ => base}/bound_method.cpp        | 11 +++++------
>  src/libcamera/{ => base}/event_dispatcher.cpp    |  7 +++----
>  .../{ => base}/event_dispatcher_poll.cpp         | 10 +++++-----
>  src/libcamera/{ => base}/log.cpp                 |  7 +++----
>  src/libcamera/base/meson.build                   | 11 +++++++++++
>  src/libcamera/{ => base}/message.cpp             |  9 ++++-----
>  src/libcamera/{ => base}/object.cpp              | 16 +++++++---------
>  src/libcamera/{ => base}/semaphore.cpp           |  6 +++---
>  src/libcamera/{ => base}/signal.cpp              |  6 +++---
>  src/libcamera/{ => base}/thread.cpp              | 12 ++++++------
>  src/libcamera/{ => base}/timer.cpp               | 15 +++++++--------
>  src/libcamera/buffer.cpp                         |  2 +-
>  src/libcamera/byte_stream_buffer.cpp             |  2 +-
>  src/libcamera/camera.cpp                         |  5 +++--
>  src/libcamera/camera_manager.cpp                 |  5 +++--
>  src/libcamera/camera_sensor_properties.cpp       |  4 ++--
>  src/libcamera/control_serializer.cpp             |  3 ++-
>  src/libcamera/controls.cpp                       |  2 +-
>  src/libcamera/delayed_controls.cpp               |  3 ++-
>  src/libcamera/device_enumerator.cpp              |  3 ++-
>  src/libcamera/device_enumerator_sysfs.cpp        |  3 ++-
>  src/libcamera/device_enumerator_udev.cpp         |  3 ++-
>  src/libcamera/event_notifier.cpp                 |  6 +++---
>  src/libcamera/file.cpp                           |  2 +-
>  src/libcamera/file_descriptor.cpp                |  2 +-
>  src/libcamera/formats.cpp                        |  2 +-
>  src/libcamera/framebuffer_allocator.cpp          |  3 ++-
>  src/libcamera/geometry.cpp                       |  2 +-
>  src/libcamera/ipa_data_serializer.cpp            |  2 +-
>  src/libcamera/ipa_manager.cpp                    |  2 +-
>  src/libcamera/ipa_module.cpp                     |  2 +-
>  src/libcamera/ipa_proxy.cpp                      |  2 +-
>  src/libcamera/ipc_pipe.cpp                       |  2 +-
>  src/libcamera/ipc_pipe_unixsocket.cpp            |  9 +++++----
>  src/libcamera/ipc_unixsocket.cpp                 |  3 ++-
>  src/libcamera/media_device.cpp                   |  2 +-
>  src/libcamera/media_object.cpp                   |  3 ++-
>  src/libcamera/meson.build                        | 11 -----------
>  src/libcamera/pipeline/ipu3/cio2.h               |  2 +-
>  src/libcamera/pipeline/ipu3/frames.h             |  2 +-
>  src/libcamera/pipeline/ipu3/imgu.cpp             |  6 +++---
>  src/libcamera/pipeline/ipu3/ipu3.cpp             |  6 +++---
>  src/libcamera/pipeline/raspberrypi/dma_heaps.cpp |  2 +-
>  .../pipeline/raspberrypi/rpi_stream.cpp          |  4 ++--
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp         |  6 +++---
>  src/libcamera/pipeline/rkisp1/rkisp1_path.h      |  3 ++-
>  src/libcamera/pipeline/simple/converter.cpp      |  8 ++++----
>  src/libcamera/pipeline/simple/converter.h        |  4 ++--
>  src/libcamera/pipeline/simple/simple.cpp         |  3 ++-
>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp     |  6 +++---
>  src/libcamera/pipeline/vimc/vimc.cpp             |  8 +++++---
>  src/libcamera/pipeline_handler.cpp               |  6 +++---
>  src/libcamera/process.cpp                        |  2 +-
>  src/libcamera/request.cpp                        |  3 ++-
>  src/libcamera/stream.cpp                         |  2 +-
>  src/libcamera/sysfs.cpp                          |  3 ++-
>  src/libcamera/v4l2_device.cpp                    |  2 +-
>  src/libcamera/v4l2_pixelformat.cpp               |  3 ++-
>  src/libcamera/v4l2_subdevice.cpp                 |  2 +-
>  src/libcamera/v4l2_videodevice.cpp               |  3 ++-
>  src/v4l2/v4l2_camera.cpp                         |  2 +-
>  src/v4l2/v4l2_camera.h                           |  4 ++--
>  src/v4l2/v4l2_camera_proxy.cpp                   |  4 ++--
>  src/v4l2/v4l2_compat_manager.cpp                 |  7 +++----
>  test/camera/buffer_import.cpp                    |  7 ++++---
>  test/camera/capture.cpp                          |  6 +++---
>  test/event-dispatcher.cpp                        |  6 +++---
>  test/event-thread.cpp                            |  5 +++--
>  test/event.cpp                                   |  7 ++++---
>  test/hotplug-cameras.cpp                         |  7 ++++---
>  test/ipa/ipa_interface_test.cpp                  |  7 ++++---
>  test/ipc/unixsocket.cpp                          |  7 ++++---
>  test/ipc/unixsocket_ipc.cpp                      |  7 +++----
>  test/log/log_api.cpp                             |  4 ++--
>  test/log/log_process.cpp                         |  8 ++++----
>  test/message.cpp                                 |  4 ++--
>  test/object-delete.cpp                           |  5 ++---
>  test/object-invoke.cpp                           |  7 +++----
>  test/object.cpp                                  |  7 +++----
>  test/process/process_test.cpp                    |  7 ++++---
>  test/serialization/ipa_data_serializer_test.cpp  |  5 +++--
>  test/signal-threads.cpp                          |  5 ++---
>  test/signal.cpp                                  |  4 ++--
>  test/threads.cpp                                 |  2 +-
>  test/timer-thread.cpp                            |  6 +++---
>  test/timer.cpp                                   |  6 +++---
>  test/v4l2_videodevice/buffer_sharing.cpp         |  6 +++---
>  test/v4l2_videodevice/capture_async.cpp          |  6 +++---
>  test/v4l2_videodevice/v4l2_m2mdevice.cpp         |  7 ++++---
>  .../module_ipa_proxy.cpp.tmpl                    |  5 +++--
>  .../libcamera_templates/module_ipa_proxy.h.tmpl  |  3 ++-
>  .../module_ipa_proxy_worker.cpp.tmpl             |  7 ++++---
>  161 files changed, 384 insertions(+), 358 deletions(-)
>  rename include/libcamera/{ => base}/bound_method.h (97%)
>  rename include/libcamera/{internal => base}/event_dispatcher.h (79%)
>  rename include/libcamera/{internal => base}/event_dispatcher_poll.h (82%)
>  rename include/libcamera/{internal => base}/log.h (96%)
>  rename include/libcamera/{internal => base}/message.h (87%)
>  rename include/libcamera/{ => base}/object.h (89%)
>  rename include/libcamera/{internal => base}/semaphore.h (74%)
>  rename include/libcamera/{ => base}/signal.h (93%)
>  rename include/libcamera/{internal => base}/thread.h (86%)
>  rename include/libcamera/{internal => base}/timer.h (81%)
>  rename src/libcamera/{ => base}/bound_method.cpp (94%)
>  rename src/libcamera/{ => base}/event_dispatcher.cpp (97%)
>  rename src/libcamera/{ => base}/event_dispatcher_poll.cpp (97%)
>  rename src/libcamera/{ => base}/log.cpp (99%)
>  rename src/libcamera/{ => base}/message.cpp (96%)
>  rename src/libcamera/{ => base}/object.cpp (97%)
>  rename src/libcamera/{ => base}/semaphore.cpp (96%)
>  rename src/libcamera/{ => base}/signal.cpp (98%)
>  rename src/libcamera/{ => base}/thread.cpp (98%)
>  rename src/libcamera/{ => base}/timer.cpp (94%)
> 
> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
> index 3047e006e5b6..152776935a33 100644
> --- a/Documentation/guides/pipeline-handler.rst
> +++ b/Documentation/guides/pipeline-handler.rst
> @@ -288,7 +288,8 @@ features:
>  
>  .. code-block:: cpp
>  
> -   #include "libcamera/internal/log.h"
> +   #include <libcamera/base/log.h>
> +   
>     #include "libcamera/internal/pipeline_handler.h"
>  
>  Run the following commands:
> diff --git a/include/libcamera/bound_method.h b/include/libcamera/base/bound_method.h
> similarity index 97%
> rename from include/libcamera/bound_method.h
> rename to include/libcamera/base/bound_method.h
> index 4fc445ecd191..282f9b58ab60 100644
> --- a/include/libcamera/bound_method.h
> +++ b/include/libcamera/base/bound_method.h
> @@ -4,8 +4,8 @@
>   *
>   * bound_method.h - Method bind and invocation
>   */
> -#ifndef __LIBCAMERA_BOUND_METHOD_H__
> -#define __LIBCAMERA_BOUND_METHOD_H__
> +#ifndef __LIBCAMERA_BASE_BOUND_METHOD_H__
> +#define __LIBCAMERA_BASE_BOUND_METHOD_H__
>  
>  #include <memory>
>  #include <tuple>
> @@ -236,4 +236,4 @@ private:
>  
>  } /* namespace libcamera */
>  
> -#endif /* __LIBCAMERA_BOUND_METHOD_H__ */
> +#endif /* __LIBCAMERA_BASE_BOUND_METHOD_H__ */
> diff --git a/include/libcamera/internal/event_dispatcher.h b/include/libcamera/base/event_dispatcher.h
> similarity index 79%
> rename from include/libcamera/internal/event_dispatcher.h
> rename to include/libcamera/base/event_dispatcher.h
> index e6a8ad65ce0a..045df27fff16 100644
> --- a/include/libcamera/internal/event_dispatcher.h
> +++ b/include/libcamera/base/event_dispatcher.h
> @@ -4,8 +4,8 @@
>   *
>   * event_dispatcher.h - Event dispatcher
>   */
> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__
> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__
> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_H__
> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_H__
>  
>  #include <vector>
>  
> @@ -32,4 +32,4 @@ public:
>  
>  } /* namespace libcamera */
>  
> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__ */
> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_H__ */
> diff --git a/include/libcamera/internal/event_dispatcher_poll.h b/include/libcamera/base/event_dispatcher_poll.h
> similarity index 82%
> rename from include/libcamera/internal/event_dispatcher_poll.h
> rename to include/libcamera/base/event_dispatcher_poll.h
> index 33de051de261..ae2a3f04e4b9 100644
> --- a/include/libcamera/internal/event_dispatcher_poll.h
> +++ b/include/libcamera/base/event_dispatcher_poll.h
> @@ -4,14 +4,14 @@
>   *
>   * event_dispatcher_poll.h - Poll-based event dispatcher
>   */
> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__
> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__
> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__
> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__
>  
>  #include <list>
>  #include <map>
>  #include <vector>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> +#include <libcamera/base/event_dispatcher.h>
>  
>  struct pollfd;
>  
> @@ -55,4 +55,4 @@ private:
>  
>  } /* namespace libcamera */
>  
> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__ */
> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__ */
> diff --git a/include/libcamera/internal/log.h b/include/libcamera/base/log.h
> similarity index 96%
> rename from include/libcamera/internal/log.h
> rename to include/libcamera/base/log.h
> index 82e55a623e04..b93c947ae7db 100644
> --- a/include/libcamera/internal/log.h
> +++ b/include/libcamera/base/log.h
> @@ -4,8 +4,8 @@
>   *
>   * log.h - Logging infrastructure
>   */
> -#ifndef __LIBCAMERA_INTERNAL_LOG_H__
> -#define __LIBCAMERA_INTERNAL_LOG_H__
> +#ifndef __LIBCAMERA_BASE_LOG_H__
> +#define __LIBCAMERA_BASE_LOG_H__
>  
>  #include <chrono>
>  #include <sstream>
> @@ -127,4 +127,4 @@ LogMessage _log(const LogCategory *category, LogSeverity severity,
>  
>  } /* namespace libcamera */
>  
> -#endif /* __LIBCAMERA_INTERNAL_LOG_H__ */
> +#endif /* __LIBCAMERA_BASE_LOG_H__ */
> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
> index 2db756c504c9..7a858dcb6f1a 100644
> --- a/include/libcamera/base/meson.build
> +++ b/include/libcamera/base/meson.build
> @@ -3,7 +3,17 @@
>  libcamera_base_include_dir = libcamera_include_dir / 'base'
>  
>  libcamera_base_headers = files([
> +    'bound_method.h',
>      'class.h',
> +    'event_dispatcher.h',
> +    'event_dispatcher_poll.h',
> +    'log.h',
> +    'message.h',
> +    'object.h',
> +    'semaphore.h',
> +    'signal.h',
> +    'thread.h',
> +    'timer.h',
>      'utils.h',
>  ])
>  
> diff --git a/include/libcamera/internal/message.h b/include/libcamera/base/message.h
> similarity index 87%
> rename from include/libcamera/internal/message.h
> rename to include/libcamera/base/message.h
> index f1b133bfb2ba..5d2a9f04f0a7 100644
> --- a/include/libcamera/internal/message.h
> +++ b/include/libcamera/base/message.h
> @@ -4,12 +4,12 @@
>   *
>   * message.h - Message queue support
>   */
> -#ifndef __LIBCAMERA_INTERNAL_MESSAGE_H__
> -#define __LIBCAMERA_INTERNAL_MESSAGE_H__
> +#ifndef __LIBCAMERA_BASE_MESSAGE_H__
> +#define __LIBCAMERA_BASE_MESSAGE_H__
>  
>  #include <atomic>
>  
> -#include <libcamera/bound_method.h>
> +#include <libcamera/base/bound_method.h>
>  
>  namespace libcamera {
>  
> @@ -68,4 +68,4 @@ private:
>  
>  } /* namespace libcamera */
>  
> -#endif /* __LIBCAMERA_INTERNAL_MESSAGE_H__ */
> +#endif /* __LIBCAMERA_BASE_MESSAGE_H__ */
> diff --git a/include/libcamera/object.h b/include/libcamera/base/object.h
> similarity index 89%
> rename from include/libcamera/object.h
> rename to include/libcamera/base/object.h
> index a1882f05fb77..5c385ab4b140 100644
> --- a/include/libcamera/object.h
> +++ b/include/libcamera/base/object.h
> @@ -4,14 +4,14 @@
>   *
>   * object.h - Base object
>   */
> -#ifndef __LIBCAMERA_OBJECT_H__
> -#define __LIBCAMERA_OBJECT_H__
> +#ifndef __LIBCAMERA_BASE_OBJECT_H__
> +#define __LIBCAMERA_BASE_OBJECT_H__
>  
>  #include <list>
>  #include <memory>
>  #include <vector>
>  
> -#include <libcamera/bound_method.h>
> +#include <libcamera/base/bound_method.h>
>  
>  namespace libcamera {
>  
> @@ -68,4 +68,4 @@ private:
>  
>  } /* namespace libcamera */
>  
> -#endif /* __LIBCAMERA_OBJECT_H__ */
> +#endif /* __LIBCAMERA_BASE_OBJECT_H__ */
> diff --git a/include/libcamera/internal/semaphore.h b/include/libcamera/base/semaphore.h
> similarity index 74%
> rename from include/libcamera/internal/semaphore.h
> rename to include/libcamera/base/semaphore.h
> index 9dc65d299cfd..c8e62e3ee68b 100644
> --- a/include/libcamera/internal/semaphore.h
> +++ b/include/libcamera/base/semaphore.h
> @@ -4,12 +4,12 @@
>   *
>   * semaphore.h - General-purpose counting semaphore
>   */
> -#ifndef __LIBCAMERA_INTERNAL_SEMAPHORE_H__
> -#define __LIBCAMERA_INTERNAL_SEMAPHORE_H__
> +#ifndef __LIBCAMERA_BASE_SEMAPHORE_H__
> +#define __LIBCAMERA_BASE_SEMAPHORE_H__
>  
>  #include <condition_variable>
>  
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/thread.h>
>  
>  namespace libcamera {
>  
> @@ -31,4 +31,4 @@ private:
>  
>  } /* namespace libcamera */
>  
> -#endif /* __LIBCAMERA_INTERNAL_SEMAPHORE_H__ */
> +#endif /* __LIBCAMERA_BASE_SEMAPHORE_H__ */
> diff --git a/include/libcamera/signal.h b/include/libcamera/base/signal.h
> similarity index 93%
> rename from include/libcamera/signal.h
> rename to include/libcamera/base/signal.h
> index 3233529a1275..c2521769a843 100644
> --- a/include/libcamera/signal.h
> +++ b/include/libcamera/base/signal.h
> @@ -4,16 +4,16 @@
>   *
>   * signal.h - Signal & slot implementation
>   */
> -#ifndef __LIBCAMERA_SIGNAL_H__
> -#define __LIBCAMERA_SIGNAL_H__
> +#ifndef __LIBCAMERA_BASE_SIGNAL_H__
> +#define __LIBCAMERA_BASE_SIGNAL_H__
>  
>  #include <functional>
>  #include <list>
>  #include <type_traits>
>  #include <vector>
>  
> -#include <libcamera/bound_method.h>
> -#include <libcamera/object.h>
> +#include <libcamera/base/bound_method.h>
> +#include <libcamera/base/object.h>
>  
>  namespace libcamera {
>  
> @@ -129,4 +129,4 @@ public:
>  
>  } /* namespace libcamera */
>  
> -#endif /* __LIBCAMERA_SIGNAL_H__ */
> +#endif /* __LIBCAMERA_BASE_SIGNAL_H__ */
> diff --git a/include/libcamera/internal/thread.h b/include/libcamera/base/thread.h
> similarity index 86%
> rename from include/libcamera/internal/thread.h
> rename to include/libcamera/base/thread.h
> index 9662e28bb581..2ed18d49c978 100644
> --- a/include/libcamera/internal/thread.h
> +++ b/include/libcamera/base/thread.h
> @@ -4,20 +4,18 @@
>   *
>   * thread.h - Thread support
>   */
> -#ifndef __LIBCAMERA_INTERNAL_THREAD_H__
> -#define __LIBCAMERA_INTERNAL_THREAD_H__
> +#ifndef __LIBCAMERA_BASE_THREAD_H__
> +#define __LIBCAMERA_BASE_THREAD_H__
>  
>  #include <memory>
>  #include <mutex>
>  #include <sys/types.h>
>  #include <thread>
>  
> -#include <libcamera/signal.h>
> -
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/signal.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/message.h"
> -
>  namespace libcamera {
>  
>  class EventDispatcher;
> @@ -75,4 +73,4 @@ private:
>  
>  } /* namespace libcamera */
>  
> -#endif /* __LIBCAMERA_INTERNAL_THREAD_H__ */
> +#endif /* __LIBCAMERA_BASE_THREAD_H__ */
> diff --git a/include/libcamera/internal/timer.h b/include/libcamera/base/timer.h
> similarity index 81%
> rename from include/libcamera/internal/timer.h
> rename to include/libcamera/base/timer.h
> index 013e93c0b4e6..e79e85f1ef0d 100644
> --- a/include/libcamera/internal/timer.h
> +++ b/include/libcamera/base/timer.h
> @@ -4,14 +4,14 @@
>   *
>   * timer.h - Generic timer
>   */
> -#ifndef __LIBCAMERA_INTERNAL_TIMER_H__
> -#define __LIBCAMERA_INTERNAL_TIMER_H__
> +#ifndef __LIBCAMERA_BASE_TIMER_H__
> +#define __LIBCAMERA_BASE_TIMER_H__
>  
>  #include <chrono>
>  #include <stdint.h>
>  
> -#include <libcamera/object.h>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/signal.h>
>  
>  namespace libcamera {
>  
> @@ -46,4 +46,4 @@ private:
>  
>  } /* namespace libcamera */
>  
> -#endif /* __LIBCAMERA_INTERNAL_TIMER_H__ */
> +#endif /* __LIBCAMERA_BASE_TIMER_H__ */
> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
> index ea0914009c2b..b081907e0cb1 100644
> --- a/include/libcamera/camera.h
> +++ b/include/libcamera/camera.h
> @@ -13,11 +13,11 @@
>  #include <string>
>  
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/signal.h>
>  
>  #include <libcamera/controls.h>
> -#include <libcamera/object.h>
>  #include <libcamera/request.h>
> -#include <libcamera/signal.h>
>  #include <libcamera/stream.h>
>  #include <libcamera/transform.h>
>  
> diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h
> index 5deede035115..744e5a06c78c 100644
> --- a/include/libcamera/camera_manager.h
> +++ b/include/libcamera/camera_manager.h
> @@ -13,9 +13,8 @@
>  #include <vector>
>  
>  #include <libcamera/base/class.h>
> -
> -#include <libcamera/object.h>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/signal.h>
>  
>  namespace libcamera {
>  
> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h
> index 7bc540619721..db12b07ee8cc 100644
> --- a/include/libcamera/internal/camera_sensor.h
> +++ b/include/libcamera/internal/camera_sensor.h
> @@ -12,13 +12,13 @@
>  #include <vector>
>  
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/log.h>
>  
>  #include <libcamera/controls.h>
>  #include <libcamera/geometry.h>
>  #include <libcamera/ipa/core_ipa_interface.h>
>  
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/v4l2_subdevice.h"
>  
>  namespace libcamera {
> diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h
> index 707cfe8f309d..222caf75a0db 100644
> --- a/include/libcamera/internal/device_enumerator.h
> +++ b/include/libcamera/internal/device_enumerator.h
> @@ -13,7 +13,7 @@
>  
>  #include <linux/media.h>
>  
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>  
>  namespace libcamera {
>  
> diff --git a/include/libcamera/internal/event_notifier.h b/include/libcamera/internal/event_notifier.h
> index cc3495c024f0..8a6419f23004 100644
> --- a/include/libcamera/internal/event_notifier.h
> +++ b/include/libcamera/internal/event_notifier.h
> @@ -7,8 +7,8 @@
>  #ifndef __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
>  #define __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
>  
> -#include <libcamera/object.h>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/signal.h>
>  
>  namespace libcamera {
>  
> diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h
> index 70168acc25a5..76325b1d109f 100644
> --- a/include/libcamera/internal/ipa_data_serializer.h
> +++ b/include/libcamera/internal/ipa_data_serializer.h
> @@ -14,6 +14,8 @@
>  #include <type_traits>
>  #include <vector>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/geometry.h>
> @@ -22,7 +24,6 @@
>  #include "libcamera/internal/byte_stream_buffer.h"
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/control_serializer.h"
> -#include "libcamera/internal/log.h"
>  
>  namespace libcamera {
>  
> diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h
> index e904a2be796b..34224e330da7 100644
> --- a/include/libcamera/internal/ipa_manager.h
> +++ b/include/libcamera/internal/ipa_manager.h
> @@ -10,11 +10,12 @@
>  #include <stdint.h>
>  #include <vector>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/ipa/ipa_interface.h>
>  #include <libcamera/ipa/ipa_module_info.h>
>  
>  #include "libcamera/internal/ipa_module.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/pub_key.h"
>  
> diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h
> index 19fc58272210..a87f56502b9a 100644
> --- a/include/libcamera/internal/ipa_module.h
> +++ b/include/libcamera/internal/ipa_module.h
> @@ -11,10 +11,11 @@
>  #include <string>
>  #include <vector>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/ipa/ipa_interface.h>
>  #include <libcamera/ipa/ipa_module_info.h>
>  
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  
>  namespace libcamera {
> diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h
> index c9a84b78cbe5..e58de3402006 100644
> --- a/include/libcamera/internal/ipc_pipe.h
> +++ b/include/libcamera/internal/ipc_pipe.h
> @@ -9,9 +9,9 @@
>  
>  #include <vector>
>  
> -#include "libcamera/internal/ipc_unixsocket.h"
> +#include <libcamera/base/signal.h>
>  
> -#include <libcamera/signal.h>
> +#include "libcamera/internal/ipc_unixsocket.h"
>  
>  namespace libcamera {
>  
> diff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h
> index e871b65036bd..9f5b06773ced 100644
> --- a/include/libcamera/internal/ipc_unixsocket.h
> +++ b/include/libcamera/internal/ipc_unixsocket.h
> @@ -12,7 +12,7 @@
>  #include <sys/types.h>
>  #include <vector>
>  
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>  
>  namespace libcamera {
>  
> diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h
> index c3292508c87b..8424611d7eda 100644
> --- a/include/libcamera/internal/media_device.h
> +++ b/include/libcamera/internal/media_device.h
> @@ -14,9 +14,9 @@
>  
>  #include <linux/media.h>
>  
> -#include <libcamera/signal.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
>  
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_object.h"
>  
>  namespace libcamera {
> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build
> index c84f9822ef6e..64f50373a7fb 100644
> --- a/include/libcamera/internal/meson.build
> +++ b/include/libcamera/internal/meson.build
> @@ -22,8 +22,6 @@ libcamera_internal_headers = files([
>      'device_enumerator.h',
>      'device_enumerator_sysfs.h',
>      'device_enumerator_udev.h',
> -    'event_dispatcher.h',
> -    'event_dispatcher_poll.h',
>      'event_notifier.h',
>      'file.h',
>      'formats.h',
> @@ -31,18 +29,13 @@ libcamera_internal_headers = files([
>      'ipa_module.h',
>      'ipa_proxy.h',
>      'ipc_unixsocket.h',
> -    'log.h',
>      'media_device.h',
>      'media_object.h',
> -    'message.h',
>      'pipeline_handler.h',
>      'process.h',
>      'pub_key.h',
> -    'semaphore.h',
>      'source-paths.h',
>      'sysfs.h',
> -    'thread.h',
> -    'timer.h',
>      'v4l2_device.h',
>      'v4l2_pixelformat.h',
>      'v4l2_subdevice.h',
> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
> index 8beb6b76dd3f..9e2d65d6f2c5 100644
> --- a/include/libcamera/internal/pipeline_handler.h
> +++ b/include/libcamera/internal/pipeline_handler.h
> @@ -16,9 +16,9 @@
>  #include <vector>
>  
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/object.h>
>  
>  #include <libcamera/controls.h>
> -#include <libcamera/object.h>
>  #include <libcamera/stream.h>
>  
>  #include "libcamera/internal/ipa_proxy.h"
> diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
> index 254cda8535ae..c4d5d9c1c009 100644
> --- a/include/libcamera/internal/process.h
> +++ b/include/libcamera/internal/process.h
> @@ -11,7 +11,7 @@
>  #include <string>
>  #include <vector>
>  
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>  
>  namespace libcamera {
>  
> diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h
> index c318e976ad8e..1edd664a9aef 100644
> --- a/include/libcamera/internal/v4l2_device.h
> +++ b/include/libcamera/internal/v4l2_device.h
> @@ -13,12 +13,12 @@
>  
>  #include <linux/videodev2.h>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
> +
>  #include <libcamera/controls.h>
> -#include <libcamera/signal.h>
>  #include <libcamera/span.h>
>  
> -#include "libcamera/internal/log.h"
> -
>  namespace libcamera {
>  
>  class EventNotifier;
> diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h
> index d07dd6b444d0..97b89fb95087 100644
> --- a/include/libcamera/internal/v4l2_subdevice.h
> +++ b/include/libcamera/internal/v4l2_subdevice.h
> @@ -12,11 +12,11 @@
>  #include <vector>
>  
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/log.h>
>  
>  #include <libcamera/geometry.h>
>  
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_object.h"
>  #include "libcamera/internal/v4l2_device.h"
>  
> diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
> index 227d015e8937..a7c3d5290d92 100644
> --- a/include/libcamera/internal/v4l2_videodevice.h
> +++ b/include/libcamera/internal/v4l2_videodevice.h
> @@ -17,14 +17,14 @@
>  #include <linux/videodev2.h>
>  
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
>  
>  #include <libcamera/buffer.h>
>  #include <libcamera/geometry.h>
>  #include <libcamera/pixel_format.h>
> -#include <libcamera/signal.h>
>  
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/v4l2_device.h"
>  #include "libcamera/internal/v4l2_pixelformat.h"
>  
> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
> index 4aefaa7153b1..9a15c86b16e2 100644
> --- a/include/libcamera/ipa/ipa_interface.h
> +++ b/include/libcamera/ipa/ipa_interface.h
> @@ -13,10 +13,11 @@
>  #include <map>
>  #include <vector>
>  
> +#include <libcamera/base/signal.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/controls.h>
>  #include <libcamera/geometry.h>
> -#include <libcamera/signal.h>
>  
>  namespace libcamera {
>  
> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
> index 7cba3de6ca96..d08bb3096aff 100644
> --- a/include/libcamera/meson.build
> +++ b/include/libcamera/meson.build
> @@ -1,7 +1,6 @@
>  # SPDX-License-Identifier: CC0-1.0
>  
>  libcamera_public_headers = files([
> -    'bound_method.h',
>      'buffer.h',
>      'camera.h',
>      'camera_manager.h',
> @@ -11,10 +10,8 @@ libcamera_public_headers = files([
>      'framebuffer_allocator.h',
>      'geometry.h',
>      'logging.h',
> -    'object.h',
>      'pixel_format.h',
>      'request.h',
> -    'signal.h',
>      'span.h',
>      'stream.h',
>      'transform.h',
> diff --git a/include/libcamera/request.h b/include/libcamera/request.h
> index 00c646fea7f2..2d361c9d97dc 100644
> --- a/include/libcamera/request.h
> +++ b/include/libcamera/request.h
> @@ -14,9 +14,9 @@
>  #include <unordered_set>
>  
>  #include <libcamera/base/class.h>
> +#include <libcamera/base/signal.h>
>  
>  #include <libcamera/controls.h>
> -#include <libcamera/signal.h>
>  
>  namespace libcamera {
>  
> diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp
> index e6d435e0501f..da836baec903 100644
> --- a/src/android/camera3_hal.cpp
> +++ b/src/android/camera3_hal.cpp
> @@ -7,7 +7,7 @@
>  
>  #include <hardware/camera_common.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "camera_device.h"
>  #include "camera_hal_manager.h"
> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
> index 00224a6d64b4..6b5edb66fad2 100644
> --- a/src/android/camera_capabilities.cpp
> +++ b/src/android/camera_capabilities.cpp
> @@ -12,12 +12,13 @@
>  
>  #include <hardware/camera3.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
>  #include <libcamera/property_ids.h>
>  
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>  
>  using namespace libcamera;
>  
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 6243c07e231e..86ea22b61467 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -15,16 +15,15 @@
>  #include <unistd.h>
>  #include <vector>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
>  #include <libcamera/formats.h>
>  #include <libcamera/property_ids.h>
>  
> -#include <libcamera/base/utils.h>
> -
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/thread.h"
> -
>  #include "system/graphics.h"
>  
>  using namespace libcamera;
> diff --git a/src/android/camera_device.h b/src/android/camera_device.h
> index 090fe28a551e..4747f577a3e4 100644
> --- a/src/android/camera_device.h
> +++ b/src/android/camera_device.h
> @@ -14,15 +14,16 @@
>  
>  #include <hardware/camera3.h>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/thread.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>  
>  #include "libcamera/internal/buffer.h"
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
>  
>  #include "camera_capabilities.h"
>  #include "camera_metadata.h"
> diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp
> index f33ba26935da..d84de4fd6f90 100644
> --- a/src/android/camera_hal_config.cpp
> +++ b/src/android/camera_hal_config.cpp
> @@ -21,7 +21,7 @@ namespace filesystem = std::experimental::filesystem;
>  
>  #include <hardware/camera3.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  using namespace libcamera;
>  
> diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
> index 54087d3a2e45..4cd67544f0df 100644
> --- a/src/android/camera_hal_manager.cpp
> +++ b/src/android/camera_hal_manager.cpp
> @@ -7,11 +7,11 @@
>  
>  #include "camera_hal_manager.h"
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/property_ids.h>
>  
> -#include "libcamera/internal/log.h"
> -
>  #include "camera_device.h"
>  
>  using namespace libcamera;
> diff --git a/src/android/camera_metadata.cpp b/src/android/camera_metadata.cpp
> index c7298d620668..3fc7cf273650 100644
> --- a/src/android/camera_metadata.cpp
> +++ b/src/android/camera_metadata.cpp
> @@ -7,7 +7,7 @@
>  
>  #include "camera_metadata.h"
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  using namespace libcamera;
>  
> diff --git a/src/android/camera_worker.h b/src/android/camera_worker.h
> index e289ef9b8655..6e1aee4a3247 100644
> --- a/src/android/camera_worker.h
> +++ b/src/android/camera_worker.h
> @@ -9,14 +9,14 @@
>  
>  #include <memory>
>  
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/thread.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
> -#include <libcamera/object.h>
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>  
> -#include "libcamera/internal/thread.h"
> -
>  class CameraDevice;
>  
>  class CaptureRequest
> diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp
> index f006e1d1999a..e6358ca9466f 100644
> --- a/src/android/jpeg/encoder_libjpeg.cpp
> +++ b/src/android/jpeg/encoder_libjpeg.cpp
> @@ -16,12 +16,13 @@
>  #include <unistd.h>
>  #include <vector>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/formats.h>
>  #include <libcamera/pixel_format.h>
>  
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>  
>  using namespace libcamera;
>  
> diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp
> index 747f1cfaa8ac..0ba4cb85ffd0 100644
> --- a/src/android/jpeg/exif.cpp
> +++ b/src/android/jpeg/exif.cpp
> @@ -14,10 +14,9 @@
>  #include <tuple>
>  #include <uchar.h>
>  
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/log.h"
> -
>  using namespace libcamera;
>  
>  LOG_DEFINE_CATEGORY(EXIF)
> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp
> index 058ccc998c6f..0e93f365d6db 100644
> --- a/src/android/jpeg/post_processor_jpeg.cpp
> +++ b/src/android/jpeg/post_processor_jpeg.cpp
> @@ -14,9 +14,9 @@
>  #include "encoder_libjpeg.h"
>  #include "exif.h"
>  
> -#include <libcamera/formats.h>
> +#include <libcamera/base/log.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/formats.h>
>  
>  using namespace libcamera;
>  using namespace std::chrono_literals;
> diff --git a/src/android/jpeg/thumbnailer.cpp b/src/android/jpeg/thumbnailer.cpp
> index f709d3435d9c..5cb00744a688 100644
> --- a/src/android/jpeg/thumbnailer.cpp
> +++ b/src/android/jpeg/thumbnailer.cpp
> @@ -7,9 +7,9 @@
>  
>  #include "thumbnailer.h"
>  
> -#include <libcamera/formats.h>
> +#include <libcamera/base/log.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/formats.h>
>  
>  using namespace libcamera;
>  
> diff --git a/src/android/mm/cros_camera_buffer.cpp b/src/android/mm/cros_camera_buffer.cpp
> index 59e26d1b5972..3cfa39a1714d 100644
> --- a/src/android/mm/cros_camera_buffer.cpp
> +++ b/src/android/mm/cros_camera_buffer.cpp
> @@ -7,7 +7,7 @@
>  
>  #include "../camera_buffer.h"
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "cros-camera/camera_buffer_manager.h"
>  
> diff --git a/src/android/mm/generic_camera_buffer.cpp b/src/android/mm/generic_camera_buffer.cpp
> index cca88cf3632f..326fdc066499 100644
> --- a/src/android/mm/generic_camera_buffer.cpp
> +++ b/src/android/mm/generic_camera_buffer.cpp
> @@ -9,8 +9,9 @@
>  
>  #include <unistd.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/buffer.h"
> -#include "libcamera/internal/log.h"
>  
>  using namespace libcamera;
>  
> diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp
> index b67364c8f147..772e805b32cc 100644
> --- a/src/android/yuv/post_processor_yuv.cpp
> +++ b/src/android/yuv/post_processor_yuv.cpp
> @@ -9,12 +9,13 @@
>  
>  #include <libyuv/scale.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/formats.h>
>  #include <libcamera/geometry.h>
>  #include <libcamera/pixel_format.h>
>  
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>  
>  using namespace libcamera;
>  
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index 8b4c7351e9db..31a3c006a6eb 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -11,6 +11,8 @@
>  #include <linux/intel-ipu3.h>
>  #include <linux/v4l2-controls.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/ipa/ipa_interface.h>
> @@ -19,7 +21,6 @@
>  #include <libcamera/request.h>
>  
>  #include "libcamera/internal/buffer.h"
> -#include "libcamera/internal/log.h"
>  
>  #include "ipu3_agc.h"
>  #include "ipu3_awb.h"
> diff --git a/src/ipa/ipu3/ipu3_agc.cpp b/src/ipa/ipu3/ipu3_agc.cpp
> index c476a60d4cb8..fd0b70f02d25 100644
> --- a/src/ipa/ipu3/ipu3_agc.cpp
> +++ b/src/ipa/ipu3/ipu3_agc.cpp
> @@ -11,9 +11,9 @@
>  #include <cmath>
>  #include <numeric>
>  
> -#include <libcamera/ipa/core_ipa_interface.h>
> +#include <libcamera/base/log.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/ipa/core_ipa_interface.h>
>  
>  #include "libipa/histogram.h"
>  
> diff --git a/src/ipa/ipu3/ipu3_awb.cpp b/src/ipa/ipu3/ipu3_awb.cpp
> index 54ce8e67124e..9b409c8ffad9 100644
> --- a/src/ipa/ipu3/ipu3_awb.cpp
> +++ b/src/ipa/ipu3/ipu3_awb.cpp
> @@ -10,7 +10,7 @@
>  #include <numeric>
>  #include <unordered_map>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  namespace libcamera {
>  
> diff --git a/src/ipa/libipa/histogram.cpp b/src/ipa/libipa/histogram.cpp
> index d4d7cfdffa84..fb1eb2a2f0b1 100644
> --- a/src/ipa/libipa/histogram.cpp
> +++ b/src/ipa/libipa/histogram.cpp
> @@ -8,7 +8,7 @@
>  
>  #include <cmath>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  /**
>   * \file histogram.h
> diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp
> index 221898ceb40d..a66648197140 100644
> --- a/src/ipa/raspberrypi/cam_helper.hpp
> +++ b/src/ipa/raspberrypi/cam_helper.hpp
> @@ -10,13 +10,13 @@
>  
>  #include <libcamera/span.h>
>  
> +#include <libcamera/base/utils.h>
> +
>  #include "camera_mode.h"
>  #include "controller/controller.hpp"
>  #include "controller/metadata.hpp"
>  #include "md_parser.hpp"
>  
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/v4l2_videodevice.h"
>  
>  namespace RPiController {
> diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp
> index 96b58359a9e5..d3433ad2e7e8 100644
> --- a/src/ipa/raspberrypi/controller/controller.cpp
> +++ b/src/ipa/raspberrypi/controller/controller.cpp
> @@ -5,7 +5,7 @@
>   * controller.cpp - ISP controller
>   */
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "algorithm.hpp"
>  #include "controller.hpp"
> diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp
> index 55e80ac74ae1..1ed578cfdbb6 100644
> --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp
> @@ -9,7 +9,7 @@
>  
>  #include "linux/bcm2835-isp.h"
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../awb_status.h"
>  #include "../device_status.h"
> diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
> index b0d24aa2ef44..3cdc95a99949 100644
> --- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
> @@ -6,7 +6,7 @@
>   */
>  #include <math.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../awb_status.h"
>  #include "alsc.hpp"
> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp
> index 1c917e4f3408..5cfd33a384e7 100644
> --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp
> @@ -5,7 +5,7 @@
>   * awb.cpp - AWB control algorithm
>   */
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../lux_status.h"
>  
> diff --git a/src/ipa/raspberrypi/controller/rpi/black_level.cpp b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
> index 9ac855f50014..6b3497f13c19 100644
> --- a/src/ipa/raspberrypi/controller/rpi/black_level.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
> @@ -8,7 +8,7 @@
>  #include <math.h>
>  #include <stdint.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../black_level_status.h"
>  
> diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/raspberrypi/controller/rpi/ccm.cpp
> index dbdcbb39dd12..821a4c7c98c5 100644
> --- a/src/ipa/raspberrypi/controller/rpi/ccm.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/ccm.cpp
> @@ -5,7 +5,7 @@
>   * ccm.cpp - CCM (colour correction matrix) control algorithm
>   */
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../awb_status.h"
>  #include "../ccm_status.h"
> diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.cpp b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
> index 2bc43027a291..ae55aad56739 100644
> --- a/src/ipa/raspberrypi/controller/rpi/contrast.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
> @@ -6,7 +6,7 @@
>   */
>  #include <stdint.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../contrast_status.h"
>  #include "../histogram.hpp"
> diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp
> index e533cd53e63b..110f50560e76 100644
> --- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp
> @@ -5,7 +5,7 @@
>   * dpc.cpp - DPC (defective pixel correction) control algorithm
>   */
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "dpc.hpp"
>  
> diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp
> index bab4406fe3a1..a87ec802b964 100644
> --- a/src/ipa/raspberrypi/controller/rpi/focus.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp
> @@ -6,7 +6,7 @@
>   */
>  #include <stdint.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../focus_status.h"
>  #include "focus.hpp"
> diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp
> index 5eff116cd055..bdceb1f3d3eb 100644
> --- a/src/ipa/raspberrypi/controller/rpi/geq.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp
> @@ -5,7 +5,7 @@
>   * geq.cpp - GEQ (green equalisation) control algorithm
>   */
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../device_status.h"
>  #include "../lux_status.h"
> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp
> index 258e44f4dcce..f58d69397e1c 100644
> --- a/src/ipa/raspberrypi/controller/rpi/lux.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp
> @@ -8,7 +8,7 @@
>  
>  #include "linux/bcm2835-isp.h"
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../device_status.h"
>  
> diff --git a/src/ipa/raspberrypi/controller/rpi/noise.cpp b/src/ipa/raspberrypi/controller/rpi/noise.cpp
> index 156f750192f8..63cad639f313 100644
> --- a/src/ipa/raspberrypi/controller/rpi/noise.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/noise.cpp
> @@ -7,7 +7,7 @@
>  
>  #include <math.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../device_status.h"
>  #include "../noise_status.h"
> diff --git a/src/ipa/raspberrypi/controller/rpi/sdn.cpp b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
> index 959bc7406a01..9384550983e7 100644
> --- a/src/ipa/raspberrypi/controller/rpi/sdn.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
> @@ -5,7 +5,7 @@
>   * sdn.cpp - SDN (spatial denoise) control algorithm
>   */
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../denoise_status.h"
>  #include "../noise_status.h"
> diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
> index 2cd861ca6898..b0c2e00a8ee1 100644
> --- a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
> +++ b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
> @@ -7,7 +7,7 @@
>  
>  #include <math.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include "../sharpen_status.h"
>  
> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
> index 1c1e802a2cdc..a3f014495e80 100644
> --- a/src/ipa/raspberrypi/raspberrypi.cpp
> +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> @@ -13,6 +13,10 @@
>  #include <string.h>
>  #include <sys/mman.h>
>  
> +#include <linux/bcm2835-isp.h>
> +
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
> @@ -25,9 +29,6 @@
>  #include <libcamera/span.h>
>  
>  #include "libcamera/internal/buffer.h"
> -#include "libcamera/internal/log.h"
> -
> -#include <linux/bcm2835-isp.h>
>  
>  #include "agc_algorithm.hpp"
>  #include "agc_status.h"
> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
> index b47ea3240f63..cdfb4d139e41 100644
> --- a/src/ipa/rkisp1/rkisp1.cpp
> +++ b/src/ipa/rkisp1/rkisp1.cpp
> @@ -15,6 +15,8 @@
>  #include <linux/rkisp1-config.h>
>  #include <linux/v4l2-controls.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/ipa/ipa_interface.h>
> @@ -22,8 +24,6 @@
>  #include <libcamera/ipa/rkisp1_ipa_interface.h>
>  #include <libcamera/request.h>
>  
> -#include "libcamera/internal/log.h"
> -
>  namespace libcamera {
>  
>  LOG_DEFINE_CATEGORY(IPARkISP1)
> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
> index 13681d8833ff..9ffd07f493a1 100644
> --- a/src/ipa/vimc/vimc.cpp
> +++ b/src/ipa/vimc/vimc.cpp
> @@ -17,8 +17,9 @@
>  #include <libcamera/ipa/ipa_interface.h>
>  #include <libcamera/ipa/ipa_module_info.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/file.h"
> -#include "libcamera/internal/log.h"
>  
>  namespace libcamera {
>  
> diff --git a/src/libcamera/bound_method.cpp b/src/libcamera/base/bound_method.cpp
> similarity index 94%
> rename from src/libcamera/bound_method.cpp
> rename to src/libcamera/base/bound_method.cpp
> index 4965bb5e167b..3ecec51c4b75 100644
> --- a/src/libcamera/bound_method.cpp
> +++ b/src/libcamera/base/bound_method.cpp
> @@ -5,14 +5,13 @@
>   * bound_method.cpp - Method bind and invocation
>   */
>  
> -#include <libcamera/bound_method.h>
> -
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/semaphore.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/bound_method.h>
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/semaphore.h>
> +#include <libcamera/base/thread.h>
>  
>  /**
> - * \file bound_method.h
> + * \file base/bound_method.h
>   * \brief Method bind and invocation
>   */
>  
> diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/base/event_dispatcher.cpp
> similarity index 97%
> rename from src/libcamera/event_dispatcher.cpp
> rename to src/libcamera/base/event_dispatcher.cpp
> index e0ce1eb3cc04..4be89e819832 100644
> --- a/src/libcamera/event_dispatcher.cpp
> +++ b/src/libcamera/base/event_dispatcher.cpp
> @@ -5,12 +5,11 @@
>   * event_dispatcher.cpp - Event dispatcher
>   */
>  
> -#include "libcamera/internal/event_dispatcher.h"
> -
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/log.h>
>  
>  /**
> - * \file event_dispatcher.h
> + * \file base/event_dispatcher.h
>   */
>  
>  namespace libcamera {
> diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp
> similarity index 97%
> rename from src/libcamera/event_dispatcher_poll.cpp
> rename to src/libcamera/base/event_dispatcher_poll.cpp
> index 0b6aee187063..d76ca7fc2c32 100644
> --- a/src/libcamera/event_dispatcher_poll.cpp
> +++ b/src/libcamera/base/event_dispatcher_poll.cpp
> @@ -5,7 +5,7 @@
>   * event_dispatcher_poll.cpp - Poll-based event dispatcher
>   */
>  
> -#include "libcamera/internal/event_dispatcher_poll.h"
> +#include <libcamera/base/event_dispatcher_poll.h>
>  
>  #include <algorithm>
>  #include <chrono>
> @@ -16,15 +16,15 @@
>  #include <sys/eventfd.h>
>  #include <unistd.h>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  #include <libcamera/base/utils.h>
>  
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  
>  /**
> - * \file event_dispatcher_poll.h
> + * \file base/event_dispatcher_poll.h
>   */
>  
>  namespace libcamera {
> diff --git a/src/libcamera/log.cpp b/src/libcamera/base/log.cpp
> similarity index 99%
> rename from src/libcamera/log.cpp
> rename to src/libcamera/base/log.cpp
> index 5ff0e9017648..1801ae26a2e3 100644
> --- a/src/libcamera/log.cpp
> +++ b/src/libcamera/base/log.cpp
> @@ -5,7 +5,7 @@
>   * log.cpp - Logging infrastructure
>   */
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  #include <array>
>  #if HAVE_BACKTRACE
> @@ -23,12 +23,11 @@
>  
>  #include <libcamera/logging.h>
>  
> +#include <libcamera/base/thread.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/thread.h"
> -
>  /**
> - * \file log.h
> + * \file base/log.h
>   * \brief Logging infrastructure
>   *
>   * libcamera includes a logging infrastructure used through the library that
> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
> index 302a288685d3..7a19c67c51b8 100644
> --- a/src/libcamera/base/meson.build
> +++ b/src/libcamera/base/meson.build
> @@ -2,10 +2,21 @@
>  
>  libcamera_base_sources = files([
>      'class.cpp',
> +    'bound_method.cpp',
> +    'event_dispatcher.cpp',
> +    'event_dispatcher_poll.cpp',
> +    'log.cpp',
> +    'message.cpp',
> +    'object.cpp',
> +    'semaphore.cpp',
> +    'signal.cpp',
> +    'thread.cpp',
> +    'timer.cpp',
>      'utils.cpp',
>  ])
>  
>  libcamera_base_deps = [
> +    dependency('threads'),
>  ]
>  
>  libcamera_base_lib = shared_library('libcamera-base',
> diff --git a/src/libcamera/message.cpp b/src/libcamera/base/message.cpp
> similarity index 96%
> rename from src/libcamera/message.cpp
> rename to src/libcamera/base/message.cpp
> index bc985c077a4f..f1d772e43465 100644
> --- a/src/libcamera/message.cpp
> +++ b/src/libcamera/base/message.cpp
> @@ -5,14 +5,13 @@
>   * message.cpp - Message queue support
>   */
>  
> -#include "libcamera/internal/message.h"
> +#include <libcamera/base/message.h>
>  
> -#include <libcamera/signal.h>
> -
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
>  
>  /**
> - * \file message.h
> + * \file base/message.h
>   * \brief Message queue support
>   *
>   * The messaging API enables inter-thread communication through message
> diff --git a/src/libcamera/object.cpp b/src/libcamera/base/object.cpp
> similarity index 97%
> rename from src/libcamera/object.cpp
> rename to src/libcamera/base/object.cpp
> index 51cac64ea313..25410ecd949e 100644
> --- a/src/libcamera/object.cpp
> +++ b/src/libcamera/base/object.cpp
> @@ -5,21 +5,19 @@
>   * object.cpp - Base object
>   */
>  
> -#include <libcamera/object.h>
> +#include <libcamera/base/object.h>
>  
>  #include <algorithm>
>  
> -#include <libcamera/signal.h>
> -
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/semaphore.h>
> +#include <libcamera/base/signal.h>
> +#include <libcamera/base/thread.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/semaphore.h"
> -#include "libcamera/internal/thread.h"
> -
>  /**
> - * \file object.h
> + * \file base/object.h
>   * \brief Base object to support automatic signal disconnection
>   */
>  
> diff --git a/src/libcamera/semaphore.cpp b/src/libcamera/base/semaphore.cpp
> similarity index 96%
> rename from src/libcamera/semaphore.cpp
> rename to src/libcamera/base/semaphore.cpp
> index d8988a9189e8..7aedc6a8c48b 100644
> --- a/src/libcamera/semaphore.cpp
> +++ b/src/libcamera/base/semaphore.cpp
> @@ -5,11 +5,11 @@
>   * semaphore.cpp - General-purpose counting semaphore
>   */
>  
> -#include "libcamera/internal/semaphore.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/semaphore.h>
> +#include <libcamera/base/thread.h>
>  
>  /**
> - * \file semaphore.h
> + * \file base/semaphore.h
>   * \brief General-purpose counting semaphore
>   */
>  
> diff --git a/src/libcamera/signal.cpp b/src/libcamera/base/signal.cpp
> similarity index 98%
> rename from src/libcamera/signal.cpp
> rename to src/libcamera/base/signal.cpp
> index 2532df3c3073..298b2d4b3619 100644
> --- a/src/libcamera/signal.cpp
> +++ b/src/libcamera/base/signal.cpp
> @@ -5,12 +5,12 @@
>   * signal.cpp - Signal & slot implementation
>   */
>  
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>  
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/thread.h>
>  
>  /**
> - * \file signal.h
> + * \file base/signal.h
>   * \brief Signal & slot implementation
>   */
>  
> diff --git a/src/libcamera/thread.cpp b/src/libcamera/base/thread.cpp
> similarity index 98%
> rename from src/libcamera/thread.cpp
> rename to src/libcamera/base/thread.cpp
> index 91e4737ad032..c7c2d6b29d6a 100644
> --- a/src/libcamera/thread.cpp
> +++ b/src/libcamera/base/thread.cpp
> @@ -5,7 +5,7 @@
>   * thread.cpp - Thread support
>   */
>  
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/thread.h>
>  
>  #include <atomic>
>  #include <condition_variable>
> @@ -14,10 +14,10 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/event_dispatcher_poll.h"
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/message.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/event_dispatcher_poll.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/message.h>
>  
>  /**
>   * \page thread Thread Support
> @@ -102,7 +102,7 @@
>   */
>  
>  /**
> - * \file thread.h
> + * \file base/thread.h
>   * \brief Thread support
>   */
>  
> diff --git a/src/libcamera/timer.cpp b/src/libcamera/base/timer.cpp
> similarity index 94%
> rename from src/libcamera/timer.cpp
> rename to src/libcamera/base/timer.cpp
> index 9496671edffc..9c54352d46bd 100644
> --- a/src/libcamera/timer.cpp
> +++ b/src/libcamera/base/timer.cpp
> @@ -5,21 +5,20 @@
>   * timer.cpp - Generic timer
>   */
>  
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/timer.h>
>  
>  #include <chrono>
>  
> -#include <libcamera/camera_manager.h>
> -
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/thread.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/camera_manager.h>
>  
>  /**
> - * \file timer.h
> + * \file base/timer.h
>   * \brief Generic timer
>   */
>  
> diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp
> index ca999429dce5..e4c345d518da 100644
> --- a/src/libcamera/buffer.cpp
> +++ b/src/libcamera/buffer.cpp
> @@ -13,7 +13,7 @@
>  #include <sys/mman.h>
>  #include <unistd.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  /**
>   * \file libcamera/buffer.h
> diff --git a/src/libcamera/byte_stream_buffer.cpp b/src/libcamera/byte_stream_buffer.cpp
> index 7fc6f6944471..b67bb928f8c1 100644
> --- a/src/libcamera/byte_stream_buffer.cpp
> +++ b/src/libcamera/byte_stream_buffer.cpp
> @@ -10,7 +10,7 @@
>  #include <stdint.h>
>  #include <string.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  /**
>   * \file byte_stream_buffer.h
> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
> index 1340c266cc5f..de0123aeafca 100644
> --- a/src/libcamera/camera.cpp
> +++ b/src/libcamera/camera.cpp
> @@ -11,13 +11,14 @@
>  #include <atomic>
>  #include <iomanip>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +
>  #include <libcamera/framebuffer_allocator.h>
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>  
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
> -#include "libcamera/internal/thread.h"
>  
>  /**
>   * \file camera.h
> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp
> index a3784db6e697..fc3bd88c737b 100644
> --- a/src/libcamera/camera_manager.cpp
> +++ b/src/libcamera/camera_manager.cpp
> @@ -14,12 +14,13 @@
>  
>  #include <libcamera/base/utils.h>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +
>  #include "libcamera/internal/device_enumerator.h"
>  #include "libcamera/internal/ipa_manager.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
>  
>  /**
>   * \file camera_manager.h
> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp
> index fc4ea78d1fc7..7b7279efbba8 100644
> --- a/src/libcamera/camera_sensor_properties.cpp
> +++ b/src/libcamera/camera_sensor_properties.cpp
> @@ -9,9 +9,9 @@
>  
>  #include <map>
>  
> -#include <libcamera/control_ids.h>
> +#include <libcamera/base/log.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/control_ids.h>
>  
>  /**
>   * \file camera_sensor_properties.h
> diff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp
> index 097444130ef7..dd5a26083747 100644
> --- a/src/libcamera/control_serializer.cpp
> +++ b/src/libcamera/control_serializer.cpp
> @@ -11,13 +11,14 @@
>  #include <memory>
>  #include <vector>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
>  #include <libcamera/ipa/ipa_controls.h>
>  #include <libcamera/span.h>
>  
>  #include "libcamera/internal/byte_stream_buffer.h"
> -#include "libcamera/internal/log.h"
>  
>  /**
>   * \file control_serializer.h
> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
> index 7df372ad3b6c..34317fa0f65d 100644
> --- a/src/libcamera/controls.cpp
> +++ b/src/libcamera/controls.cpp
> @@ -12,10 +12,10 @@
>  #include <string>
>  #include <string.h>
>  
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>  
>  #include "libcamera/internal/control_validator.h"
> -#include "libcamera/internal/log.h"
>  
>  /**
>   * \file controls.h
> diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp
> index 0bf81b510d16..90ce7e0b5b52 100644
> --- a/src/libcamera/delayed_controls.cpp
> +++ b/src/libcamera/delayed_controls.cpp
> @@ -7,9 +7,10 @@
>  
>  #include "libcamera/internal/delayed_controls.h"
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/controls.h>
>  
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/v4l2_device.h"
>  
>  /**
> diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
> index e6ecc360e32f..1f33faf5e7aa 100644
> --- a/src/libcamera/device_enumerator.cpp
> +++ b/src/libcamera/device_enumerator.cpp
> @@ -11,7 +11,8 @@
>  
>  #include <string.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/media_device.h"
>  
>  /**
> diff --git a/src/libcamera/device_enumerator_sysfs.cpp b/src/libcamera/device_enumerator_sysfs.cpp
> index ff72885288c3..686bb8099485 100644
> --- a/src/libcamera/device_enumerator_sysfs.cpp
> +++ b/src/libcamera/device_enumerator_sysfs.cpp
> @@ -17,7 +17,8 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/media_device.h"
>  
>  namespace libcamera {
> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp
> index d26fcf10b3c4..4b842773fcd6 100644
> --- a/src/libcamera/device_enumerator_udev.cpp
> +++ b/src/libcamera/device_enumerator_udev.cpp
> @@ -17,8 +17,9 @@
>  #include <sys/sysmacros.h>
>  #include <unistd.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  
>  namespace libcamera {
> diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp
> index 6b0575c0db77..784016a9f907 100644
> --- a/src/libcamera/event_notifier.cpp
> +++ b/src/libcamera/event_notifier.cpp
> @@ -9,9 +9,9 @@
>  
>  #include <libcamera/camera_manager.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/thread.h>
>  
>  /**
>   * \file event_notifier.h
> diff --git a/src/libcamera/file.cpp b/src/libcamera/file.cpp
> index bce2b6138239..def0f60d044b 100644
> --- a/src/libcamera/file.cpp
> +++ b/src/libcamera/file.cpp
> @@ -14,7 +14,7 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  /**
>   * \file file.h
> diff --git a/src/libcamera/file_descriptor.cpp b/src/libcamera/file_descriptor.cpp
> index 8b505ed3b6b2..638b3bbe0449 100644
> --- a/src/libcamera/file_descriptor.cpp
> +++ b/src/libcamera/file_descriptor.cpp
> @@ -11,7 +11,7 @@
>  #include <unistd.h>
>  #include <utility>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  /**
>   * \file file_descriptor.h
> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
> index 55822f4cc97b..f5fbaf0b95f9 100644
> --- a/src/libcamera/formats.cpp
> +++ b/src/libcamera/formats.cpp
> @@ -12,7 +12,7 @@
>  
>  #include <libcamera/formats.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  /**
>   * \file internal/formats.h
> diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp
> index 2fbba37a1b0b..86a57923286c 100644
> --- a/src/libcamera/framebuffer_allocator.cpp
> +++ b/src/libcamera/framebuffer_allocator.cpp
> @@ -9,11 +9,12 @@
>  
>  #include <errno.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/stream.h>
>  
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  
>  /**
> diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp
> index 136446895eb6..9bbef0b537f1 100644
> --- a/src/libcamera/geometry.cpp
> +++ b/src/libcamera/geometry.cpp
> @@ -10,7 +10,7 @@
>  #include <sstream>
>  #include <stdint.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  /**
>   * \file geometry.h
> diff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp
> index 131b3bd616fd..fb941e6bcd8a 100644
> --- a/src/libcamera/ipa_data_serializer.cpp
> +++ b/src/libcamera/ipa_data_serializer.cpp
> @@ -7,7 +7,7 @@
>  
>  #include "libcamera/internal/ipa_data_serializer.h"
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  /**
>   * \file ipa_data_serializer.h
> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
> index 263cacd64737..35c7259801fa 100644
> --- a/src/libcamera/ipa_manager.cpp
> +++ b/src/libcamera/ipa_manager.cpp
> @@ -12,12 +12,12 @@
>  #include <string.h>
>  #include <sys/types.h>
>  
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>  
>  #include "libcamera/internal/file.h"
>  #include "libcamera/internal/ipa_module.h"
>  #include "libcamera/internal/ipa_proxy.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  
>  /**
> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp
> index a4e7fb861138..7ab5557916e7 100644
> --- a/src/libcamera/ipa_module.cpp
> +++ b/src/libcamera/ipa_module.cpp
> @@ -23,10 +23,10 @@
>  
>  #include <libcamera/span.h>
>  
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>  
>  #include "libcamera/internal/file.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  
>  /**
> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp
> index ca980ec705a6..babcc48bcfd0 100644
> --- a/src/libcamera/ipa_proxy.cpp
> +++ b/src/libcamera/ipa_proxy.cpp
> @@ -12,10 +12,10 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>  
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>  
>  #include "libcamera/internal/ipa_module.h"
> -#include "libcamera/internal/log.h"
>  
>  /**
>   * \file ipa_proxy.h
> diff --git a/src/libcamera/ipc_pipe.cpp b/src/libcamera/ipc_pipe.cpp
> index c402c8d08699..28e20e031623 100644
> --- a/src/libcamera/ipc_pipe.cpp
> +++ b/src/libcamera/ipc_pipe.cpp
> @@ -7,7 +7,7 @@
>  
>  #include "libcamera/internal/ipc_pipe.h"
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  /**
>   * \file ipc_pipe.h
> diff --git a/src/libcamera/ipc_pipe_unixsocket.cpp b/src/libcamera/ipc_pipe_unixsocket.cpp
> index db0e260f22b1..4511775fb467 100644
> --- a/src/libcamera/ipc_pipe_unixsocket.cpp
> +++ b/src/libcamera/ipc_pipe_unixsocket.cpp
> @@ -9,13 +9,14 @@
>  
>  #include <vector>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/ipc_pipe.h"
>  #include "libcamera/internal/ipc_unixsocket.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  
>  namespace libcamera {
>  
> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp
> index fdb359f7fcd1..1466597077d4 100644
> --- a/src/libcamera/ipc_unixsocket.cpp
> +++ b/src/libcamera/ipc_unixsocket.cpp
> @@ -12,8 +12,9 @@
>  #include <sys/socket.h>
>  #include <unistd.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
>  
>  /**
>   * \file ipc_unixsocket.h
> diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp
> index 9ec84e560b77..e12ab1abb10d 100644
> --- a/src/libcamera/media_device.cpp
> +++ b/src/libcamera/media_device.cpp
> @@ -18,7 +18,7 @@
>  
>  #include <linux/media.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  /**
>   * \file media_device.h
> diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp
> index 94aeb50402ca..815edc8e3b2d 100644
> --- a/src/libcamera/media_object.cpp
> +++ b/src/libcamera/media_object.cpp
> @@ -15,7 +15,8 @@
>  
>  #include <linux/media.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/media_device.h"
>  
>  /**
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> index a341004c0c19..86212cec0281 100644
> --- a/src/libcamera/meson.build
> +++ b/src/libcamera/meson.build
> @@ -2,7 +2,6 @@
>  
>  libcamera_sources = files([
>      'bayer_format.cpp',
> -    'bound_method.cpp',
>      'buffer.cpp',
>      'byte_stream_buffer.cpp',
>      'camera.cpp',
> @@ -16,8 +15,6 @@ libcamera_sources = files([
>      'delayed_controls.cpp',
>      'device_enumerator.cpp',
>      'device_enumerator_sysfs.cpp',
> -    'event_dispatcher.cpp',
> -    'event_dispatcher_poll.cpp',
>      'event_notifier.cpp',
>      'file.cpp',
>      'file_descriptor.cpp',
> @@ -33,23 +30,16 @@ libcamera_sources = files([
>      'ipc_pipe.cpp',
>      'ipc_pipe_unixsocket.cpp',
>      'ipc_unixsocket.cpp',
> -    'log.cpp',
>      'media_device.cpp',
>      'media_object.cpp',
> -    'message.cpp',
> -    'object.cpp',
>      'pipeline_handler.cpp',
>      'pixel_format.cpp',
>      'process.cpp',
>      'pub_key.cpp',
>      'request.cpp',
> -    'semaphore.cpp',
> -    'signal.cpp',
>      'source-paths.cpp',
>      'stream.cpp',
>      'sysfs.cpp',
> -    'thread.cpp',
> -    'timer.cpp',
>      'transform.cpp',
>      'v4l2_device.cpp',
>      'v4l2_pixelformat.cpp',
> @@ -128,7 +118,6 @@ libcamera_deps = [
>      liblttng,
>      libudev,
>      libcamera_base,
> -    dependency('threads'),
>  ]
>  
>  # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.
> diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h
> index d8d4a181ffd1..f28e9f1ddf42 100644
> --- a/src/libcamera/pipeline/ipu3/cio2.h
> +++ b/src/libcamera/pipeline/ipu3/cio2.h
> @@ -11,7 +11,7 @@
>  #include <queue>
>  #include <vector>
>  
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>  
>  #include "libcamera/internal/v4l2_subdevice.h"
>  #include "libcamera/internal/v4l2_videodevice.h"
> diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h
> index 59e64e8170a2..3ef7e4454693 100644
> --- a/src/libcamera/pipeline/ipu3/frames.h
> +++ b/src/libcamera/pipeline/ipu3/frames.h
> @@ -12,7 +12,7 @@
>  #include <queue>
>  #include <vector>
>  
> -#include <libcamera/signal.h>
> +#include <libcamera/base/signal.h>
>  
>  namespace libcamera {
>  
> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
> index 32d143a862b2..e955bc3456ba 100644
> --- a/src/libcamera/pipeline/ipu3/imgu.cpp
> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp
> @@ -13,12 +13,12 @@
>  
>  #include <linux/media-bus-format.h>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/formats.h>
>  #include <libcamera/stream.h>
>  
> -#include <libcamera/base/utils.h>
> -
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  
>  namespace libcamera {
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 6b43ad2fb2b1..76c3bb3d8aa9 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -11,6 +11,9 @@
>  #include <queue>
>  #include <vector>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/formats.h>
> @@ -20,13 +23,10 @@
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>  
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/delayed_controls.h"
>  #include "libcamera/internal/device_enumerator.h"
>  #include "libcamera/internal/ipa_manager.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  
> diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
> index 4d5dd6cb87cc..573ea11de607 100644
> --- a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
> @@ -14,7 +14,7 @@
>  #include <sys/ioctl.h>
>  #include <unistd.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  /*
>   * /dev/dma-heap/linux,cma is the dma-heap allocator, which allows dmaheap-cma
> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> index f2430415d32d..b3265d0e8aab 100644
> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
> @@ -6,9 +6,9 @@
>   */
>  #include "rpi_stream.h"
>  
> -#include <libcamera/ipa/raspberrypi_ipa_interface.h>
> +#include <libcamera/base/log.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/ipa/raspberrypi_ipa_interface.h>
>  
>  namespace libcamera {
>  
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index c625d7248f5c..00df4f0b3e6b 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -14,6 +14,9 @@
>  
>  #include <linux/media-bus-format.h>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
> @@ -24,13 +27,10 @@
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>  
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/delayed_controls.h"
>  #include "libcamera/internal/device_enumerator.h"
>  #include "libcamera/internal/ipa_manager.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/v4l2_subdevice.h"
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
> index 3b3e37d258d0..c185ac3992dd 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
> @@ -10,10 +10,11 @@
>  #include <memory>
>  #include <vector>
>  
> +#include <libcamera/base/signal.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/geometry.h>
>  #include <libcamera/pixel_format.h>
> -#include <libcamera/signal.h>
>  #include <libcamera/span.h>
>  
>  #include "libcamera/internal/media_object.h"
> diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp
> index 589f185b1bf1..9af1096be834 100644
> --- a/src/libcamera/pipeline/simple/converter.cpp
> +++ b/src/libcamera/pipeline/simple/converter.cpp
> @@ -10,14 +10,14 @@
>  #include <algorithm>
>  #include <limits.h>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/geometry.h>
> -#include <libcamera/signal.h>
>  #include <libcamera/stream.h>
>  
> -#include <libcamera/base/utils.h>
> -
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/v4l2_videodevice.h"
>  
> diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h
> index 480e528d2210..276a2a291c21 100644
> --- a/src/libcamera/pipeline/simple/converter.h
> +++ b/src/libcamera/pipeline/simple/converter.h
> @@ -16,9 +16,9 @@
>  #include <vector>
>  
>  #include <libcamera/pixel_format.h>
> -#include <libcamera/signal.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/signal.h>
>  
>  namespace libcamera {
>  
> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
> index 1894014d8fc7..4d78e6faf403 100644
> --- a/src/libcamera/pipeline/simple/simple.cpp
> +++ b/src/libcamera/pipeline/simple/simple.cpp
> @@ -21,6 +21,8 @@
>  
>  #include <linux/media-bus-format.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/request.h>
> @@ -28,7 +30,6 @@
>  
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/v4l2_subdevice.h"
> diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> index d8c17dccae53..0f634b8da609 100644
> --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
> @@ -12,6 +12,9 @@
>  #include <memory>
>  #include <tuple>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
> @@ -19,10 +22,7 @@
>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>  
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/sysfs.h"
> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
> index 025ca56205f8..361b715778ef 100644
> --- a/src/libcamera/pipeline/vimc/vimc.cpp
> +++ b/src/libcamera/pipeline/vimc/vimc.cpp
> @@ -14,21 +14,23 @@
>  #include <linux/media-bus-format.h>
>  #include <linux/version.h>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/controls.h>
>  #include <libcamera/formats.h>
>  #include <libcamera/ipa/ipa_interface.h>
>  #include <libcamera/ipa/ipa_module_info.h>
> +#include <libcamera/ipa/vimc_ipa_interface.h>
> +#include <libcamera/ipa/vimc_ipa_proxy.h>

I thought these are already included below?

>  #include <libcamera/request.h>
>  #include <libcamera/stream.h>
>  
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/device_enumerator.h"
>  #include "libcamera/internal/ipa_manager.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/v4l2_subdevice.h"

Like below here.

With that resolved,

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
> index 6fb2a743c3c2..f626eddd321f 100644
> --- a/src/libcamera/pipeline_handler.cpp
> +++ b/src/libcamera/pipeline_handler.cpp
> @@ -9,14 +9,14 @@
>  
>  #include <sys/sysmacros.h>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/utils.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/camera_manager.h>
>  
> -#include <libcamera/base/utils.h>
> -
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/tracepoints.h"
>  
> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp
> index 35091f60c1e9..463380299a65 100644
> --- a/src/libcamera/process.cpp
> +++ b/src/libcamera/process.cpp
> @@ -20,10 +20,10 @@
>  #include <unistd.h>
>  #include <vector>
>  
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>  
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
>  
>  /**
>   * \file process.h
> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
> index 6611e74d1800..518384eb8cf6 100644
> --- a/src/libcamera/request.cpp
> +++ b/src/libcamera/request.cpp
> @@ -10,13 +10,14 @@
>  #include <map>
>  #include <sstream>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/control_ids.h>
>  #include <libcamera/stream.h>
>  
>  #include "libcamera/internal/camera_controls.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/tracepoints.h"
>  
>  /**
> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
> index d5d68427e658..b8626775d224 100644
> --- a/src/libcamera/stream.cpp
> +++ b/src/libcamera/stream.cpp
> @@ -15,9 +15,9 @@
>  
>  #include <libcamera/request.h>
>  
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/log.h"
>  
>  /**
>   * \file stream.h
> diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp
> index e9004b2b59c8..4372b1348178 100644
> --- a/src/libcamera/sysfs.cpp
> +++ b/src/libcamera/sysfs.cpp
> @@ -12,8 +12,9 @@
>  #include <sys/stat.h>
>  #include <sys/sysmacros.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/file.h"
> -#include "libcamera/internal/log.h"
>  
>  /**
>   * \file sysfs.h
> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
> index facb53e13169..334b9b78b812 100644
> --- a/src/libcamera/v4l2_device.cpp
> +++ b/src/libcamera/v4l2_device.cpp
> @@ -16,10 +16,10 @@
>  #include <sys/syscall.h>
>  #include <unistd.h>
>  
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>  
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/sysfs.h"
>  
>  /**
> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
> index 166d93cf1d20..87d728fe5577 100644
> --- a/src/libcamera/v4l2_pixelformat.cpp
> +++ b/src/libcamera/v4l2_pixelformat.cpp
> @@ -12,11 +12,12 @@
>  #include <map>
>  #include <string.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/formats.h>
>  #include <libcamera/pixel_format.h>
>  
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>  
>  /**
>   * \file v4l2_pixelformat.h
> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
> index 2c56cfafbce4..8fe5e45b31ee 100644
> --- a/src/libcamera/v4l2_subdevice.cpp
> +++ b/src/libcamera/v4l2_subdevice.cpp
> @@ -19,9 +19,9 @@
>  
>  #include <libcamera/geometry.h>
>  
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/media_object.h"
>  
> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
> index 12c09dc7578d..dc23510bc5aa 100644
> --- a/src/libcamera/v4l2_videodevice.cpp
> +++ b/src/libcamera/v4l2_videodevice.cpp
> @@ -21,10 +21,11 @@
>  
>  #include <linux/version.h>
>  
> +#include <libcamera/base/log.h>
> +
>  #include <libcamera/file_descriptor.h>
>  
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/media_device.h"
>  #include "libcamera/internal/media_object.h"
>  
> diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp
> index 97825c715bba..157ab94e0544 100644
> --- a/src/v4l2/v4l2_camera.cpp
> +++ b/src/v4l2/v4l2_camera.cpp
> @@ -10,7 +10,7 @@
>  #include <errno.h>
>  #include <unistd.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/base/log.h>
>  
>  using namespace libcamera;
>  
> diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
> index d238046250e3..dbe0573bd3a4 100644
> --- a/src/v4l2/v4l2_camera.h
> +++ b/src/v4l2/v4l2_camera.h
> @@ -12,13 +12,13 @@
>  #include <mutex>
>  #include <utility>
>  
> +#include <libcamera/base/semaphore.h>
> +
>  #include <libcamera/buffer.h>
>  #include <libcamera/camera.h>
>  #include <libcamera/file_descriptor.h>
>  #include <libcamera/framebuffer_allocator.h>
>  
> -#include "libcamera/internal/semaphore.h"
> -
>  using namespace libcamera;
>  
>  class V4L2Camera
> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
> index a5a25507462e..7682c4bddf90 100644
> --- a/src/v4l2/v4l2_camera_proxy.cpp
> +++ b/src/v4l2/v4l2_camera_proxy.cpp
> @@ -18,12 +18,12 @@
>  
>  #include <libcamera/camera.h>
>  #include <libcamera/formats.h>
> -#include <libcamera/object.h>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/object.h>
>  #include <libcamera/base/utils.h>
>  
>  #include "libcamera/internal/formats.h"
> -#include "libcamera/internal/log.h"
>  
>  #include "v4l2_camera.h"
>  #include "v4l2_camera_file.h"
> diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp
> index 27de6c50ff4e..e566125a70ac 100644
> --- a/src/v4l2/v4l2_compat_manager.cpp
> +++ b/src/v4l2/v4l2_compat_manager.cpp
> @@ -19,12 +19,11 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>  
> -#include <libcamera/camera.h>
> -#include <libcamera/camera_manager.h>
> -
> +#include <libcamera/base/log.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/camera.h>
> +#include <libcamera/camera_manager.h>
>  
>  #include "v4l2_camera_file.h"
>  
> diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp
> index 61f4eb92ae95..c504ea09e64b 100644
> --- a/test/camera/buffer_import.cpp
> +++ b/test/camera/buffer_import.cpp
> @@ -12,11 +12,12 @@
>  #include <numeric>
>  #include <vector>
>  
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/media_device.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  #include "libcamera/internal/v4l2_videodevice.h"
>  
>  #include "buffer_source.h"
> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp
> index c4bc21100777..238d98dbba16 100644
> --- a/test/camera/capture.cpp
> +++ b/test/camera/capture.cpp
> @@ -9,9 +9,9 @@
>  
>  #include <libcamera/framebuffer_allocator.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  
>  #include "camera_test.h"
>  #include "test.h"
> diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp
> index 8ae05ac62985..1cc17b045ec0 100644
> --- a/test/event-dispatcher.cpp
> +++ b/test/event-dispatcher.cpp
> @@ -10,9 +10,9 @@
>  #include <signal.h>
>  #include <sys/time.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  
>  #include "test.h"
>  
> diff --git a/test/event-thread.cpp b/test/event-thread.cpp
> index aeb8b3bf4bac..05c5d26d3611 100644
> --- a/test/event-thread.cpp
> +++ b/test/event-thread.cpp
> @@ -10,9 +10,10 @@
>  #include <string.h>
>  #include <unistd.h>
>  
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  
>  #include "test.h"
>  
> diff --git a/test/event.cpp b/test/event.cpp
> index 1f16c97bbab5..aa79da99c286 100644
> --- a/test/event.cpp
> +++ b/test/event.cpp
> @@ -9,10 +9,11 @@
>  #include <string.h>
>  #include <unistd.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/event_notifier.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  
>  #include "test.h"
>  
> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp
> index 94cb859352ec..bb160537c5d5 100644
> --- a/test/hotplug-cameras.cpp
> +++ b/test/hotplug-cameras.cpp
> @@ -14,10 +14,11 @@
>  #include <libcamera/camera.h>
>  #include <libcamera/camera_manager.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/file.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  
>  #include "test.h"
>  
> diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp
> index d6ca6f5137b0..656d86552d85 100644
> --- a/test/ipa/ipa_interface_test.cpp
> +++ b/test/ipa/ipa_interface_test.cpp
> @@ -14,15 +14,16 @@
>  
>  #include <libcamera/ipa/vimc_ipa_proxy.h>
>  
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/event_notifier.h"
>  #include "libcamera/internal/ipa_manager.h"
>  #include "libcamera/internal/ipa_module.h"
>  #include "libcamera/internal/pipeline_handler.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  
>  #include "test.h"
>  
> diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp
> index 80157b342795..aa35c8f071f1 100644
> --- a/test/ipc/unixsocket.cpp
> +++ b/test/ipc/unixsocket.cpp
> @@ -16,10 +16,11 @@
>  #include <sys/wait.h>
>  #include <unistd.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/ipc_unixsocket.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  
>  #include "test.h"
>  
> diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp
> index 161d09b98719..6fe7fd9b8fc5 100644
> --- a/test/ipc/unixsocket_ipc.cpp
> +++ b/test/ipc/unixsocket_ipc.cpp
> @@ -15,19 +15,18 @@
>  #include <sys/wait.h>
>  #include <unistd.h>
>  
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/ipa_data_serializer.h"
>  #include "libcamera/internal/ipc_pipe.h"
>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  
>  #include "test.h"
>  
> -
>  using namespace std;
>  using namespace libcamera;
>  
> diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp
> index ae3c607a6881..5311896095a9 100644
> --- a/test/log/log_api.cpp
> +++ b/test/log/log_api.cpp
> @@ -16,9 +16,9 @@
>  #include <sys/types.h>
>  #include <unistd.h>
>  
> -#include <libcamera/logging.h>
> +#include <libcamera/base/log.h>
>  
> -#include "libcamera/internal/log.h"
> +#include <libcamera/logging.h>
>  
>  #include "test.h"
>  
> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp
> index 413d9207ea68..d138aa7ff562 100644
> --- a/test/log/log_process.cpp
> +++ b/test/log/log_process.cpp
> @@ -16,13 +16,13 @@
>  
>  #include <libcamera/logging.h>
>  
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  
>  #include "test.h"
>  
> diff --git a/test/message.cpp b/test/message.cpp
> index 9553ba8cbaed..eeea57feab76 100644
> --- a/test/message.cpp
> +++ b/test/message.cpp
> @@ -9,8 +9,8 @@
>  #include <iostream>
>  #include <thread>
>  
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/thread.h>
>  
>  #include "test.h"
>  
> diff --git a/test/object-delete.cpp b/test/object-delete.cpp
> index a1a6f5ccefd5..eabefe935974 100644
> --- a/test/object-delete.cpp
> +++ b/test/object-delete.cpp
> @@ -7,9 +7,8 @@
>  
>  #include <iostream>
>  
> -#include <libcamera/object.h>
> -
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/thread.h>
>  
>  #include "test.h"
>  
> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp
> index a6f816f395eb..b1c0f473ba5c 100644
> --- a/test/object-invoke.cpp
> +++ b/test/object-invoke.cpp
> @@ -8,10 +8,9 @@
>  #include <iostream>
>  #include <thread>
>  
> -#include <libcamera/object.h>
> -
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/thread.h>
>  
>  #include "test.h"
>  
> diff --git a/test/object.cpp b/test/object.cpp
> index 264659b405d9..cbd0d3ececab 100644
> --- a/test/object.cpp
> +++ b/test/object.cpp
> @@ -7,10 +7,9 @@
>  
>  #include <iostream>
>  
> -#include <libcamera/object.h>
> -
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/thread.h>
>  
>  #include "test.h"
>  
> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp
> index a5155bae3162..8f7a1f05f681 100644
> --- a/test/process/process_test.cpp
> +++ b/test/process/process_test.cpp
> @@ -9,12 +9,13 @@
>  #include <unistd.h>
>  #include <vector>
>  
> +
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  
>  #include "test.h"
>  
> diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp
> index dbbba8912386..880bcd02c6be 100644
> --- a/test/serialization/ipa_data_serializer_test.cpp
> +++ b/test/serialization/ipa_data_serializer_test.cpp
> @@ -17,13 +17,14 @@
>  #include <unistd.h>
>  #include <vector>
>  
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/device_enumerator.h"
>  #include "libcamera/internal/ipa_data_serializer.h"
>  #include "libcamera/internal/ipa_manager.h"
>  #include "libcamera/internal/ipa_module.h"
>  #include "libcamera/internal/pipeline_handler.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  
>  #include "serialization_test.h"
>  #include "test.h"
> diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp
> index 8a96b5d2abb3..d5e2eb662df2 100644
> --- a/test/signal-threads.cpp
> +++ b/test/signal-threads.cpp
> @@ -9,11 +9,10 @@
>  #include <iostream>
>  #include <thread>
>  
> +#include <libcamera/base/message.h>
> +#include <libcamera/base/thread.h>
>  #include <libcamera/base/utils.h>
>  
> -#include "libcamera/internal/message.h"
> -#include "libcamera/internal/thread.h"
> -
>  #include "test.h"
>  
>  using namespace std;
> diff --git a/test/signal.cpp b/test/signal.cpp
> index f83ceb05f091..aceb02789cf4 100644
> --- a/test/signal.cpp
> +++ b/test/signal.cpp
> @@ -8,8 +8,8 @@
>  #include <iostream>
>  #include <string.h>
>  
> -#include <libcamera/object.h>
> -#include <libcamera/signal.h>
> +#include <libcamera/base/object.h>
> +#include <libcamera/base/signal.h>
>  
>  #include "test.h"
>  
> diff --git a/test/threads.cpp b/test/threads.cpp
> index e0c50dc90a65..d83b5833998f 100644
> --- a/test/threads.cpp
> +++ b/test/threads.cpp
> @@ -10,7 +10,7 @@
>  #include <memory>
>  #include <thread>
>  
> -#include "libcamera/internal/thread.h"
> +#include <libcamera/base/thread.h>
>  
>  #include "test.h"
>  
> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp
> index be29eee1bdb6..2c14865b74d5 100644
> --- a/test/timer-thread.cpp
> +++ b/test/timer-thread.cpp
> @@ -8,9 +8,9 @@
>  #include <chrono>
>  #include <iostream>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  
>  #include "test.h"
>  
> diff --git a/test/timer.cpp b/test/timer.cpp
> index fc90b11040d8..88f226e79f5f 100644
> --- a/test/timer.cpp
> +++ b/test/timer.cpp
> @@ -8,9 +8,9 @@
>  #include <chrono>
>  #include <iostream>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  
>  #include "test.h"
>  
> diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp
> index c75259be0d10..91b3e4a0dad6 100644
> --- a/test/v4l2_videodevice/buffer_sharing.cpp
> +++ b/test/v4l2_videodevice/buffer_sharing.cpp
> @@ -14,9 +14,9 @@
>  
>  #include <libcamera/buffer.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  
>  #include "v4l2_videodevice_test.h"
>  
> diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp
> index accdb34a699c..f12c8bef97f6 100644
> --- a/test/v4l2_videodevice/capture_async.cpp
> +++ b/test/v4l2_videodevice/capture_async.cpp
> @@ -9,9 +9,9 @@
>  
>  #include <libcamera/buffer.h>
>  
> -#include "libcamera/internal/event_dispatcher.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
>  
>  #include "v4l2_videodevice_test.h"
>  
> diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
> index e0f068082c01..fe4b3cc6487f 100644
> --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp
> +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
> @@ -9,11 +9,12 @@
>  
>  #include <libcamera/buffer.h>
>  
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/timer.h>
> +
>  #include "libcamera/internal/device_enumerator.h"
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/media_device.h"
> -#include "libcamera/internal/thread.h"
> -#include "libcamera/internal/timer.h"
>  #include "libcamera/internal/v4l2_videodevice.h"
>  
>  #include "test.h"
> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> index dc6748153445..5a64fe9cfeee 100644
> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> @@ -23,6 +23,9 @@
>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>
>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>
>  
> +#include <libcamera/base/log.h>
> +#include <libcamera/base/thread.h>
> +
>  #include "libcamera/internal/control_serializer.h"
>  #include "libcamera/internal/ipa_data_serializer.h"
>  #include "libcamera/internal/ipa_module.h"
> @@ -30,9 +33,7 @@
>  #include "libcamera/internal/ipc_pipe.h"
>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>  #include "libcamera/internal/ipc_unixsocket.h"
> -#include "libcamera/internal/log.h"
>  #include "libcamera/internal/process.h"
> -#include "libcamera/internal/thread.h"
>  
>  namespace libcamera {
>  
> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
> index 017b870c9dad..ae168548492c 100644
> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
> @@ -19,12 +19,13 @@
>  #include <libcamera/ipa/ipa_interface.h>
>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>
>  
> +#include <libcamera/base/thread.h>
> +
>  #include "libcamera/internal/control_serializer.h"
>  #include "libcamera/internal/ipa_proxy.h"
>  #include "libcamera/internal/ipc_pipe.h"
>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>  #include "libcamera/internal/ipc_unixsocket.h"
> -#include "libcamera/internal/thread.h"
>  
>  namespace libcamera {
>  {%- if has_namespace %}
> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
> index 8a57b6cc8b34..d993e39e5a5f 100644
> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
> @@ -26,17 +26,18 @@
>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>
>  #include <libcamera/logging.h>
>  
> +#include <libcamera/base/event_dispatcher.h>
> +#include <libcamera/base/thread.h>
> +#include <libcamera/base/log.h>
> +
>  #include "libcamera/internal/camera_sensor.h"
>  #include "libcamera/internal/control_serializer.h"
> -#include "libcamera/internal/event_dispatcher.h"
>  #include "libcamera/internal/ipa_data_serializer.h"
>  #include "libcamera/internal/ipa_module.h"
>  #include "libcamera/internal/ipa_proxy.h"
>  #include "libcamera/internal/ipc_pipe.h"
>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>  #include "libcamera/internal/ipc_unixsocket.h"
> -#include "libcamera/internal/log.h"
> -#include "libcamera/internal/thread.h"
>  
>  using namespace libcamera;
>  
> -- 
> 2.30.2
>
Kieran Bingham June 25, 2021, 10:47 a.m. UTC | #3
Hi Paul,

On 25/06/2021 05:31, paul.elder@ideasonboard.com wrote:
> On Fri, Jun 25, 2021 at 02:35:32AM +0100, Kieran Bingham wrote:
>> Move the functionality for the following components to the new
>> base support library:
>>
>>  - BoundMethod
>>  - EventDispatcher
>>  - EventDispatcherPoll
>>  - Log
>>  - Message
>>  - Object
>>  - Signal
>>  - Semaphore
>>  - Thread
>>  - Timer
>>
>> While it would be preferable to see these split to move one component
>> per commit, these components are all interdependant upon each other,
>> which leaves us with one big change performing the move for all of them.
>>
>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>> ---
>>  Documentation/guides/pipeline-handler.rst        |  3 ++-
>>  include/libcamera/{ => base}/bound_method.h      |  6 +++---
>>  .../{internal => base}/event_dispatcher.h        |  6 +++---
>>  .../{internal => base}/event_dispatcher_poll.h   |  8 ++++----
>>  include/libcamera/{internal => base}/log.h       |  6 +++---
>>  include/libcamera/base/meson.build               | 10 ++++++++++
>>  include/libcamera/{internal => base}/message.h   |  8 ++++----
>>  include/libcamera/{ => base}/object.h            |  8 ++++----
>>  include/libcamera/{internal => base}/semaphore.h |  8 ++++----
>>  include/libcamera/{ => base}/signal.h            | 10 +++++-----
>>  include/libcamera/{internal => base}/thread.h    | 12 +++++-------
>>  include/libcamera/{internal => base}/timer.h     | 10 +++++-----
>>  include/libcamera/camera.h                       |  4 ++--
>>  include/libcamera/camera_manager.h               |  5 ++---
>>  include/libcamera/internal/camera_sensor.h       |  2 +-
>>  include/libcamera/internal/device_enumerator.h   |  2 +-
>>  include/libcamera/internal/event_notifier.h      |  4 ++--
>>  include/libcamera/internal/ipa_data_serializer.h |  3 ++-
>>  include/libcamera/internal/ipa_manager.h         |  3 ++-
>>  include/libcamera/internal/ipa_module.h          |  3 ++-
>>  include/libcamera/internal/ipc_pipe.h            |  4 ++--
>>  include/libcamera/internal/ipc_unixsocket.h      |  2 +-
>>  include/libcamera/internal/media_device.h        |  4 ++--
>>  include/libcamera/internal/meson.build           |  7 -------
>>  include/libcamera/internal/pipeline_handler.h    |  2 +-
>>  include/libcamera/internal/process.h             |  2 +-
>>  include/libcamera/internal/v4l2_device.h         |  6 +++---
>>  include/libcamera/internal/v4l2_subdevice.h      |  2 +-
>>  include/libcamera/internal/v4l2_videodevice.h    |  4 ++--
>>  include/libcamera/ipa/ipa_interface.h            |  3 ++-
>>  include/libcamera/meson.build                    |  3 ---
>>  include/libcamera/request.h                      |  2 +-
>>  src/android/camera3_hal.cpp                      |  2 +-
>>  src/android/camera_capabilities.cpp              |  3 ++-
>>  src/android/camera_device.cpp                    |  9 ++++-----
>>  src/android/camera_device.h                      |  7 ++++---
>>  src/android/camera_hal_config.cpp                |  2 +-
>>  src/android/camera_hal_manager.cpp               |  4 ++--
>>  src/android/camera_metadata.cpp                  |  2 +-
>>  src/android/camera_worker.h                      |  6 +++---
>>  src/android/jpeg/encoder_libjpeg.cpp             |  3 ++-
>>  src/android/jpeg/exif.cpp                        |  3 +--
>>  src/android/jpeg/post_processor_jpeg.cpp         |  4 ++--
>>  src/android/jpeg/thumbnailer.cpp                 |  4 ++--
>>  src/android/mm/cros_camera_buffer.cpp            |  2 +-
>>  src/android/mm/generic_camera_buffer.cpp         |  3 ++-
>>  src/android/yuv/post_processor_yuv.cpp           |  3 ++-
>>  src/ipa/ipu3/ipu3.cpp                            |  3 ++-
>>  src/ipa/ipu3/ipu3_agc.cpp                        |  4 ++--
>>  src/ipa/ipu3/ipu3_awb.cpp                        |  2 +-
>>  src/ipa/libipa/histogram.cpp                     |  2 +-
>>  src/ipa/raspberrypi/cam_helper.hpp               |  4 ++--
>>  src/ipa/raspberrypi/controller/controller.cpp    |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/agc.cpp       |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/alsc.cpp      |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/awb.cpp       |  2 +-
>>  .../raspberrypi/controller/rpi/black_level.cpp   |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/ccm.cpp       |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/contrast.cpp  |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/dpc.cpp       |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/focus.cpp     |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/geq.cpp       |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/lux.cpp       |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/noise.cpp     |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/sdn.cpp       |  2 +-
>>  src/ipa/raspberrypi/controller/rpi/sharpen.cpp   |  2 +-
>>  src/ipa/raspberrypi/raspberrypi.cpp              |  7 ++++---
>>  src/ipa/rkisp1/rkisp1.cpp                        |  4 ++--
>>  src/ipa/vimc/vimc.cpp                            |  3 ++-
>>  src/libcamera/{ => base}/bound_method.cpp        | 11 +++++------
>>  src/libcamera/{ => base}/event_dispatcher.cpp    |  7 +++----
>>  .../{ => base}/event_dispatcher_poll.cpp         | 10 +++++-----
>>  src/libcamera/{ => base}/log.cpp                 |  7 +++----
>>  src/libcamera/base/meson.build                   | 11 +++++++++++
>>  src/libcamera/{ => base}/message.cpp             |  9 ++++-----
>>  src/libcamera/{ => base}/object.cpp              | 16 +++++++---------
>>  src/libcamera/{ => base}/semaphore.cpp           |  6 +++---
>>  src/libcamera/{ => base}/signal.cpp              |  6 +++---
>>  src/libcamera/{ => base}/thread.cpp              | 12 ++++++------
>>  src/libcamera/{ => base}/timer.cpp               | 15 +++++++--------
>>  src/libcamera/buffer.cpp                         |  2 +-
>>  src/libcamera/byte_stream_buffer.cpp             |  2 +-
>>  src/libcamera/camera.cpp                         |  5 +++--
>>  src/libcamera/camera_manager.cpp                 |  5 +++--
>>  src/libcamera/camera_sensor_properties.cpp       |  4 ++--
>>  src/libcamera/control_serializer.cpp             |  3 ++-
>>  src/libcamera/controls.cpp                       |  2 +-
>>  src/libcamera/delayed_controls.cpp               |  3 ++-
>>  src/libcamera/device_enumerator.cpp              |  3 ++-
>>  src/libcamera/device_enumerator_sysfs.cpp        |  3 ++-
>>  src/libcamera/device_enumerator_udev.cpp         |  3 ++-
>>  src/libcamera/event_notifier.cpp                 |  6 +++---
>>  src/libcamera/file.cpp                           |  2 +-
>>  src/libcamera/file_descriptor.cpp                |  2 +-
>>  src/libcamera/formats.cpp                        |  2 +-
>>  src/libcamera/framebuffer_allocator.cpp          |  3 ++-
>>  src/libcamera/geometry.cpp                       |  2 +-
>>  src/libcamera/ipa_data_serializer.cpp            |  2 +-
>>  src/libcamera/ipa_manager.cpp                    |  2 +-
>>  src/libcamera/ipa_module.cpp                     |  2 +-
>>  src/libcamera/ipa_proxy.cpp                      |  2 +-
>>  src/libcamera/ipc_pipe.cpp                       |  2 +-
>>  src/libcamera/ipc_pipe_unixsocket.cpp            |  9 +++++----
>>  src/libcamera/ipc_unixsocket.cpp                 |  3 ++-
>>  src/libcamera/media_device.cpp                   |  2 +-
>>  src/libcamera/media_object.cpp                   |  3 ++-
>>  src/libcamera/meson.build                        | 11 -----------
>>  src/libcamera/pipeline/ipu3/cio2.h               |  2 +-
>>  src/libcamera/pipeline/ipu3/frames.h             |  2 +-
>>  src/libcamera/pipeline/ipu3/imgu.cpp             |  6 +++---
>>  src/libcamera/pipeline/ipu3/ipu3.cpp             |  6 +++---
>>  src/libcamera/pipeline/raspberrypi/dma_heaps.cpp |  2 +-
>>  .../pipeline/raspberrypi/rpi_stream.cpp          |  4 ++--
>>  src/libcamera/pipeline/rkisp1/rkisp1.cpp         |  6 +++---
>>  src/libcamera/pipeline/rkisp1/rkisp1_path.h      |  3 ++-
>>  src/libcamera/pipeline/simple/converter.cpp      |  8 ++++----
>>  src/libcamera/pipeline/simple/converter.h        |  4 ++--
>>  src/libcamera/pipeline/simple/simple.cpp         |  3 ++-
>>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp     |  6 +++---
>>  src/libcamera/pipeline/vimc/vimc.cpp             |  8 +++++---
>>  src/libcamera/pipeline_handler.cpp               |  6 +++---
>>  src/libcamera/process.cpp                        |  2 +-
>>  src/libcamera/request.cpp                        |  3 ++-
>>  src/libcamera/stream.cpp                         |  2 +-
>>  src/libcamera/sysfs.cpp                          |  3 ++-
>>  src/libcamera/v4l2_device.cpp                    |  2 +-
>>  src/libcamera/v4l2_pixelformat.cpp               |  3 ++-
>>  src/libcamera/v4l2_subdevice.cpp                 |  2 +-
>>  src/libcamera/v4l2_videodevice.cpp               |  3 ++-
>>  src/v4l2/v4l2_camera.cpp                         |  2 +-
>>  src/v4l2/v4l2_camera.h                           |  4 ++--
>>  src/v4l2/v4l2_camera_proxy.cpp                   |  4 ++--
>>  src/v4l2/v4l2_compat_manager.cpp                 |  7 +++----
>>  test/camera/buffer_import.cpp                    |  7 ++++---
>>  test/camera/capture.cpp                          |  6 +++---
>>  test/event-dispatcher.cpp                        |  6 +++---
>>  test/event-thread.cpp                            |  5 +++--
>>  test/event.cpp                                   |  7 ++++---
>>  test/hotplug-cameras.cpp                         |  7 ++++---
>>  test/ipa/ipa_interface_test.cpp                  |  7 ++++---
>>  test/ipc/unixsocket.cpp                          |  7 ++++---
>>  test/ipc/unixsocket_ipc.cpp                      |  7 +++----
>>  test/log/log_api.cpp                             |  4 ++--
>>  test/log/log_process.cpp                         |  8 ++++----
>>  test/message.cpp                                 |  4 ++--
>>  test/object-delete.cpp                           |  5 ++---
>>  test/object-invoke.cpp                           |  7 +++----
>>  test/object.cpp                                  |  7 +++----
>>  test/process/process_test.cpp                    |  7 ++++---
>>  test/serialization/ipa_data_serializer_test.cpp  |  5 +++--
>>  test/signal-threads.cpp                          |  5 ++---
>>  test/signal.cpp                                  |  4 ++--
>>  test/threads.cpp                                 |  2 +-
>>  test/timer-thread.cpp                            |  6 +++---
>>  test/timer.cpp                                   |  6 +++---
>>  test/v4l2_videodevice/buffer_sharing.cpp         |  6 +++---
>>  test/v4l2_videodevice/capture_async.cpp          |  6 +++---
>>  test/v4l2_videodevice/v4l2_m2mdevice.cpp         |  7 ++++---
>>  .../module_ipa_proxy.cpp.tmpl                    |  5 +++--
>>  .../libcamera_templates/module_ipa_proxy.h.tmpl  |  3 ++-
>>  .../module_ipa_proxy_worker.cpp.tmpl             |  7 ++++---
>>  161 files changed, 384 insertions(+), 358 deletions(-)
>>  rename include/libcamera/{ => base}/bound_method.h (97%)
>>  rename include/libcamera/{internal => base}/event_dispatcher.h (79%)
>>  rename include/libcamera/{internal => base}/event_dispatcher_poll.h (82%)
>>  rename include/libcamera/{internal => base}/log.h (96%)
>>  rename include/libcamera/{internal => base}/message.h (87%)
>>  rename include/libcamera/{ => base}/object.h (89%)
>>  rename include/libcamera/{internal => base}/semaphore.h (74%)
>>  rename include/libcamera/{ => base}/signal.h (93%)
>>  rename include/libcamera/{internal => base}/thread.h (86%)
>>  rename include/libcamera/{internal => base}/timer.h (81%)
>>  rename src/libcamera/{ => base}/bound_method.cpp (94%)
>>  rename src/libcamera/{ => base}/event_dispatcher.cpp (97%)
>>  rename src/libcamera/{ => base}/event_dispatcher_poll.cpp (97%)
>>  rename src/libcamera/{ => base}/log.cpp (99%)
>>  rename src/libcamera/{ => base}/message.cpp (96%)
>>  rename src/libcamera/{ => base}/object.cpp (97%)
>>  rename src/libcamera/{ => base}/semaphore.cpp (96%)
>>  rename src/libcamera/{ => base}/signal.cpp (98%)
>>  rename src/libcamera/{ => base}/thread.cpp (98%)
>>  rename src/libcamera/{ => base}/timer.cpp (94%)
>>
>> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
>> index 3047e006e5b6..152776935a33 100644
>> --- a/Documentation/guides/pipeline-handler.rst
>> +++ b/Documentation/guides/pipeline-handler.rst
>> @@ -288,7 +288,8 @@ features:
>>  
>>  .. code-block:: cpp
>>  
>> -   #include "libcamera/internal/log.h"
>> +   #include <libcamera/base/log.h>
>> +   
>>     #include "libcamera/internal/pipeline_handler.h"
>>  
>>  Run the following commands:
>> diff --git a/include/libcamera/bound_method.h b/include/libcamera/base/bound_method.h
>> similarity index 97%
>> rename from include/libcamera/bound_method.h
>> rename to include/libcamera/base/bound_method.h
>> index 4fc445ecd191..282f9b58ab60 100644
>> --- a/include/libcamera/bound_method.h
>> +++ b/include/libcamera/base/bound_method.h
>> @@ -4,8 +4,8 @@
>>   *
>>   * bound_method.h - Method bind and invocation
>>   */
>> -#ifndef __LIBCAMERA_BOUND_METHOD_H__
>> -#define __LIBCAMERA_BOUND_METHOD_H__
>> +#ifndef __LIBCAMERA_BASE_BOUND_METHOD_H__
>> +#define __LIBCAMERA_BASE_BOUND_METHOD_H__
>>  
>>  #include <memory>
>>  #include <tuple>
>> @@ -236,4 +236,4 @@ private:
>>  
>>  } /* namespace libcamera */
>>  
>> -#endif /* __LIBCAMERA_BOUND_METHOD_H__ */
>> +#endif /* __LIBCAMERA_BASE_BOUND_METHOD_H__ */
>> diff --git a/include/libcamera/internal/event_dispatcher.h b/include/libcamera/base/event_dispatcher.h
>> similarity index 79%
>> rename from include/libcamera/internal/event_dispatcher.h
>> rename to include/libcamera/base/event_dispatcher.h
>> index e6a8ad65ce0a..045df27fff16 100644
>> --- a/include/libcamera/internal/event_dispatcher.h
>> +++ b/include/libcamera/base/event_dispatcher.h
>> @@ -4,8 +4,8 @@
>>   *
>>   * event_dispatcher.h - Event dispatcher
>>   */
>> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__
>> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__
>> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_H__
>> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_H__
>>  
>>  #include <vector>
>>  
>> @@ -32,4 +32,4 @@ public:
>>  
>>  } /* namespace libcamera */
>>  
>> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__ */
>> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_H__ */
>> diff --git a/include/libcamera/internal/event_dispatcher_poll.h b/include/libcamera/base/event_dispatcher_poll.h
>> similarity index 82%
>> rename from include/libcamera/internal/event_dispatcher_poll.h
>> rename to include/libcamera/base/event_dispatcher_poll.h
>> index 33de051de261..ae2a3f04e4b9 100644
>> --- a/include/libcamera/internal/event_dispatcher_poll.h
>> +++ b/include/libcamera/base/event_dispatcher_poll.h
>> @@ -4,14 +4,14 @@
>>   *
>>   * event_dispatcher_poll.h - Poll-based event dispatcher
>>   */
>> -#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__
>> -#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__
>> +#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__
>> +#define __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__
>>  
>>  #include <list>
>>  #include <map>
>>  #include <vector>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> +#include <libcamera/base/event_dispatcher.h>
>>  
>>  struct pollfd;
>>  
>> @@ -55,4 +55,4 @@ private:
>>  
>>  } /* namespace libcamera */
>>  
>> -#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__ */
>> +#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__ */
>> diff --git a/include/libcamera/internal/log.h b/include/libcamera/base/log.h
>> similarity index 96%
>> rename from include/libcamera/internal/log.h
>> rename to include/libcamera/base/log.h
>> index 82e55a623e04..b93c947ae7db 100644
>> --- a/include/libcamera/internal/log.h
>> +++ b/include/libcamera/base/log.h
>> @@ -4,8 +4,8 @@
>>   *
>>   * log.h - Logging infrastructure
>>   */
>> -#ifndef __LIBCAMERA_INTERNAL_LOG_H__
>> -#define __LIBCAMERA_INTERNAL_LOG_H__
>> +#ifndef __LIBCAMERA_BASE_LOG_H__
>> +#define __LIBCAMERA_BASE_LOG_H__
>>  
>>  #include <chrono>
>>  #include <sstream>
>> @@ -127,4 +127,4 @@ LogMessage _log(const LogCategory *category, LogSeverity severity,
>>  
>>  } /* namespace libcamera */
>>  
>> -#endif /* __LIBCAMERA_INTERNAL_LOG_H__ */
>> +#endif /* __LIBCAMERA_BASE_LOG_H__ */
>> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
>> index 2db756c504c9..7a858dcb6f1a 100644
>> --- a/include/libcamera/base/meson.build
>> +++ b/include/libcamera/base/meson.build
>> @@ -3,7 +3,17 @@
>>  libcamera_base_include_dir = libcamera_include_dir / 'base'
>>  
>>  libcamera_base_headers = files([
>> +    'bound_method.h',
>>      'class.h',
>> +    'event_dispatcher.h',
>> +    'event_dispatcher_poll.h',
>> +    'log.h',
>> +    'message.h',
>> +    'object.h',
>> +    'semaphore.h',
>> +    'signal.h',
>> +    'thread.h',
>> +    'timer.h',
>>      'utils.h',
>>  ])
>>  
>> diff --git a/include/libcamera/internal/message.h b/include/libcamera/base/message.h
>> similarity index 87%
>> rename from include/libcamera/internal/message.h
>> rename to include/libcamera/base/message.h
>> index f1b133bfb2ba..5d2a9f04f0a7 100644
>> --- a/include/libcamera/internal/message.h
>> +++ b/include/libcamera/base/message.h
>> @@ -4,12 +4,12 @@
>>   *
>>   * message.h - Message queue support
>>   */
>> -#ifndef __LIBCAMERA_INTERNAL_MESSAGE_H__
>> -#define __LIBCAMERA_INTERNAL_MESSAGE_H__
>> +#ifndef __LIBCAMERA_BASE_MESSAGE_H__
>> +#define __LIBCAMERA_BASE_MESSAGE_H__
>>  
>>  #include <atomic>
>>  
>> -#include <libcamera/bound_method.h>
>> +#include <libcamera/base/bound_method.h>
>>  
>>  namespace libcamera {
>>  
>> @@ -68,4 +68,4 @@ private:
>>  
>>  } /* namespace libcamera */
>>  
>> -#endif /* __LIBCAMERA_INTERNAL_MESSAGE_H__ */
>> +#endif /* __LIBCAMERA_BASE_MESSAGE_H__ */
>> diff --git a/include/libcamera/object.h b/include/libcamera/base/object.h
>> similarity index 89%
>> rename from include/libcamera/object.h
>> rename to include/libcamera/base/object.h
>> index a1882f05fb77..5c385ab4b140 100644
>> --- a/include/libcamera/object.h
>> +++ b/include/libcamera/base/object.h
>> @@ -4,14 +4,14 @@
>>   *
>>   * object.h - Base object
>>   */
>> -#ifndef __LIBCAMERA_OBJECT_H__
>> -#define __LIBCAMERA_OBJECT_H__
>> +#ifndef __LIBCAMERA_BASE_OBJECT_H__
>> +#define __LIBCAMERA_BASE_OBJECT_H__
>>  
>>  #include <list>
>>  #include <memory>
>>  #include <vector>
>>  
>> -#include <libcamera/bound_method.h>
>> +#include <libcamera/base/bound_method.h>
>>  
>>  namespace libcamera {
>>  
>> @@ -68,4 +68,4 @@ private:
>>  
>>  } /* namespace libcamera */
>>  
>> -#endif /* __LIBCAMERA_OBJECT_H__ */
>> +#endif /* __LIBCAMERA_BASE_OBJECT_H__ */
>> diff --git a/include/libcamera/internal/semaphore.h b/include/libcamera/base/semaphore.h
>> similarity index 74%
>> rename from include/libcamera/internal/semaphore.h
>> rename to include/libcamera/base/semaphore.h
>> index 9dc65d299cfd..c8e62e3ee68b 100644
>> --- a/include/libcamera/internal/semaphore.h
>> +++ b/include/libcamera/base/semaphore.h
>> @@ -4,12 +4,12 @@
>>   *
>>   * semaphore.h - General-purpose counting semaphore
>>   */
>> -#ifndef __LIBCAMERA_INTERNAL_SEMAPHORE_H__
>> -#define __LIBCAMERA_INTERNAL_SEMAPHORE_H__
>> +#ifndef __LIBCAMERA_BASE_SEMAPHORE_H__
>> +#define __LIBCAMERA_BASE_SEMAPHORE_H__
>>  
>>  #include <condition_variable>
>>  
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/base/thread.h>
>>  
>>  namespace libcamera {
>>  
>> @@ -31,4 +31,4 @@ private:
>>  
>>  } /* namespace libcamera */
>>  
>> -#endif /* __LIBCAMERA_INTERNAL_SEMAPHORE_H__ */
>> +#endif /* __LIBCAMERA_BASE_SEMAPHORE_H__ */
>> diff --git a/include/libcamera/signal.h b/include/libcamera/base/signal.h
>> similarity index 93%
>> rename from include/libcamera/signal.h
>> rename to include/libcamera/base/signal.h
>> index 3233529a1275..c2521769a843 100644
>> --- a/include/libcamera/signal.h
>> +++ b/include/libcamera/base/signal.h
>> @@ -4,16 +4,16 @@
>>   *
>>   * signal.h - Signal & slot implementation
>>   */
>> -#ifndef __LIBCAMERA_SIGNAL_H__
>> -#define __LIBCAMERA_SIGNAL_H__
>> +#ifndef __LIBCAMERA_BASE_SIGNAL_H__
>> +#define __LIBCAMERA_BASE_SIGNAL_H__
>>  
>>  #include <functional>
>>  #include <list>
>>  #include <type_traits>
>>  #include <vector>
>>  
>> -#include <libcamera/bound_method.h>
>> -#include <libcamera/object.h>
>> +#include <libcamera/base/bound_method.h>
>> +#include <libcamera/base/object.h>
>>  
>>  namespace libcamera {
>>  
>> @@ -129,4 +129,4 @@ public:
>>  
>>  } /* namespace libcamera */
>>  
>> -#endif /* __LIBCAMERA_SIGNAL_H__ */
>> +#endif /* __LIBCAMERA_BASE_SIGNAL_H__ */
>> diff --git a/include/libcamera/internal/thread.h b/include/libcamera/base/thread.h
>> similarity index 86%
>> rename from include/libcamera/internal/thread.h
>> rename to include/libcamera/base/thread.h
>> index 9662e28bb581..2ed18d49c978 100644
>> --- a/include/libcamera/internal/thread.h
>> +++ b/include/libcamera/base/thread.h
>> @@ -4,20 +4,18 @@
>>   *
>>   * thread.h - Thread support
>>   */
>> -#ifndef __LIBCAMERA_INTERNAL_THREAD_H__
>> -#define __LIBCAMERA_INTERNAL_THREAD_H__
>> +#ifndef __LIBCAMERA_BASE_THREAD_H__
>> +#define __LIBCAMERA_BASE_THREAD_H__
>>  
>>  #include <memory>
>>  #include <mutex>
>>  #include <sys/types.h>
>>  #include <thread>
>>  
>> -#include <libcamera/signal.h>
>> -
>> +#include <libcamera/base/message.h>
>> +#include <libcamera/base/signal.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/message.h"
>> -
>>  namespace libcamera {
>>  
>>  class EventDispatcher;
>> @@ -75,4 +73,4 @@ private:
>>  
>>  } /* namespace libcamera */
>>  
>> -#endif /* __LIBCAMERA_INTERNAL_THREAD_H__ */
>> +#endif /* __LIBCAMERA_BASE_THREAD_H__ */
>> diff --git a/include/libcamera/internal/timer.h b/include/libcamera/base/timer.h
>> similarity index 81%
>> rename from include/libcamera/internal/timer.h
>> rename to include/libcamera/base/timer.h
>> index 013e93c0b4e6..e79e85f1ef0d 100644
>> --- a/include/libcamera/internal/timer.h
>> +++ b/include/libcamera/base/timer.h
>> @@ -4,14 +4,14 @@
>>   *
>>   * timer.h - Generic timer
>>   */
>> -#ifndef __LIBCAMERA_INTERNAL_TIMER_H__
>> -#define __LIBCAMERA_INTERNAL_TIMER_H__
>> +#ifndef __LIBCAMERA_BASE_TIMER_H__
>> +#define __LIBCAMERA_BASE_TIMER_H__
>>  
>>  #include <chrono>
>>  #include <stdint.h>
>>  
>> -#include <libcamera/object.h>
>> -#include <libcamera/signal.h>
>> +#include <libcamera/base/object.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  namespace libcamera {
>>  
>> @@ -46,4 +46,4 @@ private:
>>  
>>  } /* namespace libcamera */
>>  
>> -#endif /* __LIBCAMERA_INTERNAL_TIMER_H__ */
>> +#endif /* __LIBCAMERA_BASE_TIMER_H__ */
>> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
>> index ea0914009c2b..b081907e0cb1 100644
>> --- a/include/libcamera/camera.h
>> +++ b/include/libcamera/camera.h
>> @@ -13,11 +13,11 @@
>>  #include <string>
>>  
>>  #include <libcamera/base/class.h>
>> +#include <libcamera/base/object.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  #include <libcamera/controls.h>
>> -#include <libcamera/object.h>
>>  #include <libcamera/request.h>
>> -#include <libcamera/signal.h>
>>  #include <libcamera/stream.h>
>>  #include <libcamera/transform.h>
>>  
>> diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h
>> index 5deede035115..744e5a06c78c 100644
>> --- a/include/libcamera/camera_manager.h
>> +++ b/include/libcamera/camera_manager.h
>> @@ -13,9 +13,8 @@
>>  #include <vector>
>>  
>>  #include <libcamera/base/class.h>
>> -
>> -#include <libcamera/object.h>
>> -#include <libcamera/signal.h>
>> +#include <libcamera/base/object.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  namespace libcamera {
>>  
>> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h
>> index 7bc540619721..db12b07ee8cc 100644
>> --- a/include/libcamera/internal/camera_sensor.h
>> +++ b/include/libcamera/internal/camera_sensor.h
>> @@ -12,13 +12,13 @@
>>  #include <vector>
>>  
>>  #include <libcamera/base/class.h>
>> +#include <libcamera/base/log.h>
>>  
>>  #include <libcamera/controls.h>
>>  #include <libcamera/geometry.h>
>>  #include <libcamera/ipa/core_ipa_interface.h>
>>  
>>  #include "libcamera/internal/formats.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/v4l2_subdevice.h"
>>  
>>  namespace libcamera {
>> diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h
>> index 707cfe8f309d..222caf75a0db 100644
>> --- a/include/libcamera/internal/device_enumerator.h
>> +++ b/include/libcamera/internal/device_enumerator.h
>> @@ -13,7 +13,7 @@
>>  
>>  #include <linux/media.h>
>>  
>> -#include <libcamera/signal.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  namespace libcamera {
>>  
>> diff --git a/include/libcamera/internal/event_notifier.h b/include/libcamera/internal/event_notifier.h
>> index cc3495c024f0..8a6419f23004 100644
>> --- a/include/libcamera/internal/event_notifier.h
>> +++ b/include/libcamera/internal/event_notifier.h
>> @@ -7,8 +7,8 @@
>>  #ifndef __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
>>  #define __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
>>  
>> -#include <libcamera/object.h>
>> -#include <libcamera/signal.h>
>> +#include <libcamera/base/object.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  namespace libcamera {
>>  
>> diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h
>> index 70168acc25a5..76325b1d109f 100644
>> --- a/include/libcamera/internal/ipa_data_serializer.h
>> +++ b/include/libcamera/internal/ipa_data_serializer.h
>> @@ -14,6 +14,8 @@
>>  #include <type_traits>
>>  #include <vector>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/geometry.h>
>> @@ -22,7 +24,6 @@
>>  #include "libcamera/internal/byte_stream_buffer.h"
>>  #include "libcamera/internal/camera_sensor.h"
>>  #include "libcamera/internal/control_serializer.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  namespace libcamera {
>>  
>> diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h
>> index e904a2be796b..34224e330da7 100644
>> --- a/include/libcamera/internal/ipa_manager.h
>> +++ b/include/libcamera/internal/ipa_manager.h
>> @@ -10,11 +10,12 @@
>>  #include <stdint.h>
>>  #include <vector>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/ipa/ipa_interface.h>
>>  #include <libcamera/ipa/ipa_module_info.h>
>>  
>>  #include "libcamera/internal/ipa_module.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  #include "libcamera/internal/pub_key.h"
>>  
>> diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h
>> index 19fc58272210..a87f56502b9a 100644
>> --- a/include/libcamera/internal/ipa_module.h
>> +++ b/include/libcamera/internal/ipa_module.h
>> @@ -11,10 +11,11 @@
>>  #include <string>
>>  #include <vector>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/ipa/ipa_interface.h>
>>  #include <libcamera/ipa/ipa_module_info.h>
>>  
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  
>>  namespace libcamera {
>> diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h
>> index c9a84b78cbe5..e58de3402006 100644
>> --- a/include/libcamera/internal/ipc_pipe.h
>> +++ b/include/libcamera/internal/ipc_pipe.h
>> @@ -9,9 +9,9 @@
>>  
>>  #include <vector>
>>  
>> -#include "libcamera/internal/ipc_unixsocket.h"
>> +#include <libcamera/base/signal.h>
>>  
>> -#include <libcamera/signal.h>
>> +#include "libcamera/internal/ipc_unixsocket.h"
>>  
>>  namespace libcamera {
>>  
>> diff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h
>> index e871b65036bd..9f5b06773ced 100644
>> --- a/include/libcamera/internal/ipc_unixsocket.h
>> +++ b/include/libcamera/internal/ipc_unixsocket.h
>> @@ -12,7 +12,7 @@
>>  #include <sys/types.h>
>>  #include <vector>
>>  
>> -#include <libcamera/signal.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  namespace libcamera {
>>  
>> diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h
>> index c3292508c87b..8424611d7eda 100644
>> --- a/include/libcamera/internal/media_device.h
>> +++ b/include/libcamera/internal/media_device.h
>> @@ -14,9 +14,9 @@
>>  
>>  #include <linux/media.h>
>>  
>> -#include <libcamera/signal.h>
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/signal.h>
>>  
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_object.h"
>>  
>>  namespace libcamera {
>> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build
>> index c84f9822ef6e..64f50373a7fb 100644
>> --- a/include/libcamera/internal/meson.build
>> +++ b/include/libcamera/internal/meson.build
>> @@ -22,8 +22,6 @@ libcamera_internal_headers = files([
>>      'device_enumerator.h',
>>      'device_enumerator_sysfs.h',
>>      'device_enumerator_udev.h',
>> -    'event_dispatcher.h',
>> -    'event_dispatcher_poll.h',
>>      'event_notifier.h',
>>      'file.h',
>>      'formats.h',
>> @@ -31,18 +29,13 @@ libcamera_internal_headers = files([
>>      'ipa_module.h',
>>      'ipa_proxy.h',
>>      'ipc_unixsocket.h',
>> -    'log.h',
>>      'media_device.h',
>>      'media_object.h',
>> -    'message.h',
>>      'pipeline_handler.h',
>>      'process.h',
>>      'pub_key.h',
>> -    'semaphore.h',
>>      'source-paths.h',
>>      'sysfs.h',
>> -    'thread.h',
>> -    'timer.h',
>>      'v4l2_device.h',
>>      'v4l2_pixelformat.h',
>>      'v4l2_subdevice.h',
>> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
>> index 8beb6b76dd3f..9e2d65d6f2c5 100644
>> --- a/include/libcamera/internal/pipeline_handler.h
>> +++ b/include/libcamera/internal/pipeline_handler.h
>> @@ -16,9 +16,9 @@
>>  #include <vector>
>>  
>>  #include <libcamera/base/class.h>
>> +#include <libcamera/base/object.h>
>>  
>>  #include <libcamera/controls.h>
>> -#include <libcamera/object.h>
>>  #include <libcamera/stream.h>
>>  
>>  #include "libcamera/internal/ipa_proxy.h"
>> diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
>> index 254cda8535ae..c4d5d9c1c009 100644
>> --- a/include/libcamera/internal/process.h
>> +++ b/include/libcamera/internal/process.h
>> @@ -11,7 +11,7 @@
>>  #include <string>
>>  #include <vector>
>>  
>> -#include <libcamera/signal.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  namespace libcamera {
>>  
>> diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h
>> index c318e976ad8e..1edd664a9aef 100644
>> --- a/include/libcamera/internal/v4l2_device.h
>> +++ b/include/libcamera/internal/v4l2_device.h
>> @@ -13,12 +13,12 @@
>>  
>>  #include <linux/videodev2.h>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/signal.h>
>> +
>>  #include <libcamera/controls.h>
>> -#include <libcamera/signal.h>
>>  #include <libcamera/span.h>
>>  
>> -#include "libcamera/internal/log.h"
>> -
>>  namespace libcamera {
>>  
>>  class EventNotifier;
>> diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h
>> index d07dd6b444d0..97b89fb95087 100644
>> --- a/include/libcamera/internal/v4l2_subdevice.h
>> +++ b/include/libcamera/internal/v4l2_subdevice.h
>> @@ -12,11 +12,11 @@
>>  #include <vector>
>>  
>>  #include <libcamera/base/class.h>
>> +#include <libcamera/base/log.h>
>>  
>>  #include <libcamera/geometry.h>
>>  
>>  #include "libcamera/internal/formats.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_object.h"
>>  #include "libcamera/internal/v4l2_device.h"
>>  
>> diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
>> index 227d015e8937..a7c3d5290d92 100644
>> --- a/include/libcamera/internal/v4l2_videodevice.h
>> +++ b/include/libcamera/internal/v4l2_videodevice.h
>> @@ -17,14 +17,14 @@
>>  #include <linux/videodev2.h>
>>  
>>  #include <libcamera/base/class.h>
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/geometry.h>
>>  #include <libcamera/pixel_format.h>
>> -#include <libcamera/signal.h>
>>  
>>  #include "libcamera/internal/formats.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/v4l2_device.h"
>>  #include "libcamera/internal/v4l2_pixelformat.h"
>>  
>> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
>> index 4aefaa7153b1..9a15c86b16e2 100644
>> --- a/include/libcamera/ipa/ipa_interface.h
>> +++ b/include/libcamera/ipa/ipa_interface.h
>> @@ -13,10 +13,11 @@
>>  #include <map>
>>  #include <vector>
>>  
>> +#include <libcamera/base/signal.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/controls.h>
>>  #include <libcamera/geometry.h>
>> -#include <libcamera/signal.h>
>>  
>>  namespace libcamera {
>>  
>> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
>> index 7cba3de6ca96..d08bb3096aff 100644
>> --- a/include/libcamera/meson.build
>> +++ b/include/libcamera/meson.build
>> @@ -1,7 +1,6 @@
>>  # SPDX-License-Identifier: CC0-1.0
>>  
>>  libcamera_public_headers = files([
>> -    'bound_method.h',
>>      'buffer.h',
>>      'camera.h',
>>      'camera_manager.h',
>> @@ -11,10 +10,8 @@ libcamera_public_headers = files([
>>      'framebuffer_allocator.h',
>>      'geometry.h',
>>      'logging.h',
>> -    'object.h',
>>      'pixel_format.h',
>>      'request.h',
>> -    'signal.h',
>>      'span.h',
>>      'stream.h',
>>      'transform.h',
>> diff --git a/include/libcamera/request.h b/include/libcamera/request.h
>> index 00c646fea7f2..2d361c9d97dc 100644
>> --- a/include/libcamera/request.h
>> +++ b/include/libcamera/request.h
>> @@ -14,9 +14,9 @@
>>  #include <unordered_set>
>>  
>>  #include <libcamera/base/class.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  #include <libcamera/controls.h>
>> -#include <libcamera/signal.h>
>>  
>>  namespace libcamera {
>>  
>> diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp
>> index e6d435e0501f..da836baec903 100644
>> --- a/src/android/camera3_hal.cpp
>> +++ b/src/android/camera3_hal.cpp
>> @@ -7,7 +7,7 @@
>>  
>>  #include <hardware/camera_common.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "camera_device.h"
>>  #include "camera_hal_manager.h"
>> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
>> index 00224a6d64b4..6b5edb66fad2 100644
>> --- a/src/android/camera_capabilities.cpp
>> +++ b/src/android/camera_capabilities.cpp
>> @@ -12,12 +12,13 @@
>>  
>>  #include <hardware/camera3.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/controls.h>
>>  #include <libcamera/property_ids.h>
>>  
>>  #include "libcamera/internal/formats.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  using namespace libcamera;
>>  
>> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
>> index 6243c07e231e..86ea22b61467 100644
>> --- a/src/android/camera_device.cpp
>> +++ b/src/android/camera_device.cpp
>> @@ -15,16 +15,15 @@
>>  #include <unistd.h>
>>  #include <vector>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/utils.h>
>> +
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/controls.h>
>>  #include <libcamera/formats.h>
>>  #include <libcamera/property_ids.h>
>>  
>> -#include <libcamera/base/utils.h>
>> -
>> -#include "libcamera/internal/log.h"
>> -#include "libcamera/internal/thread.h"
>> -
>>  #include "system/graphics.h"
>>  
>>  using namespace libcamera;
>> diff --git a/src/android/camera_device.h b/src/android/camera_device.h
>> index 090fe28a551e..4747f577a3e4 100644
>> --- a/src/android/camera_device.h
>> +++ b/src/android/camera_device.h
>> @@ -14,15 +14,16 @@
>>  
>>  #include <hardware/camera3.h>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/message.h>
>> +#include <libcamera/base/thread.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/camera.h>
>>  #include <libcamera/request.h>
>>  #include <libcamera/stream.h>
>>  
>>  #include "libcamera/internal/buffer.h"
>> -#include "libcamera/internal/log.h"
>> -#include "libcamera/internal/message.h"
>> -#include "libcamera/internal/thread.h"
>>  
>>  #include "camera_capabilities.h"
>>  #include "camera_metadata.h"
>> diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp
>> index f33ba26935da..d84de4fd6f90 100644
>> --- a/src/android/camera_hal_config.cpp
>> +++ b/src/android/camera_hal_config.cpp
>> @@ -21,7 +21,7 @@ namespace filesystem = std::experimental::filesystem;
>>  
>>  #include <hardware/camera3.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  using namespace libcamera;
>>  
>> diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
>> index 54087d3a2e45..4cd67544f0df 100644
>> --- a/src/android/camera_hal_manager.cpp
>> +++ b/src/android/camera_hal_manager.cpp
>> @@ -7,11 +7,11 @@
>>  
>>  #include "camera_hal_manager.h"
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/camera.h>
>>  #include <libcamera/property_ids.h>
>>  
>> -#include "libcamera/internal/log.h"
>> -
>>  #include "camera_device.h"
>>  
>>  using namespace libcamera;
>> diff --git a/src/android/camera_metadata.cpp b/src/android/camera_metadata.cpp
>> index c7298d620668..3fc7cf273650 100644
>> --- a/src/android/camera_metadata.cpp
>> +++ b/src/android/camera_metadata.cpp
>> @@ -7,7 +7,7 @@
>>  
>>  #include "camera_metadata.h"
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  using namespace libcamera;
>>  
>> diff --git a/src/android/camera_worker.h b/src/android/camera_worker.h
>> index e289ef9b8655..6e1aee4a3247 100644
>> --- a/src/android/camera_worker.h
>> +++ b/src/android/camera_worker.h
>> @@ -9,14 +9,14 @@
>>  
>>  #include <memory>
>>  
>> +#include <libcamera/base/object.h>
>> +#include <libcamera/base/thread.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/camera.h>
>> -#include <libcamera/object.h>
>>  #include <libcamera/request.h>
>>  #include <libcamera/stream.h>
>>  
>> -#include "libcamera/internal/thread.h"
>> -
>>  class CameraDevice;
>>  
>>  class CaptureRequest
>> diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp
>> index f006e1d1999a..e6358ca9466f 100644
>> --- a/src/android/jpeg/encoder_libjpeg.cpp
>> +++ b/src/android/jpeg/encoder_libjpeg.cpp
>> @@ -16,12 +16,13 @@
>>  #include <unistd.h>
>>  #include <vector>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/camera.h>
>>  #include <libcamera/formats.h>
>>  #include <libcamera/pixel_format.h>
>>  
>>  #include "libcamera/internal/formats.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  using namespace libcamera;
>>  
>> diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp
>> index 747f1cfaa8ac..0ba4cb85ffd0 100644
>> --- a/src/android/jpeg/exif.cpp
>> +++ b/src/android/jpeg/exif.cpp
>> @@ -14,10 +14,9 @@
>>  #include <tuple>
>>  #include <uchar.h>
>>  
>> +#include <libcamera/base/log.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/log.h"
>> -
>>  using namespace libcamera;
>>  
>>  LOG_DEFINE_CATEGORY(EXIF)
>> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp
>> index 058ccc998c6f..0e93f365d6db 100644
>> --- a/src/android/jpeg/post_processor_jpeg.cpp
>> +++ b/src/android/jpeg/post_processor_jpeg.cpp
>> @@ -14,9 +14,9 @@
>>  #include "encoder_libjpeg.h"
>>  #include "exif.h"
>>  
>> -#include <libcamera/formats.h>
>> +#include <libcamera/base/log.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/formats.h>
>>  
>>  using namespace libcamera;
>>  using namespace std::chrono_literals;
>> diff --git a/src/android/jpeg/thumbnailer.cpp b/src/android/jpeg/thumbnailer.cpp
>> index f709d3435d9c..5cb00744a688 100644
>> --- a/src/android/jpeg/thumbnailer.cpp
>> +++ b/src/android/jpeg/thumbnailer.cpp
>> @@ -7,9 +7,9 @@
>>  
>>  #include "thumbnailer.h"
>>  
>> -#include <libcamera/formats.h>
>> +#include <libcamera/base/log.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/formats.h>
>>  
>>  using namespace libcamera;
>>  
>> diff --git a/src/android/mm/cros_camera_buffer.cpp b/src/android/mm/cros_camera_buffer.cpp
>> index 59e26d1b5972..3cfa39a1714d 100644
>> --- a/src/android/mm/cros_camera_buffer.cpp
>> +++ b/src/android/mm/cros_camera_buffer.cpp
>> @@ -7,7 +7,7 @@
>>  
>>  #include "../camera_buffer.h"
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "cros-camera/camera_buffer_manager.h"
>>  
>> diff --git a/src/android/mm/generic_camera_buffer.cpp b/src/android/mm/generic_camera_buffer.cpp
>> index cca88cf3632f..326fdc066499 100644
>> --- a/src/android/mm/generic_camera_buffer.cpp
>> +++ b/src/android/mm/generic_camera_buffer.cpp
>> @@ -9,8 +9,9 @@
>>  
>>  #include <unistd.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include "libcamera/internal/buffer.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  using namespace libcamera;
>>  
>> diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp
>> index b67364c8f147..772e805b32cc 100644
>> --- a/src/android/yuv/post_processor_yuv.cpp
>> +++ b/src/android/yuv/post_processor_yuv.cpp
>> @@ -9,12 +9,13 @@
>>  
>>  #include <libyuv/scale.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/formats.h>
>>  #include <libcamera/geometry.h>
>>  #include <libcamera/pixel_format.h>
>>  
>>  #include "libcamera/internal/formats.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  using namespace libcamera;
>>  
>> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
>> index 8b4c7351e9db..31a3c006a6eb 100644
>> --- a/src/ipa/ipu3/ipu3.cpp
>> +++ b/src/ipa/ipu3/ipu3.cpp
>> @@ -11,6 +11,8 @@
>>  #include <linux/intel-ipu3.h>
>>  #include <linux/v4l2-controls.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/ipa/ipa_interface.h>
>> @@ -19,7 +21,6 @@
>>  #include <libcamera/request.h>
>>  
>>  #include "libcamera/internal/buffer.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  #include "ipu3_agc.h"
>>  #include "ipu3_awb.h"
>> diff --git a/src/ipa/ipu3/ipu3_agc.cpp b/src/ipa/ipu3/ipu3_agc.cpp
>> index c476a60d4cb8..fd0b70f02d25 100644
>> --- a/src/ipa/ipu3/ipu3_agc.cpp
>> +++ b/src/ipa/ipu3/ipu3_agc.cpp
>> @@ -11,9 +11,9 @@
>>  #include <cmath>
>>  #include <numeric>
>>  
>> -#include <libcamera/ipa/core_ipa_interface.h>
>> +#include <libcamera/base/log.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/ipa/core_ipa_interface.h>
>>  
>>  #include "libipa/histogram.h"
>>  
>> diff --git a/src/ipa/ipu3/ipu3_awb.cpp b/src/ipa/ipu3/ipu3_awb.cpp
>> index 54ce8e67124e..9b409c8ffad9 100644
>> --- a/src/ipa/ipu3/ipu3_awb.cpp
>> +++ b/src/ipa/ipu3/ipu3_awb.cpp
>> @@ -10,7 +10,7 @@
>>  #include <numeric>
>>  #include <unordered_map>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  namespace libcamera {
>>  
>> diff --git a/src/ipa/libipa/histogram.cpp b/src/ipa/libipa/histogram.cpp
>> index d4d7cfdffa84..fb1eb2a2f0b1 100644
>> --- a/src/ipa/libipa/histogram.cpp
>> +++ b/src/ipa/libipa/histogram.cpp
>> @@ -8,7 +8,7 @@
>>  
>>  #include <cmath>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  /**
>>   * \file histogram.h
>> diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp
>> index 221898ceb40d..a66648197140 100644
>> --- a/src/ipa/raspberrypi/cam_helper.hpp
>> +++ b/src/ipa/raspberrypi/cam_helper.hpp
>> @@ -10,13 +10,13 @@
>>  
>>  #include <libcamera/span.h>
>>  
>> +#include <libcamera/base/utils.h>
>> +
>>  #include "camera_mode.h"
>>  #include "controller/controller.hpp"
>>  #include "controller/metadata.hpp"
>>  #include "md_parser.hpp"
>>  
>> -#include <libcamera/base/utils.h>
>> -
>>  #include "libcamera/internal/v4l2_videodevice.h"
>>  
>>  namespace RPiController {
>> diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp
>> index 96b58359a9e5..d3433ad2e7e8 100644
>> --- a/src/ipa/raspberrypi/controller/controller.cpp
>> +++ b/src/ipa/raspberrypi/controller/controller.cpp
>> @@ -5,7 +5,7 @@
>>   * controller.cpp - ISP controller
>>   */
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "algorithm.hpp"
>>  #include "controller.hpp"
>> diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp
>> index 55e80ac74ae1..1ed578cfdbb6 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp
>> @@ -9,7 +9,7 @@
>>  
>>  #include "linux/bcm2835-isp.h"
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../awb_status.h"
>>  #include "../device_status.h"
>> diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
>> index b0d24aa2ef44..3cdc95a99949 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
>> @@ -6,7 +6,7 @@
>>   */
>>  #include <math.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../awb_status.h"
>>  #include "alsc.hpp"
>> diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp
>> index 1c917e4f3408..5cfd33a384e7 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp
>> @@ -5,7 +5,7 @@
>>   * awb.cpp - AWB control algorithm
>>   */
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../lux_status.h"
>>  
>> diff --git a/src/ipa/raspberrypi/controller/rpi/black_level.cpp b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
>> index 9ac855f50014..6b3497f13c19 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/black_level.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
>> @@ -8,7 +8,7 @@
>>  #include <math.h>
>>  #include <stdint.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../black_level_status.h"
>>  
>> diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/raspberrypi/controller/rpi/ccm.cpp
>> index dbdcbb39dd12..821a4c7c98c5 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/ccm.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/ccm.cpp
>> @@ -5,7 +5,7 @@
>>   * ccm.cpp - CCM (colour correction matrix) control algorithm
>>   */
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../awb_status.h"
>>  #include "../ccm_status.h"
>> diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.cpp b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
>> index 2bc43027a291..ae55aad56739 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/contrast.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
>> @@ -6,7 +6,7 @@
>>   */
>>  #include <stdint.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../contrast_status.h"
>>  #include "../histogram.hpp"
>> diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp
>> index e533cd53e63b..110f50560e76 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp
>> @@ -5,7 +5,7 @@
>>   * dpc.cpp - DPC (defective pixel correction) control algorithm
>>   */
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "dpc.hpp"
>>  
>> diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp
>> index bab4406fe3a1..a87ec802b964 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/focus.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp
>> @@ -6,7 +6,7 @@
>>   */
>>  #include <stdint.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../focus_status.h"
>>  #include "focus.hpp"
>> diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp
>> index 5eff116cd055..bdceb1f3d3eb 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/geq.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp
>> @@ -5,7 +5,7 @@
>>   * geq.cpp - GEQ (green equalisation) control algorithm
>>   */
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../device_status.h"
>>  #include "../lux_status.h"
>> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp
>> index 258e44f4dcce..f58d69397e1c 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/lux.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp
>> @@ -8,7 +8,7 @@
>>  
>>  #include "linux/bcm2835-isp.h"
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../device_status.h"
>>  
>> diff --git a/src/ipa/raspberrypi/controller/rpi/noise.cpp b/src/ipa/raspberrypi/controller/rpi/noise.cpp
>> index 156f750192f8..63cad639f313 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/noise.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/noise.cpp
>> @@ -7,7 +7,7 @@
>>  
>>  #include <math.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../device_status.h"
>>  #include "../noise_status.h"
>> diff --git a/src/ipa/raspberrypi/controller/rpi/sdn.cpp b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
>> index 959bc7406a01..9384550983e7 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/sdn.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
>> @@ -5,7 +5,7 @@
>>   * sdn.cpp - SDN (spatial denoise) control algorithm
>>   */
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../denoise_status.h"
>>  #include "../noise_status.h"
>> diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
>> index 2cd861ca6898..b0c2e00a8ee1 100644
>> --- a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
>> +++ b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
>> @@ -7,7 +7,7 @@
>>  
>>  #include <math.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include "../sharpen_status.h"
>>  
>> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
>> index 1c1e802a2cdc..a3f014495e80 100644
>> --- a/src/ipa/raspberrypi/raspberrypi.cpp
>> +++ b/src/ipa/raspberrypi/raspberrypi.cpp
>> @@ -13,6 +13,10 @@
>>  #include <string.h>
>>  #include <sys/mman.h>
>>  
>> +#include <linux/bcm2835-isp.h>
>> +
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/controls.h>
>> @@ -25,9 +29,6 @@
>>  #include <libcamera/span.h>
>>  
>>  #include "libcamera/internal/buffer.h"
>> -#include "libcamera/internal/log.h"
>> -
>> -#include <linux/bcm2835-isp.h>
>>  
>>  #include "agc_algorithm.hpp"
>>  #include "agc_status.h"
>> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
>> index b47ea3240f63..cdfb4d139e41 100644
>> --- a/src/ipa/rkisp1/rkisp1.cpp
>> +++ b/src/ipa/rkisp1/rkisp1.cpp
>> @@ -15,6 +15,8 @@
>>  #include <linux/rkisp1-config.h>
>>  #include <linux/v4l2-controls.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/ipa/ipa_interface.h>
>> @@ -22,8 +24,6 @@
>>  #include <libcamera/ipa/rkisp1_ipa_interface.h>
>>  #include <libcamera/request.h>
>>  
>> -#include "libcamera/internal/log.h"
>> -
>>  namespace libcamera {
>>  
>>  LOG_DEFINE_CATEGORY(IPARkISP1)
>> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
>> index 13681d8833ff..9ffd07f493a1 100644
>> --- a/src/ipa/vimc/vimc.cpp
>> +++ b/src/ipa/vimc/vimc.cpp
>> @@ -17,8 +17,9 @@
>>  #include <libcamera/ipa/ipa_interface.h>
>>  #include <libcamera/ipa/ipa_module_info.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include "libcamera/internal/file.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  namespace libcamera {
>>  
>> diff --git a/src/libcamera/bound_method.cpp b/src/libcamera/base/bound_method.cpp
>> similarity index 94%
>> rename from src/libcamera/bound_method.cpp
>> rename to src/libcamera/base/bound_method.cpp
>> index 4965bb5e167b..3ecec51c4b75 100644
>> --- a/src/libcamera/bound_method.cpp
>> +++ b/src/libcamera/base/bound_method.cpp
>> @@ -5,14 +5,13 @@
>>   * bound_method.cpp - Method bind and invocation
>>   */
>>  
>> -#include <libcamera/bound_method.h>
>> -
>> -#include "libcamera/internal/message.h"
>> -#include "libcamera/internal/semaphore.h"
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/base/bound_method.h>
>> +#include <libcamera/base/message.h>
>> +#include <libcamera/base/semaphore.h>
>> +#include <libcamera/base/thread.h>
>>  
>>  /**
>> - * \file bound_method.h
>> + * \file base/bound_method.h
>>   * \brief Method bind and invocation
>>   */
>>  
>> diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/base/event_dispatcher.cpp
>> similarity index 97%
>> rename from src/libcamera/event_dispatcher.cpp
>> rename to src/libcamera/base/event_dispatcher.cpp
>> index e0ce1eb3cc04..4be89e819832 100644
>> --- a/src/libcamera/event_dispatcher.cpp
>> +++ b/src/libcamera/base/event_dispatcher.cpp
>> @@ -5,12 +5,11 @@
>>   * event_dispatcher.cpp - Event dispatcher
>>   */
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> -
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/log.h>
>>  
>>  /**
>> - * \file event_dispatcher.h
>> + * \file base/event_dispatcher.h
>>   */
>>  
>>  namespace libcamera {
>> diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp
>> similarity index 97%
>> rename from src/libcamera/event_dispatcher_poll.cpp
>> rename to src/libcamera/base/event_dispatcher_poll.cpp
>> index 0b6aee187063..d76ca7fc2c32 100644
>> --- a/src/libcamera/event_dispatcher_poll.cpp
>> +++ b/src/libcamera/base/event_dispatcher_poll.cpp
>> @@ -5,7 +5,7 @@
>>   * event_dispatcher_poll.cpp - Poll-based event dispatcher
>>   */
>>  
>> -#include "libcamera/internal/event_dispatcher_poll.h"
>> +#include <libcamera/base/event_dispatcher_poll.h>
>>  
>>  #include <algorithm>
>>  #include <chrono>
>> @@ -16,15 +16,15 @@
>>  #include <sys/eventfd.h>
>>  #include <unistd.h>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>>  #include <libcamera/base/utils.h>
>>  
>>  #include "libcamera/internal/event_notifier.h"
>> -#include "libcamera/internal/log.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  
>>  /**
>> - * \file event_dispatcher_poll.h
>> + * \file base/event_dispatcher_poll.h
>>   */
>>  
>>  namespace libcamera {
>> diff --git a/src/libcamera/log.cpp b/src/libcamera/base/log.cpp
>> similarity index 99%
>> rename from src/libcamera/log.cpp
>> rename to src/libcamera/base/log.cpp
>> index 5ff0e9017648..1801ae26a2e3 100644
>> --- a/src/libcamera/log.cpp
>> +++ b/src/libcamera/base/log.cpp
>> @@ -5,7 +5,7 @@
>>   * log.cpp - Logging infrastructure
>>   */
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  #include <array>
>>  #if HAVE_BACKTRACE
>> @@ -23,12 +23,11 @@
>>  
>>  #include <libcamera/logging.h>
>>  
>> +#include <libcamera/base/thread.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/thread.h"
>> -
>>  /**
>> - * \file log.h
>> + * \file base/log.h
>>   * \brief Logging infrastructure
>>   *
>>   * libcamera includes a logging infrastructure used through the library that
>> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
>> index 302a288685d3..7a19c67c51b8 100644
>> --- a/src/libcamera/base/meson.build
>> +++ b/src/libcamera/base/meson.build
>> @@ -2,10 +2,21 @@
>>  
>>  libcamera_base_sources = files([
>>      'class.cpp',
>> +    'bound_method.cpp',
>> +    'event_dispatcher.cpp',
>> +    'event_dispatcher_poll.cpp',
>> +    'log.cpp',
>> +    'message.cpp',
>> +    'object.cpp',
>> +    'semaphore.cpp',
>> +    'signal.cpp',
>> +    'thread.cpp',
>> +    'timer.cpp',
>>      'utils.cpp',
>>  ])
>>  
>>  libcamera_base_deps = [
>> +    dependency('threads'),
>>  ]
>>  
>>  libcamera_base_lib = shared_library('libcamera-base',
>> diff --git a/src/libcamera/message.cpp b/src/libcamera/base/message.cpp
>> similarity index 96%
>> rename from src/libcamera/message.cpp
>> rename to src/libcamera/base/message.cpp
>> index bc985c077a4f..f1d772e43465 100644
>> --- a/src/libcamera/message.cpp
>> +++ b/src/libcamera/base/message.cpp
>> @@ -5,14 +5,13 @@
>>   * message.cpp - Message queue support
>>   */
>>  
>> -#include "libcamera/internal/message.h"
>> +#include <libcamera/base/message.h>
>>  
>> -#include <libcamera/signal.h>
>> -
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  /**
>> - * \file message.h
>> + * \file base/message.h
>>   * \brief Message queue support
>>   *
>>   * The messaging API enables inter-thread communication through message
>> diff --git a/src/libcamera/object.cpp b/src/libcamera/base/object.cpp
>> similarity index 97%
>> rename from src/libcamera/object.cpp
>> rename to src/libcamera/base/object.cpp
>> index 51cac64ea313..25410ecd949e 100644
>> --- a/src/libcamera/object.cpp
>> +++ b/src/libcamera/base/object.cpp
>> @@ -5,21 +5,19 @@
>>   * object.cpp - Base object
>>   */
>>  
>> -#include <libcamera/object.h>
>> +#include <libcamera/base/object.h>
>>  
>>  #include <algorithm>
>>  
>> -#include <libcamera/signal.h>
>> -
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/message.h>
>> +#include <libcamera/base/semaphore.h>
>> +#include <libcamera/base/signal.h>
>> +#include <libcamera/base/thread.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/log.h"
>> -#include "libcamera/internal/message.h"
>> -#include "libcamera/internal/semaphore.h"
>> -#include "libcamera/internal/thread.h"
>> -
>>  /**
>> - * \file object.h
>> + * \file base/object.h
>>   * \brief Base object to support automatic signal disconnection
>>   */
>>  
>> diff --git a/src/libcamera/semaphore.cpp b/src/libcamera/base/semaphore.cpp
>> similarity index 96%
>> rename from src/libcamera/semaphore.cpp
>> rename to src/libcamera/base/semaphore.cpp
>> index d8988a9189e8..7aedc6a8c48b 100644
>> --- a/src/libcamera/semaphore.cpp
>> +++ b/src/libcamera/base/semaphore.cpp
>> @@ -5,11 +5,11 @@
>>   * semaphore.cpp - General-purpose counting semaphore
>>   */
>>  
>> -#include "libcamera/internal/semaphore.h"
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/base/semaphore.h>
>> +#include <libcamera/base/thread.h>
>>  
>>  /**
>> - * \file semaphore.h
>> + * \file base/semaphore.h
>>   * \brief General-purpose counting semaphore
>>   */
>>  
>> diff --git a/src/libcamera/signal.cpp b/src/libcamera/base/signal.cpp
>> similarity index 98%
>> rename from src/libcamera/signal.cpp
>> rename to src/libcamera/base/signal.cpp
>> index 2532df3c3073..298b2d4b3619 100644
>> --- a/src/libcamera/signal.cpp
>> +++ b/src/libcamera/base/signal.cpp
>> @@ -5,12 +5,12 @@
>>   * signal.cpp - Signal & slot implementation
>>   */
>>  
>> -#include <libcamera/signal.h>
>> +#include <libcamera/base/signal.h>
>>  
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/base/thread.h>
>>  
>>  /**
>> - * \file signal.h
>> + * \file base/signal.h
>>   * \brief Signal & slot implementation
>>   */
>>  
>> diff --git a/src/libcamera/thread.cpp b/src/libcamera/base/thread.cpp
>> similarity index 98%
>> rename from src/libcamera/thread.cpp
>> rename to src/libcamera/base/thread.cpp
>> index 91e4737ad032..c7c2d6b29d6a 100644
>> --- a/src/libcamera/thread.cpp
>> +++ b/src/libcamera/base/thread.cpp
>> @@ -5,7 +5,7 @@
>>   * thread.cpp - Thread support
>>   */
>>  
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/base/thread.h>
>>  
>>  #include <atomic>
>>  #include <condition_variable>
>> @@ -14,10 +14,10 @@
>>  #include <sys/types.h>
>>  #include <unistd.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> -#include "libcamera/internal/event_dispatcher_poll.h"
>> -#include "libcamera/internal/log.h"
>> -#include "libcamera/internal/message.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/event_dispatcher_poll.h>
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/message.h>
>>  
>>  /**
>>   * \page thread Thread Support
>> @@ -102,7 +102,7 @@
>>   */
>>  
>>  /**
>> - * \file thread.h
>> + * \file base/thread.h
>>   * \brief Thread support
>>   */
>>  
>> diff --git a/src/libcamera/timer.cpp b/src/libcamera/base/timer.cpp
>> similarity index 94%
>> rename from src/libcamera/timer.cpp
>> rename to src/libcamera/base/timer.cpp
>> index 9496671edffc..9c54352d46bd 100644
>> --- a/src/libcamera/timer.cpp
>> +++ b/src/libcamera/base/timer.cpp
>> @@ -5,21 +5,20 @@
>>   * timer.cpp - Generic timer
>>   */
>>  
>> -#include "libcamera/internal/timer.h"
>> +#include <libcamera/base/timer.h>
>>  
>>  #include <chrono>
>>  
>> -#include <libcamera/camera_manager.h>
>> -
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/message.h>
>> +#include <libcamera/base/thread.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> -#include "libcamera/internal/log.h"
>> -#include "libcamera/internal/message.h"
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/camera_manager.h>
>>  
>>  /**
>> - * \file timer.h
>> + * \file base/timer.h
>>   * \brief Generic timer
>>   */
>>  
>> diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp
>> index ca999429dce5..e4c345d518da 100644
>> --- a/src/libcamera/buffer.cpp
>> +++ b/src/libcamera/buffer.cpp
>> @@ -13,7 +13,7 @@
>>  #include <sys/mman.h>
>>  #include <unistd.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  /**
>>   * \file libcamera/buffer.h
>> diff --git a/src/libcamera/byte_stream_buffer.cpp b/src/libcamera/byte_stream_buffer.cpp
>> index 7fc6f6944471..b67bb928f8c1 100644
>> --- a/src/libcamera/byte_stream_buffer.cpp
>> +++ b/src/libcamera/byte_stream_buffer.cpp
>> @@ -10,7 +10,7 @@
>>  #include <stdint.h>
>>  #include <string.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  /**
>>   * \file byte_stream_buffer.h
>> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
>> index 1340c266cc5f..de0123aeafca 100644
>> --- a/src/libcamera/camera.cpp
>> +++ b/src/libcamera/camera.cpp
>> @@ -11,13 +11,14 @@
>>  #include <atomic>
>>  #include <iomanip>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/thread.h>
>> +
>>  #include <libcamera/framebuffer_allocator.h>
>>  #include <libcamera/request.h>
>>  #include <libcamera/stream.h>
>>  
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>> -#include "libcamera/internal/thread.h"
>>  
>>  /**
>>   * \file camera.h
>> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp
>> index a3784db6e697..fc3bd88c737b 100644
>> --- a/src/libcamera/camera_manager.cpp
>> +++ b/src/libcamera/camera_manager.cpp
>> @@ -14,12 +14,13 @@
>>  
>>  #include <libcamera/base/utils.h>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/thread.h>
>> +
>>  #include "libcamera/internal/device_enumerator.h"
>>  #include "libcamera/internal/ipa_manager.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  #include "libcamera/internal/process.h"
>> -#include "libcamera/internal/thread.h"
>>  
>>  /**
>>   * \file camera_manager.h
>> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp
>> index fc4ea78d1fc7..7b7279efbba8 100644
>> --- a/src/libcamera/camera_sensor_properties.cpp
>> +++ b/src/libcamera/camera_sensor_properties.cpp
>> @@ -9,9 +9,9 @@
>>  
>>  #include <map>
>>  
>> -#include <libcamera/control_ids.h>
>> +#include <libcamera/base/log.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/control_ids.h>
>>  
>>  /**
>>   * \file camera_sensor_properties.h
>> diff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp
>> index 097444130ef7..dd5a26083747 100644
>> --- a/src/libcamera/control_serializer.cpp
>> +++ b/src/libcamera/control_serializer.cpp
>> @@ -11,13 +11,14 @@
>>  #include <memory>
>>  #include <vector>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/controls.h>
>>  #include <libcamera/ipa/ipa_controls.h>
>>  #include <libcamera/span.h>
>>  
>>  #include "libcamera/internal/byte_stream_buffer.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  /**
>>   * \file control_serializer.h
>> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
>> index 7df372ad3b6c..34317fa0f65d 100644
>> --- a/src/libcamera/controls.cpp
>> +++ b/src/libcamera/controls.cpp
>> @@ -12,10 +12,10 @@
>>  #include <string>
>>  #include <string.h>
>>  
>> +#include <libcamera/base/log.h>
>>  #include <libcamera/base/utils.h>
>>  
>>  #include "libcamera/internal/control_validator.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  /**
>>   * \file controls.h
>> diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp
>> index 0bf81b510d16..90ce7e0b5b52 100644
>> --- a/src/libcamera/delayed_controls.cpp
>> +++ b/src/libcamera/delayed_controls.cpp
>> @@ -7,9 +7,10 @@
>>  
>>  #include "libcamera/internal/delayed_controls.h"
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/controls.h>
>>  
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/v4l2_device.h"
>>  
>>  /**
>> diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
>> index e6ecc360e32f..1f33faf5e7aa 100644
>> --- a/src/libcamera/device_enumerator.cpp
>> +++ b/src/libcamera/device_enumerator.cpp
>> @@ -11,7 +11,8 @@
>>  
>>  #include <string.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>> +
>>  #include "libcamera/internal/media_device.h"
>>  
>>  /**
>> diff --git a/src/libcamera/device_enumerator_sysfs.cpp b/src/libcamera/device_enumerator_sysfs.cpp
>> index ff72885288c3..686bb8099485 100644
>> --- a/src/libcamera/device_enumerator_sysfs.cpp
>> +++ b/src/libcamera/device_enumerator_sysfs.cpp
>> @@ -17,7 +17,8 @@
>>  #include <sys/types.h>
>>  #include <unistd.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>> +
>>  #include "libcamera/internal/media_device.h"
>>  
>>  namespace libcamera {
>> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp
>> index d26fcf10b3c4..4b842773fcd6 100644
>> --- a/src/libcamera/device_enumerator_udev.cpp
>> +++ b/src/libcamera/device_enumerator_udev.cpp
>> @@ -17,8 +17,9 @@
>>  #include <sys/sysmacros.h>
>>  #include <unistd.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include "libcamera/internal/event_notifier.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_device.h"
>>  
>>  namespace libcamera {
>> diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp
>> index 6b0575c0db77..784016a9f907 100644
>> --- a/src/libcamera/event_notifier.cpp
>> +++ b/src/libcamera/event_notifier.cpp
>> @@ -9,9 +9,9 @@
>>  
>>  #include <libcamera/camera_manager.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> -#include "libcamera/internal/message.h"
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/message.h>
>> +#include <libcamera/base/thread.h>
>>  
>>  /**
>>   * \file event_notifier.h
>> diff --git a/src/libcamera/file.cpp b/src/libcamera/file.cpp
>> index bce2b6138239..def0f60d044b 100644
>> --- a/src/libcamera/file.cpp
>> +++ b/src/libcamera/file.cpp
>> @@ -14,7 +14,7 @@
>>  #include <sys/types.h>
>>  #include <unistd.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  /**
>>   * \file file.h
>> diff --git a/src/libcamera/file_descriptor.cpp b/src/libcamera/file_descriptor.cpp
>> index 8b505ed3b6b2..638b3bbe0449 100644
>> --- a/src/libcamera/file_descriptor.cpp
>> +++ b/src/libcamera/file_descriptor.cpp
>> @@ -11,7 +11,7 @@
>>  #include <unistd.h>
>>  #include <utility>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  /**
>>   * \file file_descriptor.h
>> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
>> index 55822f4cc97b..f5fbaf0b95f9 100644
>> --- a/src/libcamera/formats.cpp
>> +++ b/src/libcamera/formats.cpp
>> @@ -12,7 +12,7 @@
>>  
>>  #include <libcamera/formats.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  /**
>>   * \file internal/formats.h
>> diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp
>> index 2fbba37a1b0b..86a57923286c 100644
>> --- a/src/libcamera/framebuffer_allocator.cpp
>> +++ b/src/libcamera/framebuffer_allocator.cpp
>> @@ -9,11 +9,12 @@
>>  
>>  #include <errno.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/camera.h>
>>  #include <libcamera/stream.h>
>>  
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  
>>  /**
>> diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp
>> index 136446895eb6..9bbef0b537f1 100644
>> --- a/src/libcamera/geometry.cpp
>> +++ b/src/libcamera/geometry.cpp
>> @@ -10,7 +10,7 @@
>>  #include <sstream>
>>  #include <stdint.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  /**
>>   * \file geometry.h
>> diff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp
>> index 131b3bd616fd..fb941e6bcd8a 100644
>> --- a/src/libcamera/ipa_data_serializer.cpp
>> +++ b/src/libcamera/ipa_data_serializer.cpp
>> @@ -7,7 +7,7 @@
>>  
>>  #include "libcamera/internal/ipa_data_serializer.h"
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  /**
>>   * \file ipa_data_serializer.h
>> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
>> index 263cacd64737..35c7259801fa 100644
>> --- a/src/libcamera/ipa_manager.cpp
>> +++ b/src/libcamera/ipa_manager.cpp
>> @@ -12,12 +12,12 @@
>>  #include <string.h>
>>  #include <sys/types.h>
>>  
>> +#include <libcamera/base/log.h>
>>  #include <libcamera/base/utils.h>
>>  
>>  #include "libcamera/internal/file.h"
>>  #include "libcamera/internal/ipa_module.h"
>>  #include "libcamera/internal/ipa_proxy.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  
>>  /**
>> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp
>> index a4e7fb861138..7ab5557916e7 100644
>> --- a/src/libcamera/ipa_module.cpp
>> +++ b/src/libcamera/ipa_module.cpp
>> @@ -23,10 +23,10 @@
>>  
>>  #include <libcamera/span.h>
>>  
>> +#include <libcamera/base/log.h>
>>  #include <libcamera/base/utils.h>
>>  
>>  #include "libcamera/internal/file.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  
>>  /**
>> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp
>> index ca980ec705a6..babcc48bcfd0 100644
>> --- a/src/libcamera/ipa_proxy.cpp
>> +++ b/src/libcamera/ipa_proxy.cpp
>> @@ -12,10 +12,10 @@
>>  #include <sys/types.h>
>>  #include <unistd.h>
>>  
>> +#include <libcamera/base/log.h>
>>  #include <libcamera/base/utils.h>
>>  
>>  #include "libcamera/internal/ipa_module.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  /**
>>   * \file ipa_proxy.h
>> diff --git a/src/libcamera/ipc_pipe.cpp b/src/libcamera/ipc_pipe.cpp
>> index c402c8d08699..28e20e031623 100644
>> --- a/src/libcamera/ipc_pipe.cpp
>> +++ b/src/libcamera/ipc_pipe.cpp
>> @@ -7,7 +7,7 @@
>>  
>>  #include "libcamera/internal/ipc_pipe.h"
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  /**
>>   * \file ipc_pipe.h
>> diff --git a/src/libcamera/ipc_pipe_unixsocket.cpp b/src/libcamera/ipc_pipe_unixsocket.cpp
>> index db0e260f22b1..4511775fb467 100644
>> --- a/src/libcamera/ipc_pipe_unixsocket.cpp
>> +++ b/src/libcamera/ipc_pipe_unixsocket.cpp
>> @@ -9,13 +9,14 @@
>>  
>>  #include <vector>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>> +
>>  #include "libcamera/internal/ipc_pipe.h"
>>  #include "libcamera/internal/ipc_unixsocket.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/process.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  
>>  namespace libcamera {
>>  
>> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp
>> index fdb359f7fcd1..1466597077d4 100644
>> --- a/src/libcamera/ipc_unixsocket.cpp
>> +++ b/src/libcamera/ipc_unixsocket.cpp
>> @@ -12,8 +12,9 @@
>>  #include <sys/socket.h>
>>  #include <unistd.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include "libcamera/internal/event_notifier.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  /**
>>   * \file ipc_unixsocket.h
>> diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp
>> index 9ec84e560b77..e12ab1abb10d 100644
>> --- a/src/libcamera/media_device.cpp
>> +++ b/src/libcamera/media_device.cpp
>> @@ -18,7 +18,7 @@
>>  
>>  #include <linux/media.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  /**
>>   * \file media_device.h
>> diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp
>> index 94aeb50402ca..815edc8e3b2d 100644
>> --- a/src/libcamera/media_object.cpp
>> +++ b/src/libcamera/media_object.cpp
>> @@ -15,7 +15,8 @@
>>  
>>  #include <linux/media.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>> +
>>  #include "libcamera/internal/media_device.h"
>>  
>>  /**
>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
>> index a341004c0c19..86212cec0281 100644
>> --- a/src/libcamera/meson.build
>> +++ b/src/libcamera/meson.build
>> @@ -2,7 +2,6 @@
>>  
>>  libcamera_sources = files([
>>      'bayer_format.cpp',
>> -    'bound_method.cpp',
>>      'buffer.cpp',
>>      'byte_stream_buffer.cpp',
>>      'camera.cpp',
>> @@ -16,8 +15,6 @@ libcamera_sources = files([
>>      'delayed_controls.cpp',
>>      'device_enumerator.cpp',
>>      'device_enumerator_sysfs.cpp',
>> -    'event_dispatcher.cpp',
>> -    'event_dispatcher_poll.cpp',
>>      'event_notifier.cpp',
>>      'file.cpp',
>>      'file_descriptor.cpp',
>> @@ -33,23 +30,16 @@ libcamera_sources = files([
>>      'ipc_pipe.cpp',
>>      'ipc_pipe_unixsocket.cpp',
>>      'ipc_unixsocket.cpp',
>> -    'log.cpp',
>>      'media_device.cpp',
>>      'media_object.cpp',
>> -    'message.cpp',
>> -    'object.cpp',
>>      'pipeline_handler.cpp',
>>      'pixel_format.cpp',
>>      'process.cpp',
>>      'pub_key.cpp',
>>      'request.cpp',
>> -    'semaphore.cpp',
>> -    'signal.cpp',
>>      'source-paths.cpp',
>>      'stream.cpp',
>>      'sysfs.cpp',
>> -    'thread.cpp',
>> -    'timer.cpp',
>>      'transform.cpp',
>>      'v4l2_device.cpp',
>>      'v4l2_pixelformat.cpp',
>> @@ -128,7 +118,6 @@ libcamera_deps = [
>>      liblttng,
>>      libudev,
>>      libcamera_base,
>> -    dependency('threads'),
>>  ]
>>  
>>  # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.
>> diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h
>> index d8d4a181ffd1..f28e9f1ddf42 100644
>> --- a/src/libcamera/pipeline/ipu3/cio2.h
>> +++ b/src/libcamera/pipeline/ipu3/cio2.h
>> @@ -11,7 +11,7 @@
>>  #include <queue>
>>  #include <vector>
>>  
>> -#include <libcamera/signal.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  #include "libcamera/internal/v4l2_subdevice.h"
>>  #include "libcamera/internal/v4l2_videodevice.h"
>> diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h
>> index 59e64e8170a2..3ef7e4454693 100644
>> --- a/src/libcamera/pipeline/ipu3/frames.h
>> +++ b/src/libcamera/pipeline/ipu3/frames.h
>> @@ -12,7 +12,7 @@
>>  #include <queue>
>>  #include <vector>
>>  
>> -#include <libcamera/signal.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  namespace libcamera {
>>  
>> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
>> index 32d143a862b2..e955bc3456ba 100644
>> --- a/src/libcamera/pipeline/ipu3/imgu.cpp
>> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp
>> @@ -13,12 +13,12 @@
>>  
>>  #include <linux/media-bus-format.h>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/utils.h>
>> +
>>  #include <libcamera/formats.h>
>>  #include <libcamera/stream.h>
>>  
>> -#include <libcamera/base/utils.h>
>> -
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_device.h"
>>  
>>  namespace libcamera {
>> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
>> index 6b43ad2fb2b1..76c3bb3d8aa9 100644
>> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
>> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
>> @@ -11,6 +11,9 @@
>>  #include <queue>
>>  #include <vector>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/utils.h>
>> +
>>  #include <libcamera/camera.h>
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/formats.h>
>> @@ -20,13 +23,10 @@
>>  #include <libcamera/request.h>
>>  #include <libcamera/stream.h>
>>  
>> -#include <libcamera/base/utils.h>
>> -
>>  #include "libcamera/internal/camera_sensor.h"
>>  #include "libcamera/internal/delayed_controls.h"
>>  #include "libcamera/internal/device_enumerator.h"
>>  #include "libcamera/internal/ipa_manager.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_device.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  
>> diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
>> index 4d5dd6cb87cc..573ea11de607 100644
>> --- a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
>> +++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
>> @@ -14,7 +14,7 @@
>>  #include <sys/ioctl.h>
>>  #include <unistd.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  /*
>>   * /dev/dma-heap/linux,cma is the dma-heap allocator, which allows dmaheap-cma
>> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
>> index f2430415d32d..b3265d0e8aab 100644
>> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
>> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
>> @@ -6,9 +6,9 @@
>>   */
>>  #include "rpi_stream.h"
>>  
>> -#include <libcamera/ipa/raspberrypi_ipa_interface.h>
>> +#include <libcamera/base/log.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/ipa/raspberrypi_ipa_interface.h>
>>  
>>  namespace libcamera {
>>  
>> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
>> index c625d7248f5c..00df4f0b3e6b 100644
>> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
>> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
>> @@ -14,6 +14,9 @@
>>  
>>  #include <linux/media-bus-format.h>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/utils.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/camera.h>
>>  #include <libcamera/control_ids.h>
>> @@ -24,13 +27,10 @@
>>  #include <libcamera/request.h>
>>  #include <libcamera/stream.h>
>>  
>> -#include <libcamera/base/utils.h>
>> -
>>  #include "libcamera/internal/camera_sensor.h"
>>  #include "libcamera/internal/delayed_controls.h"
>>  #include "libcamera/internal/device_enumerator.h"
>>  #include "libcamera/internal/ipa_manager.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_device.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  #include "libcamera/internal/v4l2_subdevice.h"
>> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
>> index 3b3e37d258d0..c185ac3992dd 100644
>> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h
>> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
>> @@ -10,10 +10,11 @@
>>  #include <memory>
>>  #include <vector>
>>  
>> +#include <libcamera/base/signal.h>
>> +
>>  #include <libcamera/camera.h>
>>  #include <libcamera/geometry.h>
>>  #include <libcamera/pixel_format.h>
>> -#include <libcamera/signal.h>
>>  #include <libcamera/span.h>
>>  
>>  #include "libcamera/internal/media_object.h"
>> diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp
>> index 589f185b1bf1..9af1096be834 100644
>> --- a/src/libcamera/pipeline/simple/converter.cpp
>> +++ b/src/libcamera/pipeline/simple/converter.cpp
>> @@ -10,14 +10,14 @@
>>  #include <algorithm>
>>  #include <limits.h>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/signal.h>
>> +#include <libcamera/base/utils.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/geometry.h>
>> -#include <libcamera/signal.h>
>>  #include <libcamera/stream.h>
>>  
>> -#include <libcamera/base/utils.h>
>> -
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_device.h"
>>  #include "libcamera/internal/v4l2_videodevice.h"
>>  
>> diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h
>> index 480e528d2210..276a2a291c21 100644
>> --- a/src/libcamera/pipeline/simple/converter.h
>> +++ b/src/libcamera/pipeline/simple/converter.h
>> @@ -16,9 +16,9 @@
>>  #include <vector>
>>  
>>  #include <libcamera/pixel_format.h>
>> -#include <libcamera/signal.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  namespace libcamera {
>>  
>> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
>> index 1894014d8fc7..4d78e6faf403 100644
>> --- a/src/libcamera/pipeline/simple/simple.cpp
>> +++ b/src/libcamera/pipeline/simple/simple.cpp
>> @@ -21,6 +21,8 @@
>>  
>>  #include <linux/media-bus-format.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/camera.h>
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/request.h>
>> @@ -28,7 +30,6 @@
>>  
>>  #include "libcamera/internal/camera_sensor.h"
>>  #include "libcamera/internal/device_enumerator.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_device.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  #include "libcamera/internal/v4l2_subdevice.h"
>> diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
>> index d8c17dccae53..0f634b8da609 100644
>> --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
>> +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
>> @@ -12,6 +12,9 @@
>>  #include <memory>
>>  #include <tuple>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/utils.h>
>> +
>>  #include <libcamera/camera.h>
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/controls.h>
>> @@ -19,10 +22,7 @@
>>  #include <libcamera/request.h>
>>  #include <libcamera/stream.h>
>>  
>> -#include <libcamera/base/utils.h>
>> -
>>  #include "libcamera/internal/device_enumerator.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_device.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  #include "libcamera/internal/sysfs.h"
>> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
>> index 025ca56205f8..361b715778ef 100644
>> --- a/src/libcamera/pipeline/vimc/vimc.cpp
>> +++ b/src/libcamera/pipeline/vimc/vimc.cpp
>> @@ -14,21 +14,23 @@
>>  #include <linux/media-bus-format.h>
>>  #include <linux/version.h>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/utils.h>
>> +
>>  #include <libcamera/camera.h>
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/controls.h>
>>  #include <libcamera/formats.h>
>>  #include <libcamera/ipa/ipa_interface.h>
>>  #include <libcamera/ipa/ipa_module_info.h>
>> +#include <libcamera/ipa/vimc_ipa_interface.h>
>> +#include <libcamera/ipa/vimc_ipa_proxy.h>
> 
> I thought these are already included below?
> 
>>  #include <libcamera/request.h>
>>  #include <libcamera/stream.h>
>>  
>> -#include <libcamera/base/utils.h>
>> -
>>  #include "libcamera/internal/camera_sensor.h"
>>  #include "libcamera/internal/device_enumerator.h"
>>  #include "libcamera/internal/ipa_manager.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_device.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  #include "libcamera/internal/v4l2_subdevice.h"
> 
> Like below here.
> 
> With that resolved,

Yes, I think they are - this patch shouldn't be introducing new lines,
only moving them.

I think this was an artifact of my trying to use automated tooling to
sort all the headers. I guess it's mostly worked out ;-)

I'll fix it now.

Wow - that turned out to be a rabbit hole.

Other things fixed, and clang-format sort orders re-improved.

> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

Thanks

> 
>> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
>> index 6fb2a743c3c2..f626eddd321f 100644
>> --- a/src/libcamera/pipeline_handler.cpp
>> +++ b/src/libcamera/pipeline_handler.cpp
>> @@ -9,14 +9,14 @@
>>  
>>  #include <sys/sysmacros.h>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/utils.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/camera.h>
>>  #include <libcamera/camera_manager.h>
>>  
>> -#include <libcamera/base/utils.h>
>> -
>>  #include "libcamera/internal/device_enumerator.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_device.h"
>>  #include "libcamera/internal/tracepoints.h"
>>  
>> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp
>> index 35091f60c1e9..463380299a65 100644
>> --- a/src/libcamera/process.cpp
>> +++ b/src/libcamera/process.cpp
>> @@ -20,10 +20,10 @@
>>  #include <unistd.h>
>>  #include <vector>
>>  
>> +#include <libcamera/base/log.h>
>>  #include <libcamera/base/utils.h>
>>  
>>  #include "libcamera/internal/event_notifier.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  /**
>>   * \file process.h
>> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
>> index 6611e74d1800..518384eb8cf6 100644
>> --- a/src/libcamera/request.cpp
>> +++ b/src/libcamera/request.cpp
>> @@ -10,13 +10,14 @@
>>  #include <map>
>>  #include <sstream>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/camera.h>
>>  #include <libcamera/control_ids.h>
>>  #include <libcamera/stream.h>
>>  
>>  #include "libcamera/internal/camera_controls.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/tracepoints.h"
>>  
>>  /**
>> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
>> index d5d68427e658..b8626775d224 100644
>> --- a/src/libcamera/stream.cpp
>> +++ b/src/libcamera/stream.cpp
>> @@ -15,9 +15,9 @@
>>  
>>  #include <libcamera/request.h>
>>  
>> +#include <libcamera/base/log.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/log.h"
>>  
>>  /**
>>   * \file stream.h
>> diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp
>> index e9004b2b59c8..4372b1348178 100644
>> --- a/src/libcamera/sysfs.cpp
>> +++ b/src/libcamera/sysfs.cpp
>> @@ -12,8 +12,9 @@
>>  #include <sys/stat.h>
>>  #include <sys/sysmacros.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include "libcamera/internal/file.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  /**
>>   * \file sysfs.h
>> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
>> index facb53e13169..334b9b78b812 100644
>> --- a/src/libcamera/v4l2_device.cpp
>> +++ b/src/libcamera/v4l2_device.cpp
>> @@ -16,10 +16,10 @@
>>  #include <sys/syscall.h>
>>  #include <unistd.h>
>>  
>> +#include <libcamera/base/log.h>
>>  #include <libcamera/base/utils.h>
>>  
>>  #include "libcamera/internal/event_notifier.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/sysfs.h"
>>  
>>  /**
>> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
>> index 166d93cf1d20..87d728fe5577 100644
>> --- a/src/libcamera/v4l2_pixelformat.cpp
>> +++ b/src/libcamera/v4l2_pixelformat.cpp
>> @@ -12,11 +12,12 @@
>>  #include <map>
>>  #include <string.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/formats.h>
>>  #include <libcamera/pixel_format.h>
>>  
>>  #include "libcamera/internal/formats.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  /**
>>   * \file v4l2_pixelformat.h
>> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
>> index 2c56cfafbce4..8fe5e45b31ee 100644
>> --- a/src/libcamera/v4l2_subdevice.cpp
>> +++ b/src/libcamera/v4l2_subdevice.cpp
>> @@ -19,9 +19,9 @@
>>  
>>  #include <libcamera/geometry.h>
>>  
>> +#include <libcamera/base/log.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_device.h"
>>  #include "libcamera/internal/media_object.h"
>>  
>> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
>> index 12c09dc7578d..dc23510bc5aa 100644
>> --- a/src/libcamera/v4l2_videodevice.cpp
>> +++ b/src/libcamera/v4l2_videodevice.cpp
>> @@ -21,10 +21,11 @@
>>  
>>  #include <linux/version.h>
>>  
>> +#include <libcamera/base/log.h>
>> +
>>  #include <libcamera/file_descriptor.h>
>>  
>>  #include "libcamera/internal/event_notifier.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/media_device.h"
>>  #include "libcamera/internal/media_object.h"
>>  
>> diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp
>> index 97825c715bba..157ab94e0544 100644
>> --- a/src/v4l2/v4l2_camera.cpp
>> +++ b/src/v4l2/v4l2_camera.cpp
>> @@ -10,7 +10,7 @@
>>  #include <errno.h>
>>  #include <unistd.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/base/log.h>
>>  
>>  using namespace libcamera;
>>  
>> diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
>> index d238046250e3..dbe0573bd3a4 100644
>> --- a/src/v4l2/v4l2_camera.h
>> +++ b/src/v4l2/v4l2_camera.h
>> @@ -12,13 +12,13 @@
>>  #include <mutex>
>>  #include <utility>
>>  
>> +#include <libcamera/base/semaphore.h>
>> +
>>  #include <libcamera/buffer.h>
>>  #include <libcamera/camera.h>
>>  #include <libcamera/file_descriptor.h>
>>  #include <libcamera/framebuffer_allocator.h>
>>  
>> -#include "libcamera/internal/semaphore.h"
>> -
>>  using namespace libcamera;
>>  
>>  class V4L2Camera
>> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
>> index a5a25507462e..7682c4bddf90 100644
>> --- a/src/v4l2/v4l2_camera_proxy.cpp
>> +++ b/src/v4l2/v4l2_camera_proxy.cpp
>> @@ -18,12 +18,12 @@
>>  
>>  #include <libcamera/camera.h>
>>  #include <libcamera/formats.h>
>> -#include <libcamera/object.h>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/object.h>
>>  #include <libcamera/base/utils.h>
>>  
>>  #include "libcamera/internal/formats.h"
>> -#include "libcamera/internal/log.h"
>>  
>>  #include "v4l2_camera.h"
>>  #include "v4l2_camera_file.h"
>> diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp
>> index 27de6c50ff4e..e566125a70ac 100644
>> --- a/src/v4l2/v4l2_compat_manager.cpp
>> +++ b/src/v4l2/v4l2_compat_manager.cpp
>> @@ -19,12 +19,11 @@
>>  #include <sys/types.h>
>>  #include <unistd.h>
>>  
>> -#include <libcamera/camera.h>
>> -#include <libcamera/camera_manager.h>
>> -
>> +#include <libcamera/base/log.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/camera.h>
>> +#include <libcamera/camera_manager.h>
>>  
>>  #include "v4l2_camera_file.h"
>>  
>> diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp
>> index 61f4eb92ae95..c504ea09e64b 100644
>> --- a/test/camera/buffer_import.cpp
>> +++ b/test/camera/buffer_import.cpp
>> @@ -12,11 +12,12 @@
>>  #include <numeric>
>>  #include <vector>
>>  
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>> +
>>  #include "libcamera/internal/device_enumerator.h"
>> -#include "libcamera/internal/event_dispatcher.h"
>>  #include "libcamera/internal/media_device.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  #include "libcamera/internal/v4l2_videodevice.h"
>>  
>>  #include "buffer_source.h"
>> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp
>> index c4bc21100777..238d98dbba16 100644
>> --- a/test/camera/capture.cpp
>> +++ b/test/camera/capture.cpp
>> @@ -9,9 +9,9 @@
>>  
>>  #include <libcamera/framebuffer_allocator.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>>  
>>  #include "camera_test.h"
>>  #include "test.h"
>> diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp
>> index 8ae05ac62985..1cc17b045ec0 100644
>> --- a/test/event-dispatcher.cpp
>> +++ b/test/event-dispatcher.cpp
>> @@ -10,9 +10,9 @@
>>  #include <signal.h>
>>  #include <sys/time.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/event-thread.cpp b/test/event-thread.cpp
>> index aeb8b3bf4bac..05c5d26d3611 100644
>> --- a/test/event-thread.cpp
>> +++ b/test/event-thread.cpp
>> @@ -10,9 +10,10 @@
>>  #include <string.h>
>>  #include <unistd.h>
>>  
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>> +
>>  #include "libcamera/internal/event_notifier.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/event.cpp b/test/event.cpp
>> index 1f16c97bbab5..aa79da99c286 100644
>> --- a/test/event.cpp
>> +++ b/test/event.cpp
>> @@ -9,10 +9,11 @@
>>  #include <string.h>
>>  #include <unistd.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>> +
>>  #include "libcamera/internal/event_notifier.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp
>> index 94cb859352ec..bb160537c5d5 100644
>> --- a/test/hotplug-cameras.cpp
>> +++ b/test/hotplug-cameras.cpp
>> @@ -14,10 +14,11 @@
>>  #include <libcamera/camera.h>
>>  #include <libcamera/camera_manager.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>> +
>>  #include "libcamera/internal/file.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp
>> index d6ca6f5137b0..656d86552d85 100644
>> --- a/test/ipa/ipa_interface_test.cpp
>> +++ b/test/ipa/ipa_interface_test.cpp
>> @@ -14,15 +14,16 @@
>>  
>>  #include <libcamera/ipa/vimc_ipa_proxy.h>
>>  
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>> +
>>  #include "libcamera/internal/device_enumerator.h"
>> -#include "libcamera/internal/event_dispatcher.h"
>>  #include "libcamera/internal/event_notifier.h"
>>  #include "libcamera/internal/ipa_manager.h"
>>  #include "libcamera/internal/ipa_module.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>>  #include "libcamera/internal/process.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp
>> index 80157b342795..aa35c8f071f1 100644
>> --- a/test/ipc/unixsocket.cpp
>> +++ b/test/ipc/unixsocket.cpp
>> @@ -16,10 +16,11 @@
>>  #include <sys/wait.h>
>>  #include <unistd.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>> +
>>  #include "libcamera/internal/ipc_unixsocket.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp
>> index 161d09b98719..6fe7fd9b8fc5 100644
>> --- a/test/ipc/unixsocket_ipc.cpp
>> +++ b/test/ipc/unixsocket_ipc.cpp
>> @@ -15,19 +15,18 @@
>>  #include <sys/wait.h>
>>  #include <unistd.h>
>>  
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>>  #include "libcamera/internal/ipa_data_serializer.h"
>>  #include "libcamera/internal/ipc_pipe.h"
>>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>>  #include "libcamera/internal/process.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  
>>  #include "test.h"
>>  
>> -
>>  using namespace std;
>>  using namespace libcamera;
>>  
>> diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp
>> index ae3c607a6881..5311896095a9 100644
>> --- a/test/log/log_api.cpp
>> +++ b/test/log/log_api.cpp
>> @@ -16,9 +16,9 @@
>>  #include <sys/types.h>
>>  #include <unistd.h>
>>  
>> -#include <libcamera/logging.h>
>> +#include <libcamera/base/log.h>
>>  
>> -#include "libcamera/internal/log.h"
>> +#include <libcamera/logging.h>
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp
>> index 413d9207ea68..d138aa7ff562 100644
>> --- a/test/log/log_process.cpp
>> +++ b/test/log/log_process.cpp
>> @@ -16,13 +16,13 @@
>>  
>>  #include <libcamera/logging.h>
>>  
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/process.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/message.cpp b/test/message.cpp
>> index 9553ba8cbaed..eeea57feab76 100644
>> --- a/test/message.cpp
>> +++ b/test/message.cpp
>> @@ -9,8 +9,8 @@
>>  #include <iostream>
>>  #include <thread>
>>  
>> -#include "libcamera/internal/message.h"
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/base/message.h>
>> +#include <libcamera/base/thread.h>
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/object-delete.cpp b/test/object-delete.cpp
>> index a1a6f5ccefd5..eabefe935974 100644
>> --- a/test/object-delete.cpp
>> +++ b/test/object-delete.cpp
>> @@ -7,9 +7,8 @@
>>  
>>  #include <iostream>
>>  
>> -#include <libcamera/object.h>
>> -
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/base/object.h>
>> +#include <libcamera/base/thread.h>
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp
>> index a6f816f395eb..b1c0f473ba5c 100644
>> --- a/test/object-invoke.cpp
>> +++ b/test/object-invoke.cpp
>> @@ -8,10 +8,9 @@
>>  #include <iostream>
>>  #include <thread>
>>  
>> -#include <libcamera/object.h>
>> -
>> -#include "libcamera/internal/event_dispatcher.h"
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/object.h>
>> +#include <libcamera/base/thread.h>
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/object.cpp b/test/object.cpp
>> index 264659b405d9..cbd0d3ececab 100644
>> --- a/test/object.cpp
>> +++ b/test/object.cpp
>> @@ -7,10 +7,9 @@
>>  
>>  #include <iostream>
>>  
>> -#include <libcamera/object.h>
>> -
>> -#include "libcamera/internal/message.h"
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/base/message.h>
>> +#include <libcamera/base/object.h>
>> +#include <libcamera/base/thread.h>
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp
>> index a5155bae3162..8f7a1f05f681 100644
>> --- a/test/process/process_test.cpp
>> +++ b/test/process/process_test.cpp
>> @@ -9,12 +9,13 @@
>>  #include <unistd.h>
>>  #include <vector>
>>  
>> +
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>>  #include "libcamera/internal/process.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp
>> index dbbba8912386..880bcd02c6be 100644
>> --- a/test/serialization/ipa_data_serializer_test.cpp
>> +++ b/test/serialization/ipa_data_serializer_test.cpp
>> @@ -17,13 +17,14 @@
>>  #include <unistd.h>
>>  #include <vector>
>>  
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>> +
>>  #include "libcamera/internal/device_enumerator.h"
>>  #include "libcamera/internal/ipa_data_serializer.h"
>>  #include "libcamera/internal/ipa_manager.h"
>>  #include "libcamera/internal/ipa_module.h"
>>  #include "libcamera/internal/pipeline_handler.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  
>>  #include "serialization_test.h"
>>  #include "test.h"
>> diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp
>> index 8a96b5d2abb3..d5e2eb662df2 100644
>> --- a/test/signal-threads.cpp
>> +++ b/test/signal-threads.cpp
>> @@ -9,11 +9,10 @@
>>  #include <iostream>
>>  #include <thread>
>>  
>> +#include <libcamera/base/message.h>
>> +#include <libcamera/base/thread.h>
>>  #include <libcamera/base/utils.h>
>>  
>> -#include "libcamera/internal/message.h"
>> -#include "libcamera/internal/thread.h"
>> -
>>  #include "test.h"
>>  
>>  using namespace std;
>> diff --git a/test/signal.cpp b/test/signal.cpp
>> index f83ceb05f091..aceb02789cf4 100644
>> --- a/test/signal.cpp
>> +++ b/test/signal.cpp
>> @@ -8,8 +8,8 @@
>>  #include <iostream>
>>  #include <string.h>
>>  
>> -#include <libcamera/object.h>
>> -#include <libcamera/signal.h>
>> +#include <libcamera/base/object.h>
>> +#include <libcamera/base/signal.h>
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/threads.cpp b/test/threads.cpp
>> index e0c50dc90a65..d83b5833998f 100644
>> --- a/test/threads.cpp
>> +++ b/test/threads.cpp
>> @@ -10,7 +10,7 @@
>>  #include <memory>
>>  #include <thread>
>>  
>> -#include "libcamera/internal/thread.h"
>> +#include <libcamera/base/thread.h>
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp
>> index be29eee1bdb6..2c14865b74d5 100644
>> --- a/test/timer-thread.cpp
>> +++ b/test/timer-thread.cpp
>> @@ -8,9 +8,9 @@
>>  #include <chrono>
>>  #include <iostream>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/timer.cpp b/test/timer.cpp
>> index fc90b11040d8..88f226e79f5f 100644
>> --- a/test/timer.cpp
>> +++ b/test/timer.cpp
>> @@ -8,9 +8,9 @@
>>  #include <chrono>
>>  #include <iostream>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>>  
>>  #include "test.h"
>>  
>> diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp
>> index c75259be0d10..91b3e4a0dad6 100644
>> --- a/test/v4l2_videodevice/buffer_sharing.cpp
>> +++ b/test/v4l2_videodevice/buffer_sharing.cpp
>> @@ -14,9 +14,9 @@
>>  
>>  #include <libcamera/buffer.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>>  
>>  #include "v4l2_videodevice_test.h"
>>  
>> diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp
>> index accdb34a699c..f12c8bef97f6 100644
>> --- a/test/v4l2_videodevice/capture_async.cpp
>> +++ b/test/v4l2_videodevice/capture_async.cpp
>> @@ -9,9 +9,9 @@
>>  
>>  #include <libcamera/buffer.h>
>>  
>> -#include "libcamera/internal/event_dispatcher.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>>  
>>  #include "v4l2_videodevice_test.h"
>>  
>> diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
>> index e0f068082c01..fe4b3cc6487f 100644
>> --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp
>> +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
>> @@ -9,11 +9,12 @@
>>  
>>  #include <libcamera/buffer.h>
>>  
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/timer.h>
>> +
>>  #include "libcamera/internal/device_enumerator.h"
>> -#include "libcamera/internal/event_dispatcher.h"
>>  #include "libcamera/internal/media_device.h"
>> -#include "libcamera/internal/thread.h"
>> -#include "libcamera/internal/timer.h"
>>  #include "libcamera/internal/v4l2_videodevice.h"
>>  
>>  #include "test.h"
>> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
>> index dc6748153445..5a64fe9cfeee 100644
>> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
>> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
>> @@ -23,6 +23,9 @@
>>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>
>>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>
>>  
>> +#include <libcamera/base/log.h>
>> +#include <libcamera/base/thread.h>
>> +
>>  #include "libcamera/internal/control_serializer.h"
>>  #include "libcamera/internal/ipa_data_serializer.h"
>>  #include "libcamera/internal/ipa_module.h"
>> @@ -30,9 +33,7 @@
>>  #include "libcamera/internal/ipc_pipe.h"
>>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>>  #include "libcamera/internal/ipc_unixsocket.h"
>> -#include "libcamera/internal/log.h"
>>  #include "libcamera/internal/process.h"
>> -#include "libcamera/internal/thread.h"
>>  
>>  namespace libcamera {
>>  
>> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
>> index 017b870c9dad..ae168548492c 100644
>> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
>> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
>> @@ -19,12 +19,13 @@
>>  #include <libcamera/ipa/ipa_interface.h>
>>  #include <libcamera/ipa/{{module_name}}_ipa_interface.h>
>>  
>> +#include <libcamera/base/thread.h>
>> +
>>  #include "libcamera/internal/control_serializer.h"
>>  #include "libcamera/internal/ipa_proxy.h"
>>  #include "libcamera/internal/ipc_pipe.h"
>>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>>  #include "libcamera/internal/ipc_unixsocket.h"
>> -#include "libcamera/internal/thread.h"
>>  
>>  namespace libcamera {
>>  {%- if has_namespace %}
>> diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
>> index 8a57b6cc8b34..d993e39e5a5f 100644
>> --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
>> +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
>> @@ -26,17 +26,18 @@
>>  #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>
>>  #include <libcamera/logging.h>
>>  
>> +#include <libcamera/base/event_dispatcher.h>
>> +#include <libcamera/base/thread.h>
>> +#include <libcamera/base/log.h>
>> +
>>  #include "libcamera/internal/camera_sensor.h"
>>  #include "libcamera/internal/control_serializer.h"
>> -#include "libcamera/internal/event_dispatcher.h"
>>  #include "libcamera/internal/ipa_data_serializer.h"
>>  #include "libcamera/internal/ipa_module.h"
>>  #include "libcamera/internal/ipa_proxy.h"
>>  #include "libcamera/internal/ipc_pipe.h"
>>  #include "libcamera/internal/ipc_pipe_unixsocket.h"
>>  #include "libcamera/internal/ipc_unixsocket.h"
>> -#include "libcamera/internal/log.h"
>> -#include "libcamera/internal/thread.h"
>>  
>>  using namespace libcamera;
>>  
>> -- 
>> 2.30.2
>>

Patch
diff mbox series

diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
index 3047e006e5b6..152776935a33 100644
--- a/Documentation/guides/pipeline-handler.rst
+++ b/Documentation/guides/pipeline-handler.rst
@@ -288,7 +288,8 @@  features:
 
 .. code-block:: cpp
 
-   #include "libcamera/internal/log.h"
+   #include <libcamera/base/log.h>
+   
    #include "libcamera/internal/pipeline_handler.h"
 
 Run the following commands:
diff --git a/include/libcamera/bound_method.h b/include/libcamera/base/bound_method.h
similarity index 97%
rename from include/libcamera/bound_method.h
rename to include/libcamera/base/bound_method.h
index 4fc445ecd191..282f9b58ab60 100644
--- a/include/libcamera/bound_method.h
+++ b/include/libcamera/base/bound_method.h
@@ -4,8 +4,8 @@ 
  *
  * bound_method.h - Method bind and invocation
  */
-#ifndef __LIBCAMERA_BOUND_METHOD_H__
-#define __LIBCAMERA_BOUND_METHOD_H__
+#ifndef __LIBCAMERA_BASE_BOUND_METHOD_H__
+#define __LIBCAMERA_BASE_BOUND_METHOD_H__
 
 #include <memory>
 #include <tuple>
@@ -236,4 +236,4 @@  private:
 
 } /* namespace libcamera */
 
-#endif /* __LIBCAMERA_BOUND_METHOD_H__ */
+#endif /* __LIBCAMERA_BASE_BOUND_METHOD_H__ */
diff --git a/include/libcamera/internal/event_dispatcher.h b/include/libcamera/base/event_dispatcher.h
similarity index 79%
rename from include/libcamera/internal/event_dispatcher.h
rename to include/libcamera/base/event_dispatcher.h
index e6a8ad65ce0a..045df27fff16 100644
--- a/include/libcamera/internal/event_dispatcher.h
+++ b/include/libcamera/base/event_dispatcher.h
@@ -4,8 +4,8 @@ 
  *
  * event_dispatcher.h - Event dispatcher
  */
-#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__
-#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__
+#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_H__
+#define __LIBCAMERA_BASE_EVENT_DISPATCHER_H__
 
 #include <vector>
 
@@ -32,4 +32,4 @@  public:
 
 } /* namespace libcamera */
 
-#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_H__ */
+#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_H__ */
diff --git a/include/libcamera/internal/event_dispatcher_poll.h b/include/libcamera/base/event_dispatcher_poll.h
similarity index 82%
rename from include/libcamera/internal/event_dispatcher_poll.h
rename to include/libcamera/base/event_dispatcher_poll.h
index 33de051de261..ae2a3f04e4b9 100644
--- a/include/libcamera/internal/event_dispatcher_poll.h
+++ b/include/libcamera/base/event_dispatcher_poll.h
@@ -4,14 +4,14 @@ 
  *
  * event_dispatcher_poll.h - Poll-based event dispatcher
  */
-#ifndef __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__
-#define __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__
+#ifndef __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__
+#define __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__
 
 #include <list>
 #include <map>
 #include <vector>
 
-#include "libcamera/internal/event_dispatcher.h"
+#include <libcamera/base/event_dispatcher.h>
 
 struct pollfd;
 
@@ -55,4 +55,4 @@  private:
 
 } /* namespace libcamera */
 
-#endif /* __LIBCAMERA_INTERNAL_EVENT_DISPATCHER_POLL_H__ */
+#endif /* __LIBCAMERA_BASE_EVENT_DISPATCHER_POLL_H__ */
diff --git a/include/libcamera/internal/log.h b/include/libcamera/base/log.h
similarity index 96%
rename from include/libcamera/internal/log.h
rename to include/libcamera/base/log.h
index 82e55a623e04..b93c947ae7db 100644
--- a/include/libcamera/internal/log.h
+++ b/include/libcamera/base/log.h
@@ -4,8 +4,8 @@ 
  *
  * log.h - Logging infrastructure
  */
-#ifndef __LIBCAMERA_INTERNAL_LOG_H__
-#define __LIBCAMERA_INTERNAL_LOG_H__
+#ifndef __LIBCAMERA_BASE_LOG_H__
+#define __LIBCAMERA_BASE_LOG_H__
 
 #include <chrono>
 #include <sstream>
@@ -127,4 +127,4 @@  LogMessage _log(const LogCategory *category, LogSeverity severity,
 
 } /* namespace libcamera */
 
-#endif /* __LIBCAMERA_INTERNAL_LOG_H__ */
+#endif /* __LIBCAMERA_BASE_LOG_H__ */
diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
index 2db756c504c9..7a858dcb6f1a 100644
--- a/include/libcamera/base/meson.build
+++ b/include/libcamera/base/meson.build
@@ -3,7 +3,17 @@ 
 libcamera_base_include_dir = libcamera_include_dir / 'base'
 
 libcamera_base_headers = files([
+    'bound_method.h',
     'class.h',
+    'event_dispatcher.h',
+    'event_dispatcher_poll.h',
+    'log.h',
+    'message.h',
+    'object.h',
+    'semaphore.h',
+    'signal.h',
+    'thread.h',
+    'timer.h',
     'utils.h',
 ])
 
diff --git a/include/libcamera/internal/message.h b/include/libcamera/base/message.h
similarity index 87%
rename from include/libcamera/internal/message.h
rename to include/libcamera/base/message.h
index f1b133bfb2ba..5d2a9f04f0a7 100644
--- a/include/libcamera/internal/message.h
+++ b/include/libcamera/base/message.h
@@ -4,12 +4,12 @@ 
  *
  * message.h - Message queue support
  */
-#ifndef __LIBCAMERA_INTERNAL_MESSAGE_H__
-#define __LIBCAMERA_INTERNAL_MESSAGE_H__
+#ifndef __LIBCAMERA_BASE_MESSAGE_H__
+#define __LIBCAMERA_BASE_MESSAGE_H__
 
 #include <atomic>
 
-#include <libcamera/bound_method.h>
+#include <libcamera/base/bound_method.h>
 
 namespace libcamera {
 
@@ -68,4 +68,4 @@  private:
 
 } /* namespace libcamera */
 
-#endif /* __LIBCAMERA_INTERNAL_MESSAGE_H__ */
+#endif /* __LIBCAMERA_BASE_MESSAGE_H__ */
diff --git a/include/libcamera/object.h b/include/libcamera/base/object.h
similarity index 89%
rename from include/libcamera/object.h
rename to include/libcamera/base/object.h
index a1882f05fb77..5c385ab4b140 100644
--- a/include/libcamera/object.h
+++ b/include/libcamera/base/object.h
@@ -4,14 +4,14 @@ 
  *
  * object.h - Base object
  */
-#ifndef __LIBCAMERA_OBJECT_H__
-#define __LIBCAMERA_OBJECT_H__
+#ifndef __LIBCAMERA_BASE_OBJECT_H__
+#define __LIBCAMERA_BASE_OBJECT_H__
 
 #include <list>
 #include <memory>
 #include <vector>
 
-#include <libcamera/bound_method.h>
+#include <libcamera/base/bound_method.h>
 
 namespace libcamera {
 
@@ -68,4 +68,4 @@  private:
 
 } /* namespace libcamera */
 
-#endif /* __LIBCAMERA_OBJECT_H__ */
+#endif /* __LIBCAMERA_BASE_OBJECT_H__ */
diff --git a/include/libcamera/internal/semaphore.h b/include/libcamera/base/semaphore.h
similarity index 74%
rename from include/libcamera/internal/semaphore.h
rename to include/libcamera/base/semaphore.h
index 9dc65d299cfd..c8e62e3ee68b 100644
--- a/include/libcamera/internal/semaphore.h
+++ b/include/libcamera/base/semaphore.h
@@ -4,12 +4,12 @@ 
  *
  * semaphore.h - General-purpose counting semaphore
  */
-#ifndef __LIBCAMERA_INTERNAL_SEMAPHORE_H__
-#define __LIBCAMERA_INTERNAL_SEMAPHORE_H__
+#ifndef __LIBCAMERA_BASE_SEMAPHORE_H__
+#define __LIBCAMERA_BASE_SEMAPHORE_H__
 
 #include <condition_variable>
 
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/thread.h>
 
 namespace libcamera {
 
@@ -31,4 +31,4 @@  private:
 
 } /* namespace libcamera */
 
-#endif /* __LIBCAMERA_INTERNAL_SEMAPHORE_H__ */
+#endif /* __LIBCAMERA_BASE_SEMAPHORE_H__ */
diff --git a/include/libcamera/signal.h b/include/libcamera/base/signal.h
similarity index 93%
rename from include/libcamera/signal.h
rename to include/libcamera/base/signal.h
index 3233529a1275..c2521769a843 100644
--- a/include/libcamera/signal.h
+++ b/include/libcamera/base/signal.h
@@ -4,16 +4,16 @@ 
  *
  * signal.h - Signal & slot implementation
  */
-#ifndef __LIBCAMERA_SIGNAL_H__
-#define __LIBCAMERA_SIGNAL_H__
+#ifndef __LIBCAMERA_BASE_SIGNAL_H__
+#define __LIBCAMERA_BASE_SIGNAL_H__
 
 #include <functional>
 #include <list>
 #include <type_traits>
 #include <vector>
 
-#include <libcamera/bound_method.h>
-#include <libcamera/object.h>
+#include <libcamera/base/bound_method.h>
+#include <libcamera/base/object.h>
 
 namespace libcamera {
 
@@ -129,4 +129,4 @@  public:
 
 } /* namespace libcamera */
 
-#endif /* __LIBCAMERA_SIGNAL_H__ */
+#endif /* __LIBCAMERA_BASE_SIGNAL_H__ */
diff --git a/include/libcamera/internal/thread.h b/include/libcamera/base/thread.h
similarity index 86%
rename from include/libcamera/internal/thread.h
rename to include/libcamera/base/thread.h
index 9662e28bb581..2ed18d49c978 100644
--- a/include/libcamera/internal/thread.h
+++ b/include/libcamera/base/thread.h
@@ -4,20 +4,18 @@ 
  *
  * thread.h - Thread support
  */
-#ifndef __LIBCAMERA_INTERNAL_THREAD_H__
-#define __LIBCAMERA_INTERNAL_THREAD_H__
+#ifndef __LIBCAMERA_BASE_THREAD_H__
+#define __LIBCAMERA_BASE_THREAD_H__
 
 #include <memory>
 #include <mutex>
 #include <sys/types.h>
 #include <thread>
 
-#include <libcamera/signal.h>
-
+#include <libcamera/base/message.h>
+#include <libcamera/base/signal.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/message.h"
-
 namespace libcamera {
 
 class EventDispatcher;
@@ -75,4 +73,4 @@  private:
 
 } /* namespace libcamera */
 
-#endif /* __LIBCAMERA_INTERNAL_THREAD_H__ */
+#endif /* __LIBCAMERA_BASE_THREAD_H__ */
diff --git a/include/libcamera/internal/timer.h b/include/libcamera/base/timer.h
similarity index 81%
rename from include/libcamera/internal/timer.h
rename to include/libcamera/base/timer.h
index 013e93c0b4e6..e79e85f1ef0d 100644
--- a/include/libcamera/internal/timer.h
+++ b/include/libcamera/base/timer.h
@@ -4,14 +4,14 @@ 
  *
  * timer.h - Generic timer
  */
-#ifndef __LIBCAMERA_INTERNAL_TIMER_H__
-#define __LIBCAMERA_INTERNAL_TIMER_H__
+#ifndef __LIBCAMERA_BASE_TIMER_H__
+#define __LIBCAMERA_BASE_TIMER_H__
 
 #include <chrono>
 #include <stdint.h>
 
-#include <libcamera/object.h>
-#include <libcamera/signal.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/signal.h>
 
 namespace libcamera {
 
@@ -46,4 +46,4 @@  private:
 
 } /* namespace libcamera */
 
-#endif /* __LIBCAMERA_INTERNAL_TIMER_H__ */
+#endif /* __LIBCAMERA_BASE_TIMER_H__ */
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
index ea0914009c2b..b081907e0cb1 100644
--- a/include/libcamera/camera.h
+++ b/include/libcamera/camera.h
@@ -13,11 +13,11 @@ 
 #include <string>
 
 #include <libcamera/base/class.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/signal.h>
 
 #include <libcamera/controls.h>
-#include <libcamera/object.h>
 #include <libcamera/request.h>
-#include <libcamera/signal.h>
 #include <libcamera/stream.h>
 #include <libcamera/transform.h>
 
diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h
index 5deede035115..744e5a06c78c 100644
--- a/include/libcamera/camera_manager.h
+++ b/include/libcamera/camera_manager.h
@@ -13,9 +13,8 @@ 
 #include <vector>
 
 #include <libcamera/base/class.h>
-
-#include <libcamera/object.h>
-#include <libcamera/signal.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/signal.h>
 
 namespace libcamera {
 
diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h
index 7bc540619721..db12b07ee8cc 100644
--- a/include/libcamera/internal/camera_sensor.h
+++ b/include/libcamera/internal/camera_sensor.h
@@ -12,13 +12,13 @@ 
 #include <vector>
 
 #include <libcamera/base/class.h>
+#include <libcamera/base/log.h>
 
 #include <libcamera/controls.h>
 #include <libcamera/geometry.h>
 #include <libcamera/ipa/core_ipa_interface.h>
 
 #include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/v4l2_subdevice.h"
 
 namespace libcamera {
diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h
index 707cfe8f309d..222caf75a0db 100644
--- a/include/libcamera/internal/device_enumerator.h
+++ b/include/libcamera/internal/device_enumerator.h
@@ -13,7 +13,7 @@ 
 
 #include <linux/media.h>
 
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
 
 namespace libcamera {
 
diff --git a/include/libcamera/internal/event_notifier.h b/include/libcamera/internal/event_notifier.h
index cc3495c024f0..8a6419f23004 100644
--- a/include/libcamera/internal/event_notifier.h
+++ b/include/libcamera/internal/event_notifier.h
@@ -7,8 +7,8 @@ 
 #ifndef __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
 #define __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
 
-#include <libcamera/object.h>
-#include <libcamera/signal.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/signal.h>
 
 namespace libcamera {
 
diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h
index 70168acc25a5..76325b1d109f 100644
--- a/include/libcamera/internal/ipa_data_serializer.h
+++ b/include/libcamera/internal/ipa_data_serializer.h
@@ -14,6 +14,8 @@ 
 #include <type_traits>
 #include <vector>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/control_ids.h>
 #include <libcamera/geometry.h>
@@ -22,7 +24,6 @@ 
 #include "libcamera/internal/byte_stream_buffer.h"
 #include "libcamera/internal/camera_sensor.h"
 #include "libcamera/internal/control_serializer.h"
-#include "libcamera/internal/log.h"
 
 namespace libcamera {
 
diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h
index e904a2be796b..34224e330da7 100644
--- a/include/libcamera/internal/ipa_manager.h
+++ b/include/libcamera/internal/ipa_manager.h
@@ -10,11 +10,12 @@ 
 #include <stdint.h>
 #include <vector>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/ipa/ipa_interface.h>
 #include <libcamera/ipa/ipa_module_info.h>
 
 #include "libcamera/internal/ipa_module.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/pipeline_handler.h"
 #include "libcamera/internal/pub_key.h"
 
diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h
index 19fc58272210..a87f56502b9a 100644
--- a/include/libcamera/internal/ipa_module.h
+++ b/include/libcamera/internal/ipa_module.h
@@ -11,10 +11,11 @@ 
 #include <string>
 #include <vector>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/ipa/ipa_interface.h>
 #include <libcamera/ipa/ipa_module_info.h>
 
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/pipeline_handler.h"
 
 namespace libcamera {
diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h
index c9a84b78cbe5..e58de3402006 100644
--- a/include/libcamera/internal/ipc_pipe.h
+++ b/include/libcamera/internal/ipc_pipe.h
@@ -9,9 +9,9 @@ 
 
 #include <vector>
 
-#include "libcamera/internal/ipc_unixsocket.h"
+#include <libcamera/base/signal.h>
 
-#include <libcamera/signal.h>
+#include "libcamera/internal/ipc_unixsocket.h"
 
 namespace libcamera {
 
diff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h
index e871b65036bd..9f5b06773ced 100644
--- a/include/libcamera/internal/ipc_unixsocket.h
+++ b/include/libcamera/internal/ipc_unixsocket.h
@@ -12,7 +12,7 @@ 
 #include <sys/types.h>
 #include <vector>
 
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
 
 namespace libcamera {
 
diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h
index c3292508c87b..8424611d7eda 100644
--- a/include/libcamera/internal/media_device.h
+++ b/include/libcamera/internal/media_device.h
@@ -14,9 +14,9 @@ 
 
 #include <linux/media.h>
 
-#include <libcamera/signal.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
 
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_object.h"
 
 namespace libcamera {
diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build
index c84f9822ef6e..64f50373a7fb 100644
--- a/include/libcamera/internal/meson.build
+++ b/include/libcamera/internal/meson.build
@@ -22,8 +22,6 @@  libcamera_internal_headers = files([
     'device_enumerator.h',
     'device_enumerator_sysfs.h',
     'device_enumerator_udev.h',
-    'event_dispatcher.h',
-    'event_dispatcher_poll.h',
     'event_notifier.h',
     'file.h',
     'formats.h',
@@ -31,18 +29,13 @@  libcamera_internal_headers = files([
     'ipa_module.h',
     'ipa_proxy.h',
     'ipc_unixsocket.h',
-    'log.h',
     'media_device.h',
     'media_object.h',
-    'message.h',
     'pipeline_handler.h',
     'process.h',
     'pub_key.h',
-    'semaphore.h',
     'source-paths.h',
     'sysfs.h',
-    'thread.h',
-    'timer.h',
     'v4l2_device.h',
     'v4l2_pixelformat.h',
     'v4l2_subdevice.h',
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index 8beb6b76dd3f..9e2d65d6f2c5 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -16,9 +16,9 @@ 
 #include <vector>
 
 #include <libcamera/base/class.h>
+#include <libcamera/base/object.h>
 
 #include <libcamera/controls.h>
-#include <libcamera/object.h>
 #include <libcamera/stream.h>
 
 #include "libcamera/internal/ipa_proxy.h"
diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
index 254cda8535ae..c4d5d9c1c009 100644
--- a/include/libcamera/internal/process.h
+++ b/include/libcamera/internal/process.h
@@ -11,7 +11,7 @@ 
 #include <string>
 #include <vector>
 
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
 
 namespace libcamera {
 
diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h
index c318e976ad8e..1edd664a9aef 100644
--- a/include/libcamera/internal/v4l2_device.h
+++ b/include/libcamera/internal/v4l2_device.h
@@ -13,12 +13,12 @@ 
 
 #include <linux/videodev2.h>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
+
 #include <libcamera/controls.h>
-#include <libcamera/signal.h>
 #include <libcamera/span.h>
 
-#include "libcamera/internal/log.h"
-
 namespace libcamera {
 
 class EventNotifier;
diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h
index d07dd6b444d0..97b89fb95087 100644
--- a/include/libcamera/internal/v4l2_subdevice.h
+++ b/include/libcamera/internal/v4l2_subdevice.h
@@ -12,11 +12,11 @@ 
 #include <vector>
 
 #include <libcamera/base/class.h>
+#include <libcamera/base/log.h>
 
 #include <libcamera/geometry.h>
 
 #include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_object.h"
 #include "libcamera/internal/v4l2_device.h"
 
diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
index 227d015e8937..a7c3d5290d92 100644
--- a/include/libcamera/internal/v4l2_videodevice.h
+++ b/include/libcamera/internal/v4l2_videodevice.h
@@ -17,14 +17,14 @@ 
 #include <linux/videodev2.h>
 
 #include <libcamera/base/class.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
 
 #include <libcamera/buffer.h>
 #include <libcamera/geometry.h>
 #include <libcamera/pixel_format.h>
-#include <libcamera/signal.h>
 
 #include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/v4l2_device.h"
 #include "libcamera/internal/v4l2_pixelformat.h"
 
diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
index 4aefaa7153b1..9a15c86b16e2 100644
--- a/include/libcamera/ipa/ipa_interface.h
+++ b/include/libcamera/ipa/ipa_interface.h
@@ -13,10 +13,11 @@ 
 #include <map>
 #include <vector>
 
+#include <libcamera/base/signal.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/controls.h>
 #include <libcamera/geometry.h>
-#include <libcamera/signal.h>
 
 namespace libcamera {
 
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index 7cba3de6ca96..d08bb3096aff 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -1,7 +1,6 @@ 
 # SPDX-License-Identifier: CC0-1.0
 
 libcamera_public_headers = files([
-    'bound_method.h',
     'buffer.h',
     'camera.h',
     'camera_manager.h',
@@ -11,10 +10,8 @@  libcamera_public_headers = files([
     'framebuffer_allocator.h',
     'geometry.h',
     'logging.h',
-    'object.h',
     'pixel_format.h',
     'request.h',
-    'signal.h',
     'span.h',
     'stream.h',
     'transform.h',
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index 00c646fea7f2..2d361c9d97dc 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -14,9 +14,9 @@ 
 #include <unordered_set>
 
 #include <libcamera/base/class.h>
+#include <libcamera/base/signal.h>
 
 #include <libcamera/controls.h>
-#include <libcamera/signal.h>
 
 namespace libcamera {
 
diff --git a/src/android/camera3_hal.cpp b/src/android/camera3_hal.cpp
index e6d435e0501f..da836baec903 100644
--- a/src/android/camera3_hal.cpp
+++ b/src/android/camera3_hal.cpp
@@ -7,7 +7,7 @@ 
 
 #include <hardware/camera_common.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "camera_device.h"
 #include "camera_hal_manager.h"
diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index 00224a6d64b4..6b5edb66fad2 100644
--- a/src/android/camera_capabilities.cpp
+++ b/src/android/camera_capabilities.cpp
@@ -12,12 +12,13 @@ 
 
 #include <hardware/camera3.h>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/control_ids.h>
 #include <libcamera/controls.h>
 #include <libcamera/property_ids.h>
 
 #include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
 
 using namespace libcamera;
 
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 6243c07e231e..86ea22b61467 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -15,16 +15,15 @@ 
 #include <unistd.h>
 #include <vector>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/utils.h>
+
 #include <libcamera/control_ids.h>
 #include <libcamera/controls.h>
 #include <libcamera/formats.h>
 #include <libcamera/property_ids.h>
 
-#include <libcamera/base/utils.h>
-
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/thread.h"
-
 #include "system/graphics.h"
 
 using namespace libcamera;
diff --git a/src/android/camera_device.h b/src/android/camera_device.h
index 090fe28a551e..4747f577a3e4 100644
--- a/src/android/camera_device.h
+++ b/src/android/camera_device.h
@@ -14,15 +14,16 @@ 
 
 #include <hardware/camera3.h>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/message.h>
+#include <libcamera/base/thread.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/camera.h>
 #include <libcamera/request.h>
 #include <libcamera/stream.h>
 
 #include "libcamera/internal/buffer.h"
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
 
 #include "camera_capabilities.h"
 #include "camera_metadata.h"
diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp
index f33ba26935da..d84de4fd6f90 100644
--- a/src/android/camera_hal_config.cpp
+++ b/src/android/camera_hal_config.cpp
@@ -21,7 +21,7 @@  namespace filesystem = std::experimental::filesystem;
 
 #include <hardware/camera3.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 using namespace libcamera;
 
diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp
index 54087d3a2e45..4cd67544f0df 100644
--- a/src/android/camera_hal_manager.cpp
+++ b/src/android/camera_hal_manager.cpp
@@ -7,11 +7,11 @@ 
 
 #include "camera_hal_manager.h"
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/camera.h>
 #include <libcamera/property_ids.h>
 
-#include "libcamera/internal/log.h"
-
 #include "camera_device.h"
 
 using namespace libcamera;
diff --git a/src/android/camera_metadata.cpp b/src/android/camera_metadata.cpp
index c7298d620668..3fc7cf273650 100644
--- a/src/android/camera_metadata.cpp
+++ b/src/android/camera_metadata.cpp
@@ -7,7 +7,7 @@ 
 
 #include "camera_metadata.h"
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 using namespace libcamera;
 
diff --git a/src/android/camera_worker.h b/src/android/camera_worker.h
index e289ef9b8655..6e1aee4a3247 100644
--- a/src/android/camera_worker.h
+++ b/src/android/camera_worker.h
@@ -9,14 +9,14 @@ 
 
 #include <memory>
 
+#include <libcamera/base/object.h>
+#include <libcamera/base/thread.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/camera.h>
-#include <libcamera/object.h>
 #include <libcamera/request.h>
 #include <libcamera/stream.h>
 
-#include "libcamera/internal/thread.h"
-
 class CameraDevice;
 
 class CaptureRequest
diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp
index f006e1d1999a..e6358ca9466f 100644
--- a/src/android/jpeg/encoder_libjpeg.cpp
+++ b/src/android/jpeg/encoder_libjpeg.cpp
@@ -16,12 +16,13 @@ 
 #include <unistd.h>
 #include <vector>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/camera.h>
 #include <libcamera/formats.h>
 #include <libcamera/pixel_format.h>
 
 #include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
 
 using namespace libcamera;
 
diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp
index 747f1cfaa8ac..0ba4cb85ffd0 100644
--- a/src/android/jpeg/exif.cpp
+++ b/src/android/jpeg/exif.cpp
@@ -14,10 +14,9 @@ 
 #include <tuple>
 #include <uchar.h>
 
+#include <libcamera/base/log.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/log.h"
-
 using namespace libcamera;
 
 LOG_DEFINE_CATEGORY(EXIF)
diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp
index 058ccc998c6f..0e93f365d6db 100644
--- a/src/android/jpeg/post_processor_jpeg.cpp
+++ b/src/android/jpeg/post_processor_jpeg.cpp
@@ -14,9 +14,9 @@ 
 #include "encoder_libjpeg.h"
 #include "exif.h"
 
-#include <libcamera/formats.h>
+#include <libcamera/base/log.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/formats.h>
 
 using namespace libcamera;
 using namespace std::chrono_literals;
diff --git a/src/android/jpeg/thumbnailer.cpp b/src/android/jpeg/thumbnailer.cpp
index f709d3435d9c..5cb00744a688 100644
--- a/src/android/jpeg/thumbnailer.cpp
+++ b/src/android/jpeg/thumbnailer.cpp
@@ -7,9 +7,9 @@ 
 
 #include "thumbnailer.h"
 
-#include <libcamera/formats.h>
+#include <libcamera/base/log.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/formats.h>
 
 using namespace libcamera;
 
diff --git a/src/android/mm/cros_camera_buffer.cpp b/src/android/mm/cros_camera_buffer.cpp
index 59e26d1b5972..3cfa39a1714d 100644
--- a/src/android/mm/cros_camera_buffer.cpp
+++ b/src/android/mm/cros_camera_buffer.cpp
@@ -7,7 +7,7 @@ 
 
 #include "../camera_buffer.h"
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "cros-camera/camera_buffer_manager.h"
 
diff --git a/src/android/mm/generic_camera_buffer.cpp b/src/android/mm/generic_camera_buffer.cpp
index cca88cf3632f..326fdc066499 100644
--- a/src/android/mm/generic_camera_buffer.cpp
+++ b/src/android/mm/generic_camera_buffer.cpp
@@ -9,8 +9,9 @@ 
 
 #include <unistd.h>
 
+#include <libcamera/base/log.h>
+
 #include "libcamera/internal/buffer.h"
-#include "libcamera/internal/log.h"
 
 using namespace libcamera;
 
diff --git a/src/android/yuv/post_processor_yuv.cpp b/src/android/yuv/post_processor_yuv.cpp
index b67364c8f147..772e805b32cc 100644
--- a/src/android/yuv/post_processor_yuv.cpp
+++ b/src/android/yuv/post_processor_yuv.cpp
@@ -9,12 +9,13 @@ 
 
 #include <libyuv/scale.h>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/formats.h>
 #include <libcamera/geometry.h>
 #include <libcamera/pixel_format.h>
 
 #include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
 
 using namespace libcamera;
 
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 8b4c7351e9db..31a3c006a6eb 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -11,6 +11,8 @@ 
 #include <linux/intel-ipu3.h>
 #include <linux/v4l2-controls.h>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/control_ids.h>
 #include <libcamera/ipa/ipa_interface.h>
@@ -19,7 +21,6 @@ 
 #include <libcamera/request.h>
 
 #include "libcamera/internal/buffer.h"
-#include "libcamera/internal/log.h"
 
 #include "ipu3_agc.h"
 #include "ipu3_awb.h"
diff --git a/src/ipa/ipu3/ipu3_agc.cpp b/src/ipa/ipu3/ipu3_agc.cpp
index c476a60d4cb8..fd0b70f02d25 100644
--- a/src/ipa/ipu3/ipu3_agc.cpp
+++ b/src/ipa/ipu3/ipu3_agc.cpp
@@ -11,9 +11,9 @@ 
 #include <cmath>
 #include <numeric>
 
-#include <libcamera/ipa/core_ipa_interface.h>
+#include <libcamera/base/log.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/ipa/core_ipa_interface.h>
 
 #include "libipa/histogram.h"
 
diff --git a/src/ipa/ipu3/ipu3_awb.cpp b/src/ipa/ipu3/ipu3_awb.cpp
index 54ce8e67124e..9b409c8ffad9 100644
--- a/src/ipa/ipu3/ipu3_awb.cpp
+++ b/src/ipa/ipu3/ipu3_awb.cpp
@@ -10,7 +10,7 @@ 
 #include <numeric>
 #include <unordered_map>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 namespace libcamera {
 
diff --git a/src/ipa/libipa/histogram.cpp b/src/ipa/libipa/histogram.cpp
index d4d7cfdffa84..fb1eb2a2f0b1 100644
--- a/src/ipa/libipa/histogram.cpp
+++ b/src/ipa/libipa/histogram.cpp
@@ -8,7 +8,7 @@ 
 
 #include <cmath>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 /**
  * \file histogram.h
diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp
index 221898ceb40d..a66648197140 100644
--- a/src/ipa/raspberrypi/cam_helper.hpp
+++ b/src/ipa/raspberrypi/cam_helper.hpp
@@ -10,13 +10,13 @@ 
 
 #include <libcamera/span.h>
 
+#include <libcamera/base/utils.h>
+
 #include "camera_mode.h"
 #include "controller/controller.hpp"
 #include "controller/metadata.hpp"
 #include "md_parser.hpp"
 
-#include <libcamera/base/utils.h>
-
 #include "libcamera/internal/v4l2_videodevice.h"
 
 namespace RPiController {
diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp
index 96b58359a9e5..d3433ad2e7e8 100644
--- a/src/ipa/raspberrypi/controller/controller.cpp
+++ b/src/ipa/raspberrypi/controller/controller.cpp
@@ -5,7 +5,7 @@ 
  * controller.cpp - ISP controller
  */
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "algorithm.hpp"
 #include "controller.hpp"
diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp
index 55e80ac74ae1..1ed578cfdbb6 100644
--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp
@@ -9,7 +9,7 @@ 
 
 #include "linux/bcm2835-isp.h"
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../awb_status.h"
 #include "../device_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/alsc.cpp b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
index b0d24aa2ef44..3cdc95a99949 100644
--- a/src/ipa/raspberrypi/controller/rpi/alsc.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/alsc.cpp
@@ -6,7 +6,7 @@ 
  */
 #include <math.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../awb_status.h"
 #include "alsc.hpp"
diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp
index 1c917e4f3408..5cfd33a384e7 100644
--- a/src/ipa/raspberrypi/controller/rpi/awb.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp
@@ -5,7 +5,7 @@ 
  * awb.cpp - AWB control algorithm
  */
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../lux_status.h"
 
diff --git a/src/ipa/raspberrypi/controller/rpi/black_level.cpp b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
index 9ac855f50014..6b3497f13c19 100644
--- a/src/ipa/raspberrypi/controller/rpi/black_level.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/black_level.cpp
@@ -8,7 +8,7 @@ 
 #include <math.h>
 #include <stdint.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../black_level_status.h"
 
diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.cpp b/src/ipa/raspberrypi/controller/rpi/ccm.cpp
index dbdcbb39dd12..821a4c7c98c5 100644
--- a/src/ipa/raspberrypi/controller/rpi/ccm.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/ccm.cpp
@@ -5,7 +5,7 @@ 
  * ccm.cpp - CCM (colour correction matrix) control algorithm
  */
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../awb_status.h"
 #include "../ccm_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.cpp b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
index 2bc43027a291..ae55aad56739 100644
--- a/src/ipa/raspberrypi/controller/rpi/contrast.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
@@ -6,7 +6,7 @@ 
  */
 #include <stdint.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../contrast_status.h"
 #include "../histogram.hpp"
diff --git a/src/ipa/raspberrypi/controller/rpi/dpc.cpp b/src/ipa/raspberrypi/controller/rpi/dpc.cpp
index e533cd53e63b..110f50560e76 100644
--- a/src/ipa/raspberrypi/controller/rpi/dpc.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/dpc.cpp
@@ -5,7 +5,7 @@ 
  * dpc.cpp - DPC (defective pixel correction) control algorithm
  */
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "dpc.hpp"
 
diff --git a/src/ipa/raspberrypi/controller/rpi/focus.cpp b/src/ipa/raspberrypi/controller/rpi/focus.cpp
index bab4406fe3a1..a87ec802b964 100644
--- a/src/ipa/raspberrypi/controller/rpi/focus.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/focus.cpp
@@ -6,7 +6,7 @@ 
  */
 #include <stdint.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../focus_status.h"
 #include "focus.hpp"
diff --git a/src/ipa/raspberrypi/controller/rpi/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp
index 5eff116cd055..bdceb1f3d3eb 100644
--- a/src/ipa/raspberrypi/controller/rpi/geq.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp
@@ -5,7 +5,7 @@ 
  * geq.cpp - GEQ (green equalisation) control algorithm
  */
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../device_status.h"
 #include "../lux_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp
index 258e44f4dcce..f58d69397e1c 100644
--- a/src/ipa/raspberrypi/controller/rpi/lux.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp
@@ -8,7 +8,7 @@ 
 
 #include "linux/bcm2835-isp.h"
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../device_status.h"
 
diff --git a/src/ipa/raspberrypi/controller/rpi/noise.cpp b/src/ipa/raspberrypi/controller/rpi/noise.cpp
index 156f750192f8..63cad639f313 100644
--- a/src/ipa/raspberrypi/controller/rpi/noise.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/noise.cpp
@@ -7,7 +7,7 @@ 
 
 #include <math.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../device_status.h"
 #include "../noise_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/sdn.cpp b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
index 959bc7406a01..9384550983e7 100644
--- a/src/ipa/raspberrypi/controller/rpi/sdn.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/sdn.cpp
@@ -5,7 +5,7 @@ 
  * sdn.cpp - SDN (spatial denoise) control algorithm
  */
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../denoise_status.h"
 #include "../noise_status.h"
diff --git a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
index 2cd861ca6898..b0c2e00a8ee1 100644
--- a/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/sharpen.cpp
@@ -7,7 +7,7 @@ 
 
 #include <math.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include "../sharpen_status.h"
 
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 1c1e802a2cdc..a3f014495e80 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -13,6 +13,10 @@ 
 #include <string.h>
 #include <sys/mman.h>
 
+#include <linux/bcm2835-isp.h>
+
+#include <libcamera/base/log.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/control_ids.h>
 #include <libcamera/controls.h>
@@ -25,9 +29,6 @@ 
 #include <libcamera/span.h>
 
 #include "libcamera/internal/buffer.h"
-#include "libcamera/internal/log.h"
-
-#include <linux/bcm2835-isp.h>
 
 #include "agc_algorithm.hpp"
 #include "agc_status.h"
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index b47ea3240f63..cdfb4d139e41 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -15,6 +15,8 @@ 
 #include <linux/rkisp1-config.h>
 #include <linux/v4l2-controls.h>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/control_ids.h>
 #include <libcamera/ipa/ipa_interface.h>
@@ -22,8 +24,6 @@ 
 #include <libcamera/ipa/rkisp1_ipa_interface.h>
 #include <libcamera/request.h>
 
-#include "libcamera/internal/log.h"
-
 namespace libcamera {
 
 LOG_DEFINE_CATEGORY(IPARkISP1)
diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
index 13681d8833ff..9ffd07f493a1 100644
--- a/src/ipa/vimc/vimc.cpp
+++ b/src/ipa/vimc/vimc.cpp
@@ -17,8 +17,9 @@ 
 #include <libcamera/ipa/ipa_interface.h>
 #include <libcamera/ipa/ipa_module_info.h>
 
+#include <libcamera/base/log.h>
+
 #include "libcamera/internal/file.h"
-#include "libcamera/internal/log.h"
 
 namespace libcamera {
 
diff --git a/src/libcamera/bound_method.cpp b/src/libcamera/base/bound_method.cpp
similarity index 94%
rename from src/libcamera/bound_method.cpp
rename to src/libcamera/base/bound_method.cpp
index 4965bb5e167b..3ecec51c4b75 100644
--- a/src/libcamera/bound_method.cpp
+++ b/src/libcamera/base/bound_method.cpp
@@ -5,14 +5,13 @@ 
  * bound_method.cpp - Method bind and invocation
  */
 
-#include <libcamera/bound_method.h>
-
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/semaphore.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/bound_method.h>
+#include <libcamera/base/message.h>
+#include <libcamera/base/semaphore.h>
+#include <libcamera/base/thread.h>
 
 /**
- * \file bound_method.h
+ * \file base/bound_method.h
  * \brief Method bind and invocation
  */
 
diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/base/event_dispatcher.cpp
similarity index 97%
rename from src/libcamera/event_dispatcher.cpp
rename to src/libcamera/base/event_dispatcher.cpp
index e0ce1eb3cc04..4be89e819832 100644
--- a/src/libcamera/event_dispatcher.cpp
+++ b/src/libcamera/base/event_dispatcher.cpp
@@ -5,12 +5,11 @@ 
  * event_dispatcher.cpp - Event dispatcher
  */
 
-#include "libcamera/internal/event_dispatcher.h"
-
-#include "libcamera/internal/log.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/log.h>
 
 /**
- * \file event_dispatcher.h
+ * \file base/event_dispatcher.h
  */
 
 namespace libcamera {
diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp
similarity index 97%
rename from src/libcamera/event_dispatcher_poll.cpp
rename to src/libcamera/base/event_dispatcher_poll.cpp
index 0b6aee187063..d76ca7fc2c32 100644
--- a/src/libcamera/event_dispatcher_poll.cpp
+++ b/src/libcamera/base/event_dispatcher_poll.cpp
@@ -5,7 +5,7 @@ 
  * event_dispatcher_poll.cpp - Poll-based event dispatcher
  */
 
-#include "libcamera/internal/event_dispatcher_poll.h"
+#include <libcamera/base/event_dispatcher_poll.h>
 
 #include <algorithm>
 #include <chrono>
@@ -16,15 +16,15 @@ 
 #include <sys/eventfd.h>
 #include <unistd.h>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
 #include <libcamera/base/utils.h>
 
 #include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 
 /**
- * \file event_dispatcher_poll.h
+ * \file base/event_dispatcher_poll.h
  */
 
 namespace libcamera {
diff --git a/src/libcamera/log.cpp b/src/libcamera/base/log.cpp
similarity index 99%
rename from src/libcamera/log.cpp
rename to src/libcamera/base/log.cpp
index 5ff0e9017648..1801ae26a2e3 100644
--- a/src/libcamera/log.cpp
+++ b/src/libcamera/base/log.cpp
@@ -5,7 +5,7 @@ 
  * log.cpp - Logging infrastructure
  */
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 #include <array>
 #if HAVE_BACKTRACE
@@ -23,12 +23,11 @@ 
 
 #include <libcamera/logging.h>
 
+#include <libcamera/base/thread.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/thread.h"
-
 /**
- * \file log.h
+ * \file base/log.h
  * \brief Logging infrastructure
  *
  * libcamera includes a logging infrastructure used through the library that
diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
index 302a288685d3..7a19c67c51b8 100644
--- a/src/libcamera/base/meson.build
+++ b/src/libcamera/base/meson.build
@@ -2,10 +2,21 @@ 
 
 libcamera_base_sources = files([
     'class.cpp',
+    'bound_method.cpp',
+    'event_dispatcher.cpp',
+    'event_dispatcher_poll.cpp',
+    'log.cpp',
+    'message.cpp',
+    'object.cpp',
+    'semaphore.cpp',
+    'signal.cpp',
+    'thread.cpp',
+    'timer.cpp',
     'utils.cpp',
 ])
 
 libcamera_base_deps = [
+    dependency('threads'),
 ]
 
 libcamera_base_lib = shared_library('libcamera-base',
diff --git a/src/libcamera/message.cpp b/src/libcamera/base/message.cpp
similarity index 96%
rename from src/libcamera/message.cpp
rename to src/libcamera/base/message.cpp
index bc985c077a4f..f1d772e43465 100644
--- a/src/libcamera/message.cpp
+++ b/src/libcamera/base/message.cpp
@@ -5,14 +5,13 @@ 
  * message.cpp - Message queue support
  */
 
-#include "libcamera/internal/message.h"
+#include <libcamera/base/message.h>
 
-#include <libcamera/signal.h>
-
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
 
 /**
- * \file message.h
+ * \file base/message.h
  * \brief Message queue support
  *
  * The messaging API enables inter-thread communication through message
diff --git a/src/libcamera/object.cpp b/src/libcamera/base/object.cpp
similarity index 97%
rename from src/libcamera/object.cpp
rename to src/libcamera/base/object.cpp
index 51cac64ea313..25410ecd949e 100644
--- a/src/libcamera/object.cpp
+++ b/src/libcamera/base/object.cpp
@@ -5,21 +5,19 @@ 
  * object.cpp - Base object
  */
 
-#include <libcamera/object.h>
+#include <libcamera/base/object.h>
 
 #include <algorithm>
 
-#include <libcamera/signal.h>
-
+#include <libcamera/base/log.h>
+#include <libcamera/base/message.h>
+#include <libcamera/base/semaphore.h>
+#include <libcamera/base/signal.h>
+#include <libcamera/base/thread.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/semaphore.h"
-#include "libcamera/internal/thread.h"
-
 /**
- * \file object.h
+ * \file base/object.h
  * \brief Base object to support automatic signal disconnection
  */
 
diff --git a/src/libcamera/semaphore.cpp b/src/libcamera/base/semaphore.cpp
similarity index 96%
rename from src/libcamera/semaphore.cpp
rename to src/libcamera/base/semaphore.cpp
index d8988a9189e8..7aedc6a8c48b 100644
--- a/src/libcamera/semaphore.cpp
+++ b/src/libcamera/base/semaphore.cpp
@@ -5,11 +5,11 @@ 
  * semaphore.cpp - General-purpose counting semaphore
  */
 
-#include "libcamera/internal/semaphore.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/semaphore.h>
+#include <libcamera/base/thread.h>
 
 /**
- * \file semaphore.h
+ * \file base/semaphore.h
  * \brief General-purpose counting semaphore
  */
 
diff --git a/src/libcamera/signal.cpp b/src/libcamera/base/signal.cpp
similarity index 98%
rename from src/libcamera/signal.cpp
rename to src/libcamera/base/signal.cpp
index 2532df3c3073..298b2d4b3619 100644
--- a/src/libcamera/signal.cpp
+++ b/src/libcamera/base/signal.cpp
@@ -5,12 +5,12 @@ 
  * signal.cpp - Signal & slot implementation
  */
 
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
 
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/thread.h>
 
 /**
- * \file signal.h
+ * \file base/signal.h
  * \brief Signal & slot implementation
  */
 
diff --git a/src/libcamera/thread.cpp b/src/libcamera/base/thread.cpp
similarity index 98%
rename from src/libcamera/thread.cpp
rename to src/libcamera/base/thread.cpp
index 91e4737ad032..c7c2d6b29d6a 100644
--- a/src/libcamera/thread.cpp
+++ b/src/libcamera/base/thread.cpp
@@ -5,7 +5,7 @@ 
  * thread.cpp - Thread support
  */
 
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/thread.h>
 
 #include <atomic>
 #include <condition_variable>
@@ -14,10 +14,10 @@ 
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/event_dispatcher_poll.h"
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/message.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/event_dispatcher_poll.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/message.h>
 
 /**
  * \page thread Thread Support
@@ -102,7 +102,7 @@ 
  */
 
 /**
- * \file thread.h
+ * \file base/thread.h
  * \brief Thread support
  */
 
diff --git a/src/libcamera/timer.cpp b/src/libcamera/base/timer.cpp
similarity index 94%
rename from src/libcamera/timer.cpp
rename to src/libcamera/base/timer.cpp
index 9496671edffc..9c54352d46bd 100644
--- a/src/libcamera/timer.cpp
+++ b/src/libcamera/base/timer.cpp
@@ -5,21 +5,20 @@ 
  * timer.cpp - Generic timer
  */
 
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/timer.h>
 
 #include <chrono>
 
-#include <libcamera/camera_manager.h>
-
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/message.h>
+#include <libcamera/base/thread.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/camera_manager.h>
 
 /**
- * \file timer.h
+ * \file base/timer.h
  * \brief Generic timer
  */
 
diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp
index ca999429dce5..e4c345d518da 100644
--- a/src/libcamera/buffer.cpp
+++ b/src/libcamera/buffer.cpp
@@ -13,7 +13,7 @@ 
 #include <sys/mman.h>
 #include <unistd.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 /**
  * \file libcamera/buffer.h
diff --git a/src/libcamera/byte_stream_buffer.cpp b/src/libcamera/byte_stream_buffer.cpp
index 7fc6f6944471..b67bb928f8c1 100644
--- a/src/libcamera/byte_stream_buffer.cpp
+++ b/src/libcamera/byte_stream_buffer.cpp
@@ -10,7 +10,7 @@ 
 #include <stdint.h>
 #include <string.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 /**
  * \file byte_stream_buffer.h
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 1340c266cc5f..de0123aeafca 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -11,13 +11,14 @@ 
 #include <atomic>
 #include <iomanip>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+
 #include <libcamera/framebuffer_allocator.h>
 #include <libcamera/request.h>
 #include <libcamera/stream.h>
 
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/pipeline_handler.h"
-#include "libcamera/internal/thread.h"
 
 /**
  * \file camera.h
diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp
index a3784db6e697..fc3bd88c737b 100644
--- a/src/libcamera/camera_manager.cpp
+++ b/src/libcamera/camera_manager.cpp
@@ -14,12 +14,13 @@ 
 
 #include <libcamera/base/utils.h>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+
 #include "libcamera/internal/device_enumerator.h"
 #include "libcamera/internal/ipa_manager.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/pipeline_handler.h"
 #include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
 
 /**
  * \file camera_manager.h
diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp
index fc4ea78d1fc7..7b7279efbba8 100644
--- a/src/libcamera/camera_sensor_properties.cpp
+++ b/src/libcamera/camera_sensor_properties.cpp
@@ -9,9 +9,9 @@ 
 
 #include <map>
 
-#include <libcamera/control_ids.h>
+#include <libcamera/base/log.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/control_ids.h>
 
 /**
  * \file camera_sensor_properties.h
diff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp
index 097444130ef7..dd5a26083747 100644
--- a/src/libcamera/control_serializer.cpp
+++ b/src/libcamera/control_serializer.cpp
@@ -11,13 +11,14 @@ 
 #include <memory>
 #include <vector>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/control_ids.h>
 #include <libcamera/controls.h>
 #include <libcamera/ipa/ipa_controls.h>
 #include <libcamera/span.h>
 
 #include "libcamera/internal/byte_stream_buffer.h"
-#include "libcamera/internal/log.h"
 
 /**
  * \file control_serializer.h
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index 7df372ad3b6c..34317fa0f65d 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -12,10 +12,10 @@ 
 #include <string>
 #include <string.h>
 
+#include <libcamera/base/log.h>
 #include <libcamera/base/utils.h>
 
 #include "libcamera/internal/control_validator.h"
-#include "libcamera/internal/log.h"
 
 /**
  * \file controls.h
diff --git a/src/libcamera/delayed_controls.cpp b/src/libcamera/delayed_controls.cpp
index 0bf81b510d16..90ce7e0b5b52 100644
--- a/src/libcamera/delayed_controls.cpp
+++ b/src/libcamera/delayed_controls.cpp
@@ -7,9 +7,10 @@ 
 
 #include "libcamera/internal/delayed_controls.h"
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/controls.h>
 
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/v4l2_device.h"
 
 /**
diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
index e6ecc360e32f..1f33faf5e7aa 100644
--- a/src/libcamera/device_enumerator.cpp
+++ b/src/libcamera/device_enumerator.cpp
@@ -11,7 +11,8 @@ 
 
 #include <string.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
+
 #include "libcamera/internal/media_device.h"
 
 /**
diff --git a/src/libcamera/device_enumerator_sysfs.cpp b/src/libcamera/device_enumerator_sysfs.cpp
index ff72885288c3..686bb8099485 100644
--- a/src/libcamera/device_enumerator_sysfs.cpp
+++ b/src/libcamera/device_enumerator_sysfs.cpp
@@ -17,7 +17,8 @@ 
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
+
 #include "libcamera/internal/media_device.h"
 
 namespace libcamera {
diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp
index d26fcf10b3c4..4b842773fcd6 100644
--- a/src/libcamera/device_enumerator_udev.cpp
+++ b/src/libcamera/device_enumerator_udev.cpp
@@ -17,8 +17,9 @@ 
 #include <sys/sysmacros.h>
 #include <unistd.h>
 
+#include <libcamera/base/log.h>
+
 #include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_device.h"
 
 namespace libcamera {
diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp
index 6b0575c0db77..784016a9f907 100644
--- a/src/libcamera/event_notifier.cpp
+++ b/src/libcamera/event_notifier.cpp
@@ -9,9 +9,9 @@ 
 
 #include <libcamera/camera_manager.h>
 
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/message.h>
+#include <libcamera/base/thread.h>
 
 /**
  * \file event_notifier.h
diff --git a/src/libcamera/file.cpp b/src/libcamera/file.cpp
index bce2b6138239..def0f60d044b 100644
--- a/src/libcamera/file.cpp
+++ b/src/libcamera/file.cpp
@@ -14,7 +14,7 @@ 
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 /**
  * \file file.h
diff --git a/src/libcamera/file_descriptor.cpp b/src/libcamera/file_descriptor.cpp
index 8b505ed3b6b2..638b3bbe0449 100644
--- a/src/libcamera/file_descriptor.cpp
+++ b/src/libcamera/file_descriptor.cpp
@@ -11,7 +11,7 @@ 
 #include <unistd.h>
 #include <utility>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 /**
  * \file file_descriptor.h
diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
index 55822f4cc97b..f5fbaf0b95f9 100644
--- a/src/libcamera/formats.cpp
+++ b/src/libcamera/formats.cpp
@@ -12,7 +12,7 @@ 
 
 #include <libcamera/formats.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 /**
  * \file internal/formats.h
diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp
index 2fbba37a1b0b..86a57923286c 100644
--- a/src/libcamera/framebuffer_allocator.cpp
+++ b/src/libcamera/framebuffer_allocator.cpp
@@ -9,11 +9,12 @@ 
 
 #include <errno.h>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/camera.h>
 #include <libcamera/stream.h>
 
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/pipeline_handler.h"
 
 /**
diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp
index 136446895eb6..9bbef0b537f1 100644
--- a/src/libcamera/geometry.cpp
+++ b/src/libcamera/geometry.cpp
@@ -10,7 +10,7 @@ 
 #include <sstream>
 #include <stdint.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 /**
  * \file geometry.h
diff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp
index 131b3bd616fd..fb941e6bcd8a 100644
--- a/src/libcamera/ipa_data_serializer.cpp
+++ b/src/libcamera/ipa_data_serializer.cpp
@@ -7,7 +7,7 @@ 
 
 #include "libcamera/internal/ipa_data_serializer.h"
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 /**
  * \file ipa_data_serializer.h
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
index 263cacd64737..35c7259801fa 100644
--- a/src/libcamera/ipa_manager.cpp
+++ b/src/libcamera/ipa_manager.cpp
@@ -12,12 +12,12 @@ 
 #include <string.h>
 #include <sys/types.h>
 
+#include <libcamera/base/log.h>
 #include <libcamera/base/utils.h>
 
 #include "libcamera/internal/file.h"
 #include "libcamera/internal/ipa_module.h"
 #include "libcamera/internal/ipa_proxy.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/pipeline_handler.h"
 
 /**
diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp
index a4e7fb861138..7ab5557916e7 100644
--- a/src/libcamera/ipa_module.cpp
+++ b/src/libcamera/ipa_module.cpp
@@ -23,10 +23,10 @@ 
 
 #include <libcamera/span.h>
 
+#include <libcamera/base/log.h>
 #include <libcamera/base/utils.h>
 
 #include "libcamera/internal/file.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/pipeline_handler.h"
 
 /**
diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp
index ca980ec705a6..babcc48bcfd0 100644
--- a/src/libcamera/ipa_proxy.cpp
+++ b/src/libcamera/ipa_proxy.cpp
@@ -12,10 +12,10 @@ 
 #include <sys/types.h>
 #include <unistd.h>
 
+#include <libcamera/base/log.h>
 #include <libcamera/base/utils.h>
 
 #include "libcamera/internal/ipa_module.h"
-#include "libcamera/internal/log.h"
 
 /**
  * \file ipa_proxy.h
diff --git a/src/libcamera/ipc_pipe.cpp b/src/libcamera/ipc_pipe.cpp
index c402c8d08699..28e20e031623 100644
--- a/src/libcamera/ipc_pipe.cpp
+++ b/src/libcamera/ipc_pipe.cpp
@@ -7,7 +7,7 @@ 
 
 #include "libcamera/internal/ipc_pipe.h"
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 /**
  * \file ipc_pipe.h
diff --git a/src/libcamera/ipc_pipe_unixsocket.cpp b/src/libcamera/ipc_pipe_unixsocket.cpp
index db0e260f22b1..4511775fb467 100644
--- a/src/libcamera/ipc_pipe_unixsocket.cpp
+++ b/src/libcamera/ipc_pipe_unixsocket.cpp
@@ -9,13 +9,14 @@ 
 
 #include <vector>
 
-#include "libcamera/internal/event_dispatcher.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
 #include "libcamera/internal/ipc_pipe.h"
 #include "libcamera/internal/ipc_unixsocket.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 
 namespace libcamera {
 
diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp
index fdb359f7fcd1..1466597077d4 100644
--- a/src/libcamera/ipc_unixsocket.cpp
+++ b/src/libcamera/ipc_unixsocket.cpp
@@ -12,8 +12,9 @@ 
 #include <sys/socket.h>
 #include <unistd.h>
 
+#include <libcamera/base/log.h>
+
 #include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
 
 /**
  * \file ipc_unixsocket.h
diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp
index 9ec84e560b77..e12ab1abb10d 100644
--- a/src/libcamera/media_device.cpp
+++ b/src/libcamera/media_device.cpp
@@ -18,7 +18,7 @@ 
 
 #include <linux/media.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 /**
  * \file media_device.h
diff --git a/src/libcamera/media_object.cpp b/src/libcamera/media_object.cpp
index 94aeb50402ca..815edc8e3b2d 100644
--- a/src/libcamera/media_object.cpp
+++ b/src/libcamera/media_object.cpp
@@ -15,7 +15,8 @@ 
 
 #include <linux/media.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
+
 #include "libcamera/internal/media_device.h"
 
 /**
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index a341004c0c19..86212cec0281 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -2,7 +2,6 @@ 
 
 libcamera_sources = files([
     'bayer_format.cpp',
-    'bound_method.cpp',
     'buffer.cpp',
     'byte_stream_buffer.cpp',
     'camera.cpp',
@@ -16,8 +15,6 @@  libcamera_sources = files([
     'delayed_controls.cpp',
     'device_enumerator.cpp',
     'device_enumerator_sysfs.cpp',
-    'event_dispatcher.cpp',
-    'event_dispatcher_poll.cpp',
     'event_notifier.cpp',
     'file.cpp',
     'file_descriptor.cpp',
@@ -33,23 +30,16 @@  libcamera_sources = files([
     'ipc_pipe.cpp',
     'ipc_pipe_unixsocket.cpp',
     'ipc_unixsocket.cpp',
-    'log.cpp',
     'media_device.cpp',
     'media_object.cpp',
-    'message.cpp',
-    'object.cpp',
     'pipeline_handler.cpp',
     'pixel_format.cpp',
     'process.cpp',
     'pub_key.cpp',
     'request.cpp',
-    'semaphore.cpp',
-    'signal.cpp',
     'source-paths.cpp',
     'stream.cpp',
     'sysfs.cpp',
-    'thread.cpp',
-    'timer.cpp',
     'transform.cpp',
     'v4l2_device.cpp',
     'v4l2_pixelformat.cpp',
@@ -128,7 +118,6 @@  libcamera_deps = [
     liblttng,
     libudev,
     libcamera_base,
-    dependency('threads'),
 ]
 
 # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.
diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h
index d8d4a181ffd1..f28e9f1ddf42 100644
--- a/src/libcamera/pipeline/ipu3/cio2.h
+++ b/src/libcamera/pipeline/ipu3/cio2.h
@@ -11,7 +11,7 @@ 
 #include <queue>
 #include <vector>
 
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
 
 #include "libcamera/internal/v4l2_subdevice.h"
 #include "libcamera/internal/v4l2_videodevice.h"
diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h
index 59e64e8170a2..3ef7e4454693 100644
--- a/src/libcamera/pipeline/ipu3/frames.h
+++ b/src/libcamera/pipeline/ipu3/frames.h
@@ -12,7 +12,7 @@ 
 #include <queue>
 #include <vector>
 
-#include <libcamera/signal.h>
+#include <libcamera/base/signal.h>
 
 namespace libcamera {
 
diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
index 32d143a862b2..e955bc3456ba 100644
--- a/src/libcamera/pipeline/ipu3/imgu.cpp
+++ b/src/libcamera/pipeline/ipu3/imgu.cpp
@@ -13,12 +13,12 @@ 
 
 #include <linux/media-bus-format.h>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
 #include <libcamera/formats.h>
 #include <libcamera/stream.h>
 
-#include <libcamera/base/utils.h>
-
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_device.h"
 
 namespace libcamera {
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 6b43ad2fb2b1..76c3bb3d8aa9 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -11,6 +11,9 @@ 
 #include <queue>
 #include <vector>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
 #include <libcamera/camera.h>
 #include <libcamera/control_ids.h>
 #include <libcamera/formats.h>
@@ -20,13 +23,10 @@ 
 #include <libcamera/request.h>
 #include <libcamera/stream.h>
 
-#include <libcamera/base/utils.h>
-
 #include "libcamera/internal/camera_sensor.h"
 #include "libcamera/internal/delayed_controls.h"
 #include "libcamera/internal/device_enumerator.h"
 #include "libcamera/internal/ipa_manager.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_device.h"
 #include "libcamera/internal/pipeline_handler.h"
 
diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
index 4d5dd6cb87cc..573ea11de607 100644
--- a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
+++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp
@@ -14,7 +14,7 @@ 
 #include <sys/ioctl.h>
 #include <unistd.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 /*
  * /dev/dma-heap/linux,cma is the dma-heap allocator, which allows dmaheap-cma
diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
index f2430415d32d..b3265d0e8aab 100644
--- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
+++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp
@@ -6,9 +6,9 @@ 
  */
 #include "rpi_stream.h"
 
-#include <libcamera/ipa/raspberrypi_ipa_interface.h>
+#include <libcamera/base/log.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/ipa/raspberrypi_ipa_interface.h>
 
 namespace libcamera {
 
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index c625d7248f5c..00df4f0b3e6b 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -14,6 +14,9 @@ 
 
 #include <linux/media-bus-format.h>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/camera.h>
 #include <libcamera/control_ids.h>
@@ -24,13 +27,10 @@ 
 #include <libcamera/request.h>
 #include <libcamera/stream.h>
 
-#include <libcamera/base/utils.h>
-
 #include "libcamera/internal/camera_sensor.h"
 #include "libcamera/internal/delayed_controls.h"
 #include "libcamera/internal/device_enumerator.h"
 #include "libcamera/internal/ipa_manager.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_device.h"
 #include "libcamera/internal/pipeline_handler.h"
 #include "libcamera/internal/v4l2_subdevice.h"
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
index 3b3e37d258d0..c185ac3992dd 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h
@@ -10,10 +10,11 @@ 
 #include <memory>
 #include <vector>
 
+#include <libcamera/base/signal.h>
+
 #include <libcamera/camera.h>
 #include <libcamera/geometry.h>
 #include <libcamera/pixel_format.h>
-#include <libcamera/signal.h>
 #include <libcamera/span.h>
 
 #include "libcamera/internal/media_object.h"
diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp
index 589f185b1bf1..9af1096be834 100644
--- a/src/libcamera/pipeline/simple/converter.cpp
+++ b/src/libcamera/pipeline/simple/converter.cpp
@@ -10,14 +10,14 @@ 
 #include <algorithm>
 #include <limits.h>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
+#include <libcamera/base/utils.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/geometry.h>
-#include <libcamera/signal.h>
 #include <libcamera/stream.h>
 
-#include <libcamera/base/utils.h>
-
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_device.h"
 #include "libcamera/internal/v4l2_videodevice.h"
 
diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h
index 480e528d2210..276a2a291c21 100644
--- a/src/libcamera/pipeline/simple/converter.h
+++ b/src/libcamera/pipeline/simple/converter.h
@@ -16,9 +16,9 @@ 
 #include <vector>
 
 #include <libcamera/pixel_format.h>
-#include <libcamera/signal.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
 
 namespace libcamera {
 
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 1894014d8fc7..4d78e6faf403 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -21,6 +21,8 @@ 
 
 #include <linux/media-bus-format.h>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/camera.h>
 #include <libcamera/control_ids.h>
 #include <libcamera/request.h>
@@ -28,7 +30,6 @@ 
 
 #include "libcamera/internal/camera_sensor.h"
 #include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_device.h"
 #include "libcamera/internal/pipeline_handler.h"
 #include "libcamera/internal/v4l2_subdevice.h"
diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
index d8c17dccae53..0f634b8da609 100644
--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
@@ -12,6 +12,9 @@ 
 #include <memory>
 #include <tuple>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
 #include <libcamera/camera.h>
 #include <libcamera/control_ids.h>
 #include <libcamera/controls.h>
@@ -19,10 +22,7 @@ 
 #include <libcamera/request.h>
 #include <libcamera/stream.h>
 
-#include <libcamera/base/utils.h>
-
 #include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_device.h"
 #include "libcamera/internal/pipeline_handler.h"
 #include "libcamera/internal/sysfs.h"
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index 025ca56205f8..361b715778ef 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -14,21 +14,23 @@ 
 #include <linux/media-bus-format.h>
 #include <linux/version.h>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
 #include <libcamera/camera.h>
 #include <libcamera/control_ids.h>
 #include <libcamera/controls.h>
 #include <libcamera/formats.h>
 #include <libcamera/ipa/ipa_interface.h>
 #include <libcamera/ipa/ipa_module_info.h>
+#include <libcamera/ipa/vimc_ipa_interface.h>
+#include <libcamera/ipa/vimc_ipa_proxy.h>
 #include <libcamera/request.h>
 #include <libcamera/stream.h>
 
-#include <libcamera/base/utils.h>
-
 #include "libcamera/internal/camera_sensor.h"
 #include "libcamera/internal/device_enumerator.h"
 #include "libcamera/internal/ipa_manager.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_device.h"
 #include "libcamera/internal/pipeline_handler.h"
 #include "libcamera/internal/v4l2_subdevice.h"
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index 6fb2a743c3c2..f626eddd321f 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -9,14 +9,14 @@ 
 
 #include <sys/sysmacros.h>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/utils.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/camera.h>
 #include <libcamera/camera_manager.h>
 
-#include <libcamera/base/utils.h>
-
 #include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_device.h"
 #include "libcamera/internal/tracepoints.h"
 
diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp
index 35091f60c1e9..463380299a65 100644
--- a/src/libcamera/process.cpp
+++ b/src/libcamera/process.cpp
@@ -20,10 +20,10 @@ 
 #include <unistd.h>
 #include <vector>
 
+#include <libcamera/base/log.h>
 #include <libcamera/base/utils.h>
 
 #include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
 
 /**
  * \file process.h
diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index 6611e74d1800..518384eb8cf6 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -10,13 +10,14 @@ 
 #include <map>
 #include <sstream>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/camera.h>
 #include <libcamera/control_ids.h>
 #include <libcamera/stream.h>
 
 #include "libcamera/internal/camera_controls.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/tracepoints.h"
 
 /**
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index d5d68427e658..b8626775d224 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -15,9 +15,9 @@ 
 
 #include <libcamera/request.h>
 
+#include <libcamera/base/log.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/log.h"
 
 /**
  * \file stream.h
diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp
index e9004b2b59c8..4372b1348178 100644
--- a/src/libcamera/sysfs.cpp
+++ b/src/libcamera/sysfs.cpp
@@ -12,8 +12,9 @@ 
 #include <sys/stat.h>
 #include <sys/sysmacros.h>
 
+#include <libcamera/base/log.h>
+
 #include "libcamera/internal/file.h"
-#include "libcamera/internal/log.h"
 
 /**
  * \file sysfs.h
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index facb53e13169..334b9b78b812 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -16,10 +16,10 @@ 
 #include <sys/syscall.h>
 #include <unistd.h>
 
+#include <libcamera/base/log.h>
 #include <libcamera/base/utils.h>
 
 #include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/sysfs.h"
 
 /**
diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
index 166d93cf1d20..87d728fe5577 100644
--- a/src/libcamera/v4l2_pixelformat.cpp
+++ b/src/libcamera/v4l2_pixelformat.cpp
@@ -12,11 +12,12 @@ 
 #include <map>
 #include <string.h>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/formats.h>
 #include <libcamera/pixel_format.h>
 
 #include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
 
 /**
  * \file v4l2_pixelformat.h
diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
index 2c56cfafbce4..8fe5e45b31ee 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -19,9 +19,9 @@ 
 
 #include <libcamera/geometry.h>
 
+#include <libcamera/base/log.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_device.h"
 #include "libcamera/internal/media_object.h"
 
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 12c09dc7578d..dc23510bc5aa 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -21,10 +21,11 @@ 
 
 #include <linux/version.h>
 
+#include <libcamera/base/log.h>
+
 #include <libcamera/file_descriptor.h>
 
 #include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/media_device.h"
 #include "libcamera/internal/media_object.h"
 
diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp
index 97825c715bba..157ab94e0544 100644
--- a/src/v4l2/v4l2_camera.cpp
+++ b/src/v4l2/v4l2_camera.cpp
@@ -10,7 +10,7 @@ 
 #include <errno.h>
 #include <unistd.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/base/log.h>
 
 using namespace libcamera;
 
diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
index d238046250e3..dbe0573bd3a4 100644
--- a/src/v4l2/v4l2_camera.h
+++ b/src/v4l2/v4l2_camera.h
@@ -12,13 +12,13 @@ 
 #include <mutex>
 #include <utility>
 
+#include <libcamera/base/semaphore.h>
+
 #include <libcamera/buffer.h>
 #include <libcamera/camera.h>
 #include <libcamera/file_descriptor.h>
 #include <libcamera/framebuffer_allocator.h>
 
-#include "libcamera/internal/semaphore.h"
-
 using namespace libcamera;
 
 class V4L2Camera
diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
index a5a25507462e..7682c4bddf90 100644
--- a/src/v4l2/v4l2_camera_proxy.cpp
+++ b/src/v4l2/v4l2_camera_proxy.cpp
@@ -18,12 +18,12 @@ 
 
 #include <libcamera/camera.h>
 #include <libcamera/formats.h>
-#include <libcamera/object.h>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/object.h>
 #include <libcamera/base/utils.h>
 
 #include "libcamera/internal/formats.h"
-#include "libcamera/internal/log.h"
 
 #include "v4l2_camera.h"
 #include "v4l2_camera_file.h"
diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp
index 27de6c50ff4e..e566125a70ac 100644
--- a/src/v4l2/v4l2_compat_manager.cpp
+++ b/src/v4l2/v4l2_compat_manager.cpp
@@ -19,12 +19,11 @@ 
 #include <sys/types.h>
 #include <unistd.h>
 
-#include <libcamera/camera.h>
-#include <libcamera/camera_manager.h>
-
+#include <libcamera/base/log.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/camera.h>
+#include <libcamera/camera_manager.h>
 
 #include "v4l2_camera_file.h"
 
diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp
index 61f4eb92ae95..c504ea09e64b 100644
--- a/test/camera/buffer_import.cpp
+++ b/test/camera/buffer_import.cpp
@@ -12,11 +12,12 @@ 
 #include <numeric>
 #include <vector>
 
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
 #include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/event_dispatcher.h"
 #include "libcamera/internal/media_device.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 #include "libcamera/internal/v4l2_videodevice.h"
 
 #include "buffer_source.h"
diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp
index c4bc21100777..238d98dbba16 100644
--- a/test/camera/capture.cpp
+++ b/test/camera/capture.cpp
@@ -9,9 +9,9 @@ 
 
 #include <libcamera/framebuffer_allocator.h>
 
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
 
 #include "camera_test.h"
 #include "test.h"
diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp
index 8ae05ac62985..1cc17b045ec0 100644
--- a/test/event-dispatcher.cpp
+++ b/test/event-dispatcher.cpp
@@ -10,9 +10,9 @@ 
 #include <signal.h>
 #include <sys/time.h>
 
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
 
 #include "test.h"
 
diff --git a/test/event-thread.cpp b/test/event-thread.cpp
index aeb8b3bf4bac..05c5d26d3611 100644
--- a/test/event-thread.cpp
+++ b/test/event-thread.cpp
@@ -10,9 +10,10 @@ 
 #include <string.h>
 #include <unistd.h>
 
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
 #include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 
 #include "test.h"
 
diff --git a/test/event.cpp b/test/event.cpp
index 1f16c97bbab5..aa79da99c286 100644
--- a/test/event.cpp
+++ b/test/event.cpp
@@ -9,10 +9,11 @@ 
 #include <string.h>
 #include <unistd.h>
 
-#include "libcamera/internal/event_dispatcher.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
 #include "libcamera/internal/event_notifier.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 
 #include "test.h"
 
diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp
index 94cb859352ec..bb160537c5d5 100644
--- a/test/hotplug-cameras.cpp
+++ b/test/hotplug-cameras.cpp
@@ -14,10 +14,11 @@ 
 #include <libcamera/camera.h>
 #include <libcamera/camera_manager.h>
 
-#include "libcamera/internal/event_dispatcher.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
 #include "libcamera/internal/file.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 
 #include "test.h"
 
diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp
index d6ca6f5137b0..656d86552d85 100644
--- a/test/ipa/ipa_interface_test.cpp
+++ b/test/ipa/ipa_interface_test.cpp
@@ -14,15 +14,16 @@ 
 
 #include <libcamera/ipa/vimc_ipa_proxy.h>
 
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
 #include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/event_dispatcher.h"
 #include "libcamera/internal/event_notifier.h"
 #include "libcamera/internal/ipa_manager.h"
 #include "libcamera/internal/ipa_module.h"
 #include "libcamera/internal/pipeline_handler.h"
 #include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 
 #include "test.h"
 
diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp
index 80157b342795..aa35c8f071f1 100644
--- a/test/ipc/unixsocket.cpp
+++ b/test/ipc/unixsocket.cpp
@@ -16,10 +16,11 @@ 
 #include <sys/wait.h>
 #include <unistd.h>
 
-#include "libcamera/internal/event_dispatcher.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
 #include "libcamera/internal/ipc_unixsocket.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 
 #include "test.h"
 
diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp
index 161d09b98719..6fe7fd9b8fc5 100644
--- a/test/ipc/unixsocket_ipc.cpp
+++ b/test/ipc/unixsocket_ipc.cpp
@@ -15,19 +15,18 @@ 
 #include <sys/wait.h>
 #include <unistd.h>
 
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/event_dispatcher.h"
 #include "libcamera/internal/ipa_data_serializer.h"
 #include "libcamera/internal/ipc_pipe.h"
 #include "libcamera/internal/ipc_pipe_unixsocket.h"
 #include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 
 #include "test.h"
 
-
 using namespace std;
 using namespace libcamera;
 
diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp
index ae3c607a6881..5311896095a9 100644
--- a/test/log/log_api.cpp
+++ b/test/log/log_api.cpp
@@ -16,9 +16,9 @@ 
 #include <sys/types.h>
 #include <unistd.h>
 
-#include <libcamera/logging.h>
+#include <libcamera/base/log.h>
 
-#include "libcamera/internal/log.h"
+#include <libcamera/logging.h>
 
 #include "test.h"
 
diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp
index 413d9207ea68..d138aa7ff562 100644
--- a/test/log/log_process.cpp
+++ b/test/log/log_process.cpp
@@ -16,13 +16,13 @@ 
 
 #include <libcamera/logging.h>
 
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 
 #include "test.h"
 
diff --git a/test/message.cpp b/test/message.cpp
index 9553ba8cbaed..eeea57feab76 100644
--- a/test/message.cpp
+++ b/test/message.cpp
@@ -9,8 +9,8 @@ 
 #include <iostream>
 #include <thread>
 
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/message.h>
+#include <libcamera/base/thread.h>
 
 #include "test.h"
 
diff --git a/test/object-delete.cpp b/test/object-delete.cpp
index a1a6f5ccefd5..eabefe935974 100644
--- a/test/object-delete.cpp
+++ b/test/object-delete.cpp
@@ -7,9 +7,8 @@ 
 
 #include <iostream>
 
-#include <libcamera/object.h>
-
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/object.h>
+#include <libcamera/base/thread.h>
 
 #include "test.h"
 
diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp
index a6f816f395eb..b1c0f473ba5c 100644
--- a/test/object-invoke.cpp
+++ b/test/object-invoke.cpp
@@ -8,10 +8,9 @@ 
 #include <iostream>
 #include <thread>
 
-#include <libcamera/object.h>
-
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/thread.h>
 
 #include "test.h"
 
diff --git a/test/object.cpp b/test/object.cpp
index 264659b405d9..cbd0d3ececab 100644
--- a/test/object.cpp
+++ b/test/object.cpp
@@ -7,10 +7,9 @@ 
 
 #include <iostream>
 
-#include <libcamera/object.h>
-
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/message.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/thread.h>
 
 #include "test.h"
 
diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp
index a5155bae3162..8f7a1f05f681 100644
--- a/test/process/process_test.cpp
+++ b/test/process/process_test.cpp
@@ -9,12 +9,13 @@ 
 #include <unistd.h>
 #include <vector>
 
+
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/event_dispatcher.h"
 #include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 
 #include "test.h"
 
diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp
index dbbba8912386..880bcd02c6be 100644
--- a/test/serialization/ipa_data_serializer_test.cpp
+++ b/test/serialization/ipa_data_serializer_test.cpp
@@ -17,13 +17,14 @@ 
 #include <unistd.h>
 #include <vector>
 
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
 #include "libcamera/internal/device_enumerator.h"
 #include "libcamera/internal/ipa_data_serializer.h"
 #include "libcamera/internal/ipa_manager.h"
 #include "libcamera/internal/ipa_module.h"
 #include "libcamera/internal/pipeline_handler.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 
 #include "serialization_test.h"
 #include "test.h"
diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp
index 8a96b5d2abb3..d5e2eb662df2 100644
--- a/test/signal-threads.cpp
+++ b/test/signal-threads.cpp
@@ -9,11 +9,10 @@ 
 #include <iostream>
 #include <thread>
 
+#include <libcamera/base/message.h>
+#include <libcamera/base/thread.h>
 #include <libcamera/base/utils.h>
 
-#include "libcamera/internal/message.h"
-#include "libcamera/internal/thread.h"
-
 #include "test.h"
 
 using namespace std;
diff --git a/test/signal.cpp b/test/signal.cpp
index f83ceb05f091..aceb02789cf4 100644
--- a/test/signal.cpp
+++ b/test/signal.cpp
@@ -8,8 +8,8 @@ 
 #include <iostream>
 #include <string.h>
 
-#include <libcamera/object.h>
-#include <libcamera/signal.h>
+#include <libcamera/base/object.h>
+#include <libcamera/base/signal.h>
 
 #include "test.h"
 
diff --git a/test/threads.cpp b/test/threads.cpp
index e0c50dc90a65..d83b5833998f 100644
--- a/test/threads.cpp
+++ b/test/threads.cpp
@@ -10,7 +10,7 @@ 
 #include <memory>
 #include <thread>
 
-#include "libcamera/internal/thread.h"
+#include <libcamera/base/thread.h>
 
 #include "test.h"
 
diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp
index be29eee1bdb6..2c14865b74d5 100644
--- a/test/timer-thread.cpp
+++ b/test/timer-thread.cpp
@@ -8,9 +8,9 @@ 
 #include <chrono>
 #include <iostream>
 
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
 
 #include "test.h"
 
diff --git a/test/timer.cpp b/test/timer.cpp
index fc90b11040d8..88f226e79f5f 100644
--- a/test/timer.cpp
+++ b/test/timer.cpp
@@ -8,9 +8,9 @@ 
 #include <chrono>
 #include <iostream>
 
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
 
 #include "test.h"
 
diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp
index c75259be0d10..91b3e4a0dad6 100644
--- a/test/v4l2_videodevice/buffer_sharing.cpp
+++ b/test/v4l2_videodevice/buffer_sharing.cpp
@@ -14,9 +14,9 @@ 
 
 #include <libcamera/buffer.h>
 
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
 
 #include "v4l2_videodevice_test.h"
 
diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp
index accdb34a699c..f12c8bef97f6 100644
--- a/test/v4l2_videodevice/capture_async.cpp
+++ b/test/v4l2_videodevice/capture_async.cpp
@@ -9,9 +9,9 @@ 
 
 #include <libcamera/buffer.h>
 
-#include "libcamera/internal/event_dispatcher.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
 
 #include "v4l2_videodevice_test.h"
 
diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
index e0f068082c01..fe4b3cc6487f 100644
--- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp
+++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp
@@ -9,11 +9,12 @@ 
 
 #include <libcamera/buffer.h>
 
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/timer.h>
+
 #include "libcamera/internal/device_enumerator.h"
-#include "libcamera/internal/event_dispatcher.h"
 #include "libcamera/internal/media_device.h"
-#include "libcamera/internal/thread.h"
-#include "libcamera/internal/timer.h"
 #include "libcamera/internal/v4l2_videodevice.h"
 
 #include "test.h"
diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
index dc6748153445..5a64fe9cfeee 100644
--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
@@ -23,6 +23,9 @@ 
 #include <libcamera/ipa/{{module_name}}_ipa_interface.h>
 #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>
 
+#include <libcamera/base/log.h>
+#include <libcamera/base/thread.h>
+
 #include "libcamera/internal/control_serializer.h"
 #include "libcamera/internal/ipa_data_serializer.h"
 #include "libcamera/internal/ipa_module.h"
@@ -30,9 +33,7 @@ 
 #include "libcamera/internal/ipc_pipe.h"
 #include "libcamera/internal/ipc_pipe_unixsocket.h"
 #include "libcamera/internal/ipc_unixsocket.h"
-#include "libcamera/internal/log.h"
 #include "libcamera/internal/process.h"
-#include "libcamera/internal/thread.h"
 
 namespace libcamera {
 
diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
index 017b870c9dad..ae168548492c 100644
--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl
@@ -19,12 +19,13 @@ 
 #include <libcamera/ipa/ipa_interface.h>
 #include <libcamera/ipa/{{module_name}}_ipa_interface.h>
 
+#include <libcamera/base/thread.h>
+
 #include "libcamera/internal/control_serializer.h"
 #include "libcamera/internal/ipa_proxy.h"
 #include "libcamera/internal/ipc_pipe.h"
 #include "libcamera/internal/ipc_pipe_unixsocket.h"
 #include "libcamera/internal/ipc_unixsocket.h"
-#include "libcamera/internal/thread.h"
 
 namespace libcamera {
 {%- if has_namespace %}
diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
index 8a57b6cc8b34..d993e39e5a5f 100644
--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl
@@ -26,17 +26,18 @@ 
 #include <libcamera/ipa/{{module_name}}_ipa_serializer.h>
 #include <libcamera/logging.h>
 
+#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/thread.h>
+#include <libcamera/base/log.h>
+
 #include "libcamera/internal/camera_sensor.h"
 #include "libcamera/internal/control_serializer.h"
-#include "libcamera/internal/event_dispatcher.h"
 #include "libcamera/internal/ipa_data_serializer.h"
 #include "libcamera/internal/ipa_module.h"
 #include "libcamera/internal/ipa_proxy.h"
 #include "libcamera/internal/ipc_pipe.h"
 #include "libcamera/internal/ipc_pipe_unixsocket.h"
 #include "libcamera/internal/ipc_unixsocket.h"
-#include "libcamera/internal/log.h"
-#include "libcamera/internal/thread.h"
 
 using namespace libcamera;