[{"id":13698,"web_url":"https://patchwork.libcamera.org/comment/13698/","msgid":"<f1fbd470-7472-c55b-b5c4-ffe89ad42230@ideasonboard.com>","date":"2020-11-13T10:03:30","subject":"Re: [libcamera-devel] [PATCH v1 3/5] libcamera: Move\n\tEventDispatcher to internal API","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 13/11/2020 06:38, Laurent Pinchart wrote:\n> There's no user of the EventDispatcher (and the related EventNotifier\n> and Timer classes) outside of libcamera. Move those classes to the\n> internal API.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  include/libcamera/camera_manager.h            |  4 --\n>  .../{ => internal}/event_dispatcher.h         |  0\n>  .../internal/event_dispatcher_poll.h          |  2 +-\n>  .../libcamera/{ => internal}/event_notifier.h |  0\n>  include/libcamera/internal/meson.build        |  3 ++\n>  include/libcamera/{ => internal}/timer.h      |  0\n>  include/libcamera/meson.build                 |  3 --\n>  src/libcamera/camera_manager.cpp              | 44 +------------------\n>  src/libcamera/device_enumerator_udev.cpp      |  3 +-\n>  src/libcamera/event_dispatcher.cpp            |  2 +-\n>  src/libcamera/event_dispatcher_poll.cpp       |  5 +--\n>  src/libcamera/event_notifier.cpp              |  4 +-\n>  src/libcamera/ipc_unixsocket.cpp              |  3 +-\n>  src/libcamera/pipeline/rkisp1/timeline.h      |  3 +-\n>  src/libcamera/process.cpp                     |  3 +-\n>  .../proxy/worker/ipa_proxy_linux_worker.cpp   |  2 +-\n>  src/libcamera/thread.cpp                      |  3 +-\n>  src/libcamera/timer.cpp                       |  4 +-\n>  src/libcamera/v4l2_device.cpp                 |  3 +-\n>  src/libcamera/v4l2_videodevice.cpp            |  2 +-\n>  test/camera/buffer_import.cpp                 |  5 +--\n>  test/camera/capture.cpp                       |  5 ++-\n>  test/event-dispatcher.cpp                     |  5 +--\n>  test/event-thread.cpp                         |  5 +--\n>  test/event.cpp                                |  7 ++-\n>  test/hotplug-cameras.cpp                      |  4 +-\n>  test/ipa/ipa_interface_test.cpp               |  6 +--\n>  test/ipc/unixsocket.cpp                       |  5 +--\n>  test/log/log_process.cpp                      |  4 +-\n>  test/object-invoke.cpp                        |  2 +-\n>  test/process/process_test.cpp                 |  5 +--\n>  test/timer-thread.cpp                         |  5 +--\n>  test/timer.cpp                                |  5 +--\n>  test/v4l2_videodevice/buffer_sharing.cpp      |  4 +-\n>  test/v4l2_videodevice/capture_async.cpp       |  4 +-\n>  test/v4l2_videodevice/v4l2_m2mdevice.cpp      |  4 +-\n>  36 files changed, 55 insertions(+), 113 deletions(-)\n>  rename include/libcamera/{ => internal}/event_dispatcher.h (100%)\n>  rename include/libcamera/{ => internal}/event_notifier.h (100%)\n>  rename include/libcamera/{ => internal}/timer.h (100%)\n> \n> diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h\n> index 6d5341c76412..8c8830e7ff1d 100644\n> --- a/include/libcamera/camera_manager.h\n> +++ b/include/libcamera/camera_manager.h\n> @@ -19,7 +19,6 @@\n>  namespace libcamera {\n>  \n>  class Camera;\n> -class EventDispatcher;\n>  \n>  class CameraManager : public Object, public Extensible\n>  {\n> @@ -43,9 +42,6 @@ public:\n>  \n>  \tstatic const std::string &version() { return version_; }\n>  \n> -\tvoid setEventDispatcher(std::unique_ptr<EventDispatcher> dispatcher);\n> -\tEventDispatcher *eventDispatcher();\n> -\n>  \tSignal<std::shared_ptr<Camera>> cameraAdded;\n>  \tSignal<std::shared_ptr<Camera>> cameraRemoved;\n>  \n> diff --git a/include/libcamera/event_dispatcher.h b/include/libcamera/internal/event_dispatcher.h\n> similarity index 100%\n> rename from include/libcamera/event_dispatcher.h\n> rename to include/libcamera/internal/event_dispatcher.h\n> diff --git a/include/libcamera/internal/event_dispatcher_poll.h b/include/libcamera/internal/event_dispatcher_poll.h\n> index 39d9be525dab..33de051de261 100644\n> --- a/include/libcamera/internal/event_dispatcher_poll.h\n> +++ b/include/libcamera/internal/event_dispatcher_poll.h\n> @@ -11,7 +11,7 @@\n>  #include <map>\n>  #include <vector>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  \n>  struct pollfd;\n>  \n> diff --git a/include/libcamera/event_notifier.h b/include/libcamera/internal/event_notifier.h\n> similarity index 100%\n> rename from include/libcamera/event_notifier.h\n> rename to include/libcamera/internal/event_notifier.h\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index 6500fe2a82fb..7cde023f7c3a 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -18,7 +18,9 @@ libcamera_internal_headers = files([\n>      'device_enumerator.h',\n>      'device_enumerator_sysfs.h',\n>      'device_enumerator_udev.h',\n> +    'event_dispatcher.h',\n>      'event_dispatcher_poll.h',\n> +    'event_notifier.h',\n>      'file.h',\n>      'formats.h',\n>      'ipa_context_wrapper.h',\n> @@ -36,6 +38,7 @@ libcamera_internal_headers = files([\n>      'semaphore.h',\n>      'sysfs.h',\n>      'thread.h',\n> +    'timer.h',\n>      'utils.h',\n>      'v4l2_controls.h',\n>      'v4l2_device.h',\n> diff --git a/include/libcamera/timer.h b/include/libcamera/internal/timer.h\n> similarity index 100%\n> rename from include/libcamera/timer.h\n> rename to include/libcamera/internal/timer.h\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index 0b891a8f4f9b..cf2935f1ee95 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -6,8 +6,6 @@ libcamera_public_headers = files([\n>      'camera.h',\n>      'camera_manager.h',\n>      'controls.h',\n> -    'event_dispatcher.h',\n> -    'event_notifier.h',\n>      'extensible.h',\n>      'file_descriptor.h',\n>      'framebuffer_allocator.h',\n> @@ -19,7 +17,6 @@ libcamera_public_headers = files([\n>      'signal.h',\n>      'span.h',\n>      'stream.h',\n> -    'timer.h',\n>      'transform.h',\n>  ])\n>  \n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index 427ea5daf671..67641a555e1e 100644\n> --- a/src/libcamera/camera_manager.cpp\n> +++ b/src/libcamera/camera_manager.cpp\n> @@ -11,10 +11,8 @@\n>  #include <map>\n>  \n>  #include <libcamera/camera.h>\n> -#include <libcamera/event_dispatcher.h>\n>  \n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/event_dispatcher_poll.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> @@ -244,12 +242,8 @@ void CameraManager::Private::removeCamera(Camera *camera)\n>   * a time. Attempting to create a second instance without first deleting the\n>   * existing instance results in undefined behaviour.\n>   *\n> - * The manager is initially stopped, and shall be configured before being\n> - * started. In particular a custom event dispatcher shall be installed if\n> - * needed with CameraManager::setEventDispatcher().\n> - *\n> - * Once the camera manager is configured, it shall be started with start().\n> - * This will enumerate all the cameras present in the system, which can then be\n> + * The manager is initially stopped, and shall be started with start(). This\n> + * will enumerate all the cameras present in the system, which can then be\n>   * listed with list() and retrieved with get().\n>   *\n>   * Cameras are shared through std::shared_ptr<>, ensuring that a camera will\n> @@ -477,38 +471,4 @@ void CameraManager::removeCamera(std::shared_ptr<Camera> camera)\n>   * \\return The libcamera version string\n>   */\n>  \n> -/**\n> - * \\brief Set the event dispatcher\n> - * \\param[in] dispatcher Pointer to the event dispatcher\n> - *\n> - * libcamera requires an event dispatcher to integrate event notification and\n> - * timers with the application event loop. Applications that want to provide\n> - * their own event dispatcher shall call this function once and only once before\n> - * the camera manager is started with start(). If no event dispatcher is\n> - * provided, a default poll-based implementation will be used.\n> - *\n> - * The CameraManager takes ownership of the event dispatcher and will delete it\n> - * when the application terminates.\n> - */\n> -void CameraManager::setEventDispatcher(std::unique_ptr<EventDispatcher> dispatcher)\n> -{\n> -\tthread()->setEventDispatcher(std::move(dispatcher));\n> -}\n> -\n> -/**\n> - * \\brief Retrieve the event dispatcher\n> - *\n> - * This function retrieves the event dispatcher set with setEventDispatcher().\n> - * If no dispatcher has been set, a default poll-based implementation is created\n> - * and returned, and no custom event dispatcher may be installed anymore.\n> - *\n> - * The returned event dispatcher is valid until the camera manager is destroyed.\n> - *\n> - * \\return Pointer to the event dispatcher\n> - */\n> -EventDispatcher *CameraManager::eventDispatcher()\n> -{\n> -\treturn thread()->eventDispatcher();\n> -}\n> -\n>  } /* namespace libcamera */\n> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> index c6e23a1a7a18..d26fcf10b3c4 100644\n> --- a/src/libcamera/device_enumerator_udev.cpp\n> +++ b/src/libcamera/device_enumerator_udev.cpp\n> @@ -17,8 +17,7 @@\n>  #include <sys/sysmacros.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_notifier.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  \n> diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/event_dispatcher.cpp\n> index 90bd5daf0612..e0ce1eb3cc04 100644\n> --- a/src/libcamera/event_dispatcher.cpp\n> +++ b/src/libcamera/event_dispatcher.cpp\n> @@ -5,7 +5,7 @@\n>   * event_dispatcher.cpp - Event dispatcher\n>   */\n>  \n> -#include <libcamera/event_dispatcher.h>\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  \n>  #include \"libcamera/internal/log.h\"\n>  \n> diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/event_dispatcher_poll.cpp\n> index 9ab85da7d75d..456c6def075b 100644\n> --- a/src/libcamera/event_dispatcher_poll.cpp\n> +++ b/src/libcamera/event_dispatcher_poll.cpp\n> @@ -16,11 +16,10 @@\n>  #include <sys/eventfd.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_notifier.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp\n> index 21c07faf0963..6b0575c0db77 100644\n> --- a/src/libcamera/event_notifier.cpp\n> +++ b/src/libcamera/event_notifier.cpp\n> @@ -5,11 +5,11 @@\n>   * event_notifier.cpp - File descriptor event notifier\n>   */\n>  \n> -#include <libcamera/event_notifier.h>\n> +#include \"libcamera/internal/event_notifier.h\"\n>  \n>  #include <libcamera/camera_manager.h>\n> -#include <libcamera/event_dispatcher.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/message.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  \n> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> index 5c8cce16200e..fdb359f7fcd1 100644\n> --- a/src/libcamera/ipc_unixsocket.cpp\n> +++ b/src/libcamera/ipc_unixsocket.cpp\n> @@ -12,8 +12,7 @@\n>  #include <sys/socket.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_notifier.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/pipeline/rkisp1/timeline.h b/src/libcamera/pipeline/rkisp1/timeline.h\n> index 0c37b06fa6df..35a085159b8f 100644\n> --- a/src/libcamera/pipeline/rkisp1/timeline.h\n> +++ b/src/libcamera/pipeline/rkisp1/timeline.h\n> @@ -10,8 +10,7 @@\n>  #include <list>\n>  #include <map>\n>  \n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 72b5afe2f9c0..40a434a6b0c2 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -20,8 +20,7 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> -#include <libcamera/event_notifier.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n> diff --git a/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp b/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> index 0c4687f737a3..bdbac988e057 100644\n> --- a/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> +++ b/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> @@ -9,10 +9,10 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/logging.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n>  #include \"libcamera/internal/log.h\"\n> diff --git a/src/libcamera/thread.cpp b/src/libcamera/thread.cpp\n> index b5d7103ad341..f339dab165b6 100644\n> --- a/src/libcamera/thread.cpp\n> +++ b/src/libcamera/thread.cpp\n> @@ -14,8 +14,7 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/event_dispatcher_poll.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/message.h\"\n> diff --git a/src/libcamera/timer.cpp b/src/libcamera/timer.cpp\n> index 24e452eda49e..c242113a782e 100644\n> --- a/src/libcamera/timer.cpp\n> +++ b/src/libcamera/timer.cpp\n> @@ -5,13 +5,13 @@\n>   * timer.cpp - Generic timer\n>   */\n>  \n> -#include <libcamera/timer.h>\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include <chrono>\n>  \n>  #include <libcamera/camera_manager.h>\n> -#include <libcamera/event_dispatcher.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/message.h\"\n>  #include \"libcamera/internal/thread.h\"\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index fd0b140f8ce7..decd19ef5281 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -16,8 +16,7 @@\n>  #include <sys/syscall.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_notifier.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n>  #include \"libcamera/internal/utils.h\"\n> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> index 5ee1b479b513..e76fe2dd1f3a 100644\n> --- a/src/libcamera/v4l2_videodevice.cpp\n> +++ b/src/libcamera/v4l2_videodevice.cpp\n> @@ -20,9 +20,9 @@\n>  \n>  #include <linux/version.h>\n>  \n> -#include <libcamera/event_notifier.h>\n>  #include <libcamera/file_descriptor.h>\n>  \n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/media_object.h\"\n> diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp\n> index ccf532d7b7fc..7ff628269c47 100644\n> --- a/test/camera/buffer_import.cpp\n> +++ b/test/camera/buffer_import.cpp\n> @@ -12,12 +12,11 @@\n>  #include <numeric>\n>  #include <vector>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n>  #include \"libcamera/internal/device_enumerator.h\"\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  #include \"buffer_source.h\"\n> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> index fd5292b7c8c9..ec978068c977 100644\n> --- a/test/camera/capture.cpp\n> +++ b/test/camera/capture.cpp\n> @@ -7,9 +7,10 @@\n>  \n>  #include <iostream>\n>  \n> -#include <libcamera/event_dispatcher.h>\n>  #include <libcamera/framebuffer_allocator.h>\n> -#include <libcamera/timer.h>\n> +\n> +#include \"libcamera/internal/event_dispatcher.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"libcamera/internal/thread.h\"\n>  \n> diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp\n> index 1b61778699ed..8ae05ac62985 100644\n> --- a/test/event-dispatcher.cpp\n> +++ b/test/event-dispatcher.cpp\n> @@ -10,10 +10,9 @@\n>  #include <signal.h>\n>  #include <sys/time.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/event-thread.cpp b/test/event-thread.cpp\n> index c90e6ac04dd3..aeb8b3bf4bac 100644\n> --- a/test/event-thread.cpp\n> +++ b/test/event-thread.cpp\n> @@ -10,10 +10,9 @@\n>  #include <string.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_notifier.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/event.cpp b/test/event.cpp\n> index c865092c7a8a..1f16c97bbab5 100644\n> --- a/test/event.cpp\n> +++ b/test/event.cpp\n> @@ -9,11 +9,10 @@\n>  #include <string.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/event_notifier.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp\n> index 7d551eeb900d..94cb859352ec 100644\n> --- a/test/hotplug-cameras.cpp\n> +++ b/test/hotplug-cameras.cpp\n> @@ -13,11 +13,11 @@\n>  \n>  #include <libcamera/camera.h>\n>  #include <libcamera/camera_manager.h>\n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\n> index 67488409e7ff..9f575f9350ec 100644\n> --- a/test/ipa/ipa_interface_test.cpp\n> +++ b/test/ipa/ipa_interface_test.cpp\n> @@ -12,16 +12,16 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/event_notifier.h>\n>  #include <libcamera/ipa/vimc.h>\n> -#include <libcamera/timer.h>\n>  \n>  #include \"libcamera/internal/device_enumerator.h\"\n> +#include \"libcamera/internal/event_dispatcher.h\"\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp\n> index 9cd07ce8d415..19a1d7dd8a2d 100644\n> --- a/test/ipc/unixsocket.cpp\n> +++ b/test/ipc/unixsocket.cpp\n> @@ -15,11 +15,10 @@\n>  #include <sys/wait.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n>  #include \"test.h\"\n> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> index 2a82622236b4..c0a1a012d366 100644\n> --- a/test/log/log_process.cpp\n> +++ b/test/log/log_process.cpp\n> @@ -14,13 +14,13 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> -#include <libcamera/event_dispatcher.h>\n>  #include <libcamera/logging.h>\n> -#include <libcamera/timer.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n>  #include \"test.h\"\n> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp\n> index f3fd23283239..a6f816f395eb 100644\n> --- a/test/object-invoke.cpp\n> +++ b/test/object-invoke.cpp\n> @@ -8,9 +8,9 @@\n>  #include <iostream>\n>  #include <thread>\n>  \n> -#include <libcamera/event_dispatcher.h>\n>  #include <libcamera/object.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  \n>  #include \"test.h\"\n> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> index a3eaef80b2a2..1279d8c17598 100644\n> --- a/test/process/process_test.cpp\n> +++ b/test/process/process_test.cpp\n> @@ -9,11 +9,10 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n>  #include \"test.h\"\n> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> index f794d8e7dd4e..be29eee1bdb6 100644\n> --- a/test/timer-thread.cpp\n> +++ b/test/timer-thread.cpp\n> @@ -8,10 +8,9 @@\n>  #include <chrono>\n>  #include <iostream>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/timer.cpp b/test/timer.cpp\n> index 537489d736ad..fc90b11040d8 100644\n> --- a/test/timer.cpp\n> +++ b/test/timer.cpp\n> @@ -8,10 +8,9 @@\n>  #include <chrono>\n>  #include <iostream>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp\n> index 5e7e2d97f011..c75259be0d10 100644\n> --- a/test/v4l2_videodevice/buffer_sharing.cpp\n> +++ b/test/v4l2_videodevice/buffer_sharing.cpp\n> @@ -13,10 +13,10 @@\n>  #include <iostream>\n>  \n>  #include <libcamera/buffer.h>\n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"v4l2_videodevice_test.h\"\n>  \n> diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp\n> index 2b38102e9cad..accdb34a699c 100644\n> --- a/test/v4l2_videodevice/capture_async.cpp\n> +++ b/test/v4l2_videodevice/capture_async.cpp\n> @@ -8,10 +8,10 @@\n>  #include <iostream>\n>  \n>  #include <libcamera/buffer.h>\n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"v4l2_videodevice_test.h\"\n>  \n> diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> index 616261e11c71..e0f068082c01 100644\n> --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> @@ -8,12 +8,12 @@\n>  #include <iostream>\n>  \n>  #include <libcamera/buffer.h>\n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n>  \n>  #include \"libcamera/internal/device_enumerator.h\"\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  #include \"test.h\"\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4081DBE082\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Nov 2020 10:03:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CC2C8631BE;\n\tFri, 13 Nov 2020 11:03:34 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 68257631B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Nov 2020 11:03:33 +0100 (CET)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DF6AD31A;\n\tFri, 13 Nov 2020 11:03:32 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mHokHG+X\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1605261813;\n\tbh=6Bs3qBfc0ZH6VJG5M3HwSICrxWv5rOeQvpYiLXq0UNM=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=mHokHG+X0a9jlpcW5j45ds1mQgjr/BnU9gbJ+/NNgLts9XEy+NZB21Cvg7M8W23AL\n\ts8tcdn0bJCBhKpJE+iTShVUx42NPhaizvtYP8xYhgXez9yBpz8LM2dwNaeAjDmCtvG\n\tx08MMw3hpSZVNShwGdkJku7qLNn8fAkZqYabPqqY=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20201113063815.10288-1-laurent.pinchart@ideasonboard.com>\n\t<20201113063815.10288-4-laurent.pinchart@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2hhbSA8a2llcmFuLmJpbmdoYW1AaWRlYXNvbmJvYXJkLmNvbT6JAlcEEwEKAEECGwMFCwkI\n\tBwIGFQgJCgsCBBYCAwECHgECF4ACGQEWIQSQLdeYP70o/eNy1HqhHkZyEKRh/QUCXWTtygUJ\n\tCyJXZAAKCRChHkZyEKRh/f8dEACTDsbLN2nioNZMwyLuQRUAFcXNolDX48xcUXsWS2QjxaPm\n\tVsJx8Uy8aYkS85mdPBh0C83OovQR/OVbr8AxhGvYqBs3nQvbWuTl/+4od7DfK2VZOoKBAu5S\n\tQK2FYuUcikDqYcFWJ8DQnubxfE8dvzojHEkXw0sA4igINHDDFX3HJGZtLio+WpEFQtCbfTAG\n\tYZslasz1YZRbwEdSsmO3/kqy5eMnczlm8a21A3fKUo3g8oAZEFM+f4DUNzqIltg31OAB/kZS\n\tenKZQ/SWC8PmLg/ZXBrReYakxXtkP6w3FwMlzOlhGxqhIRNiAJfXJBaRhuUWzPOpEDE9q5YJ\n\tBmqQL2WJm1VSNNVxbXJHpaWMH1sA2R00vmvRrPXGwyIO0IPYeUYQa3gsy6k+En/aMQJd27dp\n\taScf9am9PFICPY5T4ppneeJLif2lyLojo0mcHOV+uyrds9XkLpp14GfTkeKPdPMrLLTsHRfH\n\tfA4I4OBpRrEPiGIZB/0im98MkGY/Mu6qxeZmYLCcgD6qz4idOvfgVOrNh+aA8HzIVR+RMW8H\n\tQGBN9f0E3kfwxuhl3omo6V7lDw8XOdmuWZNC9zPq1UfryVHANYbLGz9KJ4Aw6M+OgBC2JpkD\n\thXMdHUkC+d20dwXrwHTlrJi1YNp6rBc+xald3wsUPOZ5z8moTHUX/uPA/qhGsbkCDQRWBP1m\n\tARAAzijkb+Sau4hAncr1JjOY+KyFEdUNxRy+hqTJdJfaYihxyaj0Ee0P0zEi35CbE6lgU0Uz\n\ttih9fiUbSV3wfsWqg1Ut3/5rTKu7kLFp15kF7eqvV4uezXRD3Qu4yjv/rMmEJbbD4cTvGCYI\n\td6MDC417f7vK3hCbCVIZSp3GXxyC1LU+UQr3fFcOyCwmP9vDUR9JV0BSqHHxRDdpUXE26Dk6\n\tmhf0V1YkspE5St814ETXpEus2urZE5yJIUROlWPIL+hm3NEWfAP06vsQUyLvr/GtbOT79vXl\n\tEn1aulcYyu20dRRxhkQ6iILaURcxIAVJJKPi8dsoMnS8pB0QW12AHWuirPF0g6DiuUfPmrA5\n\tPKe56IGlpkjc8cO51lIxHkWTpCMWigRdPDexKX+Sb+W9QWK/0JjIc4t3KBaiG8O4yRX8ml2R\n\t+rxfAVKM6V769P/hWoRGdgUMgYHFpHGSgEt80OKK5HeUPy2cngDUXzwrqiM5Sz6Od0qw5pCk\n\tNlXqI0W/who0iSVM+8+RmyY0OEkxEcci7rRLsGnM15B5PjLJjh1f2ULYkv8s4SnDwMZ/kE04\n\t/UqCMK/KnX8pwXEMCjz0h6qWNpGwJ0/tYIgQJZh6bqkvBrDogAvuhf60Sogw+mH8b+PBlx1L\n\toeTK396wc+4c3BfiC6pNtUS5GpsPMMjYMk7kVvEAEQEAAYkCPAQYAQoAJgIbDBYhBJAt15g/\n\tvSj943LUeqEeRnIQpGH9BQJdizzIBQkLSKZiAAoJEKEeRnIQpGH9eYgQAJpjaWNgqNOnMTmD\n\tMJggbwjIotypzIXfhHNCeTkG7+qCDlSaBPclcPGYrTwCt0YWPU2TgGgJrVhYT20ierN8LUvj\n\t6qOPTd+Uk7NFzL65qkh80ZKNBFddx1AabQpSVQKbdcLb8OFs85kuSvFdgqZwgxA1vl4TFhNz\n\tPZ79NAmXLackAx3sOVFhk4WQaKRshCB7cSl+RIng5S/ThOBlwNlcKG7j7W2MC06BlTbdEkUp\n\tECzuuRBv8wX4OQl+hbWbB/VKIx5HKlLu1eypen/5lNVzSqMMIYkkZcjV2SWQyUGxSwq0O/sx\n\tS0A8/atCHUXOboUsn54qdxrVDaK+6jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48j\n\tsbEYX0YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<f1fbd470-7472-c55b-b5c4-ffe89ad42230@ideasonboard.com>","Date":"Fri, 13 Nov 2020 10:03:30 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<20201113063815.10288-4-laurent.pinchart@ideasonboard.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH v1 3/5] libcamera: Move\n\tEventDispatcher to internal API","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Reply-To":"kieran.bingham@ideasonboard.com","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":13705,"web_url":"https://patchwork.libcamera.org/comment/13705/","msgid":"<20201113103203.GG1603296@oden.dyn.berto.se>","date":"2020-11-13T10:32:03","subject":"Re: [libcamera-devel] [PATCH v1 3/5] libcamera: Move\n\tEventDispatcher to internal API","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your patch.\n\nOn 2020-11-13 08:38:13 +0200, Laurent Pinchart wrote:\n> There's no user of the EventDispatcher (and the related EventNotifier\n> and Timer classes) outside of libcamera. Move those classes to the\n> internal API.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  include/libcamera/camera_manager.h            |  4 --\n>  .../{ => internal}/event_dispatcher.h         |  0\n>  .../internal/event_dispatcher_poll.h          |  2 +-\n>  .../libcamera/{ => internal}/event_notifier.h |  0\n>  include/libcamera/internal/meson.build        |  3 ++\n>  include/libcamera/{ => internal}/timer.h      |  0\n>  include/libcamera/meson.build                 |  3 --\n>  src/libcamera/camera_manager.cpp              | 44 +------------------\n>  src/libcamera/device_enumerator_udev.cpp      |  3 +-\n>  src/libcamera/event_dispatcher.cpp            |  2 +-\n>  src/libcamera/event_dispatcher_poll.cpp       |  5 +--\n>  src/libcamera/event_notifier.cpp              |  4 +-\n>  src/libcamera/ipc_unixsocket.cpp              |  3 +-\n>  src/libcamera/pipeline/rkisp1/timeline.h      |  3 +-\n>  src/libcamera/process.cpp                     |  3 +-\n>  .../proxy/worker/ipa_proxy_linux_worker.cpp   |  2 +-\n>  src/libcamera/thread.cpp                      |  3 +-\n>  src/libcamera/timer.cpp                       |  4 +-\n>  src/libcamera/v4l2_device.cpp                 |  3 +-\n>  src/libcamera/v4l2_videodevice.cpp            |  2 +-\n>  test/camera/buffer_import.cpp                 |  5 +--\n>  test/camera/capture.cpp                       |  5 ++-\n>  test/event-dispatcher.cpp                     |  5 +--\n>  test/event-thread.cpp                         |  5 +--\n>  test/event.cpp                                |  7 ++-\n>  test/hotplug-cameras.cpp                      |  4 +-\n>  test/ipa/ipa_interface_test.cpp               |  6 +--\n>  test/ipc/unixsocket.cpp                       |  5 +--\n>  test/log/log_process.cpp                      |  4 +-\n>  test/object-invoke.cpp                        |  2 +-\n>  test/process/process_test.cpp                 |  5 +--\n>  test/timer-thread.cpp                         |  5 +--\n>  test/timer.cpp                                |  5 +--\n>  test/v4l2_videodevice/buffer_sharing.cpp      |  4 +-\n>  test/v4l2_videodevice/capture_async.cpp       |  4 +-\n>  test/v4l2_videodevice/v4l2_m2mdevice.cpp      |  4 +-\n>  36 files changed, 55 insertions(+), 113 deletions(-)\n>  rename include/libcamera/{ => internal}/event_dispatcher.h (100%)\n>  rename include/libcamera/{ => internal}/event_notifier.h (100%)\n>  rename include/libcamera/{ => internal}/timer.h (100%)\n> \n> diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h\n> index 6d5341c76412..8c8830e7ff1d 100644\n> --- a/include/libcamera/camera_manager.h\n> +++ b/include/libcamera/camera_manager.h\n> @@ -19,7 +19,6 @@\n>  namespace libcamera {\n>  \n>  class Camera;\n> -class EventDispatcher;\n>  \n>  class CameraManager : public Object, public Extensible\n>  {\n> @@ -43,9 +42,6 @@ public:\n>  \n>  \tstatic const std::string &version() { return version_; }\n>  \n> -\tvoid setEventDispatcher(std::unique_ptr<EventDispatcher> dispatcher);\n> -\tEventDispatcher *eventDispatcher();\n> -\n>  \tSignal<std::shared_ptr<Camera>> cameraAdded;\n>  \tSignal<std::shared_ptr<Camera>> cameraRemoved;\n>  \n> diff --git a/include/libcamera/event_dispatcher.h b/include/libcamera/internal/event_dispatcher.h\n> similarity index 100%\n> rename from include/libcamera/event_dispatcher.h\n> rename to include/libcamera/internal/event_dispatcher.h\n> diff --git a/include/libcamera/internal/event_dispatcher_poll.h b/include/libcamera/internal/event_dispatcher_poll.h\n> index 39d9be525dab..33de051de261 100644\n> --- a/include/libcamera/internal/event_dispatcher_poll.h\n> +++ b/include/libcamera/internal/event_dispatcher_poll.h\n> @@ -11,7 +11,7 @@\n>  #include <map>\n>  #include <vector>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  \n>  struct pollfd;\n>  \n> diff --git a/include/libcamera/event_notifier.h b/include/libcamera/internal/event_notifier.h\n> similarity index 100%\n> rename from include/libcamera/event_notifier.h\n> rename to include/libcamera/internal/event_notifier.h\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index 6500fe2a82fb..7cde023f7c3a 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -18,7 +18,9 @@ libcamera_internal_headers = files([\n>      'device_enumerator.h',\n>      'device_enumerator_sysfs.h',\n>      'device_enumerator_udev.h',\n> +    'event_dispatcher.h',\n>      'event_dispatcher_poll.h',\n> +    'event_notifier.h',\n>      'file.h',\n>      'formats.h',\n>      'ipa_context_wrapper.h',\n> @@ -36,6 +38,7 @@ libcamera_internal_headers = files([\n>      'semaphore.h',\n>      'sysfs.h',\n>      'thread.h',\n> +    'timer.h',\n>      'utils.h',\n>      'v4l2_controls.h',\n>      'v4l2_device.h',\n> diff --git a/include/libcamera/timer.h b/include/libcamera/internal/timer.h\n> similarity index 100%\n> rename from include/libcamera/timer.h\n> rename to include/libcamera/internal/timer.h\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index 0b891a8f4f9b..cf2935f1ee95 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -6,8 +6,6 @@ libcamera_public_headers = files([\n>      'camera.h',\n>      'camera_manager.h',\n>      'controls.h',\n> -    'event_dispatcher.h',\n> -    'event_notifier.h',\n>      'extensible.h',\n>      'file_descriptor.h',\n>      'framebuffer_allocator.h',\n> @@ -19,7 +17,6 @@ libcamera_public_headers = files([\n>      'signal.h',\n>      'span.h',\n>      'stream.h',\n> -    'timer.h',\n>      'transform.h',\n>  ])\n>  \n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index 427ea5daf671..67641a555e1e 100644\n> --- a/src/libcamera/camera_manager.cpp\n> +++ b/src/libcamera/camera_manager.cpp\n> @@ -11,10 +11,8 @@\n>  #include <map>\n>  \n>  #include <libcamera/camera.h>\n> -#include <libcamera/event_dispatcher.h>\n>  \n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/event_dispatcher_poll.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> @@ -244,12 +242,8 @@ void CameraManager::Private::removeCamera(Camera *camera)\n>   * a time. Attempting to create a second instance without first deleting the\n>   * existing instance results in undefined behaviour.\n>   *\n> - * The manager is initially stopped, and shall be configured before being\n> - * started. In particular a custom event dispatcher shall be installed if\n> - * needed with CameraManager::setEventDispatcher().\n> - *\n> - * Once the camera manager is configured, it shall be started with start().\n> - * This will enumerate all the cameras present in the system, which can then be\n> + * The manager is initially stopped, and shall be started with start(). This\n> + * will enumerate all the cameras present in the system, which can then be\n>   * listed with list() and retrieved with get().\n>   *\n>   * Cameras are shared through std::shared_ptr<>, ensuring that a camera will\n> @@ -477,38 +471,4 @@ void CameraManager::removeCamera(std::shared_ptr<Camera> camera)\n>   * \\return The libcamera version string\n>   */\n>  \n> -/**\n> - * \\brief Set the event dispatcher\n> - * \\param[in] dispatcher Pointer to the event dispatcher\n> - *\n> - * libcamera requires an event dispatcher to integrate event notification and\n> - * timers with the application event loop. Applications that want to provide\n> - * their own event dispatcher shall call this function once and only once before\n> - * the camera manager is started with start(). If no event dispatcher is\n> - * provided, a default poll-based implementation will be used.\n> - *\n> - * The CameraManager takes ownership of the event dispatcher and will delete it\n> - * when the application terminates.\n> - */\n> -void CameraManager::setEventDispatcher(std::unique_ptr<EventDispatcher> dispatcher)\n> -{\n> -\tthread()->setEventDispatcher(std::move(dispatcher));\n> -}\n> -\n> -/**\n> - * \\brief Retrieve the event dispatcher\n> - *\n> - * This function retrieves the event dispatcher set with setEventDispatcher().\n> - * If no dispatcher has been set, a default poll-based implementation is created\n> - * and returned, and no custom event dispatcher may be installed anymore.\n> - *\n> - * The returned event dispatcher is valid until the camera manager is destroyed.\n> - *\n> - * \\return Pointer to the event dispatcher\n> - */\n> -EventDispatcher *CameraManager::eventDispatcher()\n> -{\n> -\treturn thread()->eventDispatcher();\n> -}\n> -\n>  } /* namespace libcamera */\n> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> index c6e23a1a7a18..d26fcf10b3c4 100644\n> --- a/src/libcamera/device_enumerator_udev.cpp\n> +++ b/src/libcamera/device_enumerator_udev.cpp\n> @@ -17,8 +17,7 @@\n>  #include <sys/sysmacros.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_notifier.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  \n> diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/event_dispatcher.cpp\n> index 90bd5daf0612..e0ce1eb3cc04 100644\n> --- a/src/libcamera/event_dispatcher.cpp\n> +++ b/src/libcamera/event_dispatcher.cpp\n> @@ -5,7 +5,7 @@\n>   * event_dispatcher.cpp - Event dispatcher\n>   */\n>  \n> -#include <libcamera/event_dispatcher.h>\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  \n>  #include \"libcamera/internal/log.h\"\n\nHere and in other places below the grouping of internal headers are \nbroken. In some files (example src/libcamera/timer.cpp) internal headers \nare included before system headers in this change. Is this intentional \nor the result of a global sed operation ? :-)\n\n>  \n> diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/event_dispatcher_poll.cpp\n> index 9ab85da7d75d..456c6def075b 100644\n> --- a/src/libcamera/event_dispatcher_poll.cpp\n> +++ b/src/libcamera/event_dispatcher_poll.cpp\n> @@ -16,11 +16,10 @@\n>  #include <sys/eventfd.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_notifier.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp\n> index 21c07faf0963..6b0575c0db77 100644\n> --- a/src/libcamera/event_notifier.cpp\n> +++ b/src/libcamera/event_notifier.cpp\n> @@ -5,11 +5,11 @@\n>   * event_notifier.cpp - File descriptor event notifier\n>   */\n>  \n> -#include <libcamera/event_notifier.h>\n> +#include \"libcamera/internal/event_notifier.h\"\n>  \n>  #include <libcamera/camera_manager.h>\n> -#include <libcamera/event_dispatcher.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/message.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  \n> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> index 5c8cce16200e..fdb359f7fcd1 100644\n> --- a/src/libcamera/ipc_unixsocket.cpp\n> +++ b/src/libcamera/ipc_unixsocket.cpp\n> @@ -12,8 +12,7 @@\n>  #include <sys/socket.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_notifier.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/pipeline/rkisp1/timeline.h b/src/libcamera/pipeline/rkisp1/timeline.h\n> index 0c37b06fa6df..35a085159b8f 100644\n> --- a/src/libcamera/pipeline/rkisp1/timeline.h\n> +++ b/src/libcamera/pipeline/rkisp1/timeline.h\n> @@ -10,8 +10,7 @@\n>  #include <list>\n>  #include <map>\n>  \n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 72b5afe2f9c0..40a434a6b0c2 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -20,8 +20,7 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> -#include <libcamera/event_notifier.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n> diff --git a/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp b/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> index 0c4687f737a3..bdbac988e057 100644\n> --- a/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> +++ b/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> @@ -9,10 +9,10 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/logging.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n>  #include \"libcamera/internal/log.h\"\n> diff --git a/src/libcamera/thread.cpp b/src/libcamera/thread.cpp\n> index b5d7103ad341..f339dab165b6 100644\n> --- a/src/libcamera/thread.cpp\n> +++ b/src/libcamera/thread.cpp\n> @@ -14,8 +14,7 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/event_dispatcher_poll.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/message.h\"\n> diff --git a/src/libcamera/timer.cpp b/src/libcamera/timer.cpp\n> index 24e452eda49e..c242113a782e 100644\n> --- a/src/libcamera/timer.cpp\n> +++ b/src/libcamera/timer.cpp\n> @@ -5,13 +5,13 @@\n>   * timer.cpp - Generic timer\n>   */\n>  \n> -#include <libcamera/timer.h>\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include <chrono>\n>  \n>  #include <libcamera/camera_manager.h>\n> -#include <libcamera/event_dispatcher.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/message.h\"\n>  #include \"libcamera/internal/thread.h\"\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index fd0b140f8ce7..decd19ef5281 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -16,8 +16,7 @@\n>  #include <sys/syscall.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_notifier.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n>  #include \"libcamera/internal/utils.h\"\n> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> index 5ee1b479b513..e76fe2dd1f3a 100644\n> --- a/src/libcamera/v4l2_videodevice.cpp\n> +++ b/src/libcamera/v4l2_videodevice.cpp\n> @@ -20,9 +20,9 @@\n>  \n>  #include <linux/version.h>\n>  \n> -#include <libcamera/event_notifier.h>\n>  #include <libcamera/file_descriptor.h>\n>  \n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/media_object.h\"\n> diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp\n> index ccf532d7b7fc..7ff628269c47 100644\n> --- a/test/camera/buffer_import.cpp\n> +++ b/test/camera/buffer_import.cpp\n> @@ -12,12 +12,11 @@\n>  #include <numeric>\n>  #include <vector>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n>  #include \"libcamera/internal/device_enumerator.h\"\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  #include \"buffer_source.h\"\n> diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> index fd5292b7c8c9..ec978068c977 100644\n> --- a/test/camera/capture.cpp\n> +++ b/test/camera/capture.cpp\n> @@ -7,9 +7,10 @@\n>  \n>  #include <iostream>\n>  \n> -#include <libcamera/event_dispatcher.h>\n>  #include <libcamera/framebuffer_allocator.h>\n> -#include <libcamera/timer.h>\n> +\n> +#include \"libcamera/internal/event_dispatcher.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"libcamera/internal/thread.h\"\n>  \n> diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp\n> index 1b61778699ed..8ae05ac62985 100644\n> --- a/test/event-dispatcher.cpp\n> +++ b/test/event-dispatcher.cpp\n> @@ -10,10 +10,9 @@\n>  #include <signal.h>\n>  #include <sys/time.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/event-thread.cpp b/test/event-thread.cpp\n> index c90e6ac04dd3..aeb8b3bf4bac 100644\n> --- a/test/event-thread.cpp\n> +++ b/test/event-thread.cpp\n> @@ -10,10 +10,9 @@\n>  #include <string.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_notifier.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/event.cpp b/test/event.cpp\n> index c865092c7a8a..1f16c97bbab5 100644\n> --- a/test/event.cpp\n> +++ b/test/event.cpp\n> @@ -9,11 +9,10 @@\n>  #include <string.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/event_notifier.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp\n> index 7d551eeb900d..94cb859352ec 100644\n> --- a/test/hotplug-cameras.cpp\n> +++ b/test/hotplug-cameras.cpp\n> @@ -13,11 +13,11 @@\n>  \n>  #include <libcamera/camera.h>\n>  #include <libcamera/camera_manager.h>\n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\n> index 67488409e7ff..9f575f9350ec 100644\n> --- a/test/ipa/ipa_interface_test.cpp\n> +++ b/test/ipa/ipa_interface_test.cpp\n> @@ -12,16 +12,16 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/event_notifier.h>\n>  #include <libcamera/ipa/vimc.h>\n> -#include <libcamera/timer.h>\n>  \n>  #include \"libcamera/internal/device_enumerator.h\"\n> +#include \"libcamera/internal/event_dispatcher.h\"\n> +#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp\n> index 9cd07ce8d415..19a1d7dd8a2d 100644\n> --- a/test/ipc/unixsocket.cpp\n> +++ b/test/ipc/unixsocket.cpp\n> @@ -15,11 +15,10 @@\n>  #include <sys/wait.h>\n>  #include <unistd.h>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/ipc_unixsocket.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n>  #include \"test.h\"\n> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> index 2a82622236b4..c0a1a012d366 100644\n> --- a/test/log/log_process.cpp\n> +++ b/test/log/log_process.cpp\n> @@ -14,13 +14,13 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> -#include <libcamera/event_dispatcher.h>\n>  #include <libcamera/logging.h>\n> -#include <libcamera/timer.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n>  #include \"test.h\"\n> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp\n> index f3fd23283239..a6f816f395eb 100644\n> --- a/test/object-invoke.cpp\n> +++ b/test/object-invoke.cpp\n> @@ -8,9 +8,9 @@\n>  #include <iostream>\n>  #include <thread>\n>  \n> -#include <libcamera/event_dispatcher.h>\n>  #include <libcamera/object.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  \n>  #include \"test.h\"\n> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> index a3eaef80b2a2..1279d8c17598 100644\n> --- a/test/process/process_test.cpp\n> +++ b/test/process/process_test.cpp\n> @@ -9,11 +9,10 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/utils.h\"\n>  \n>  #include \"test.h\"\n> diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> index f794d8e7dd4e..be29eee1bdb6 100644\n> --- a/test/timer-thread.cpp\n> +++ b/test/timer-thread.cpp\n> @@ -8,10 +8,9 @@\n>  #include <chrono>\n>  #include <iostream>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/timer.cpp b/test/timer.cpp\n> index 537489d736ad..fc90b11040d8 100644\n> --- a/test/timer.cpp\n> +++ b/test/timer.cpp\n> @@ -8,10 +8,9 @@\n>  #include <chrono>\n>  #include <iostream>\n>  \n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n> -\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp\n> index 5e7e2d97f011..c75259be0d10 100644\n> --- a/test/v4l2_videodevice/buffer_sharing.cpp\n> +++ b/test/v4l2_videodevice/buffer_sharing.cpp\n> @@ -13,10 +13,10 @@\n>  #include <iostream>\n>  \n>  #include <libcamera/buffer.h>\n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"v4l2_videodevice_test.h\"\n>  \n> diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp\n> index 2b38102e9cad..accdb34a699c 100644\n> --- a/test/v4l2_videodevice/capture_async.cpp\n> +++ b/test/v4l2_videodevice/capture_async.cpp\n> @@ -8,10 +8,10 @@\n>  #include <iostream>\n>  \n>  #include <libcamera/buffer.h>\n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n>  \n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  \n>  #include \"v4l2_videodevice_test.h\"\n>  \n> diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> index 616261e11c71..e0f068082c01 100644\n> --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> @@ -8,12 +8,12 @@\n>  #include <iostream>\n>  \n>  #include <libcamera/buffer.h>\n> -#include <libcamera/event_dispatcher.h>\n> -#include <libcamera/timer.h>\n>  \n>  #include \"libcamera/internal/device_enumerator.h\"\n> +#include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/thread.h\"\n> +#include \"libcamera/internal/timer.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  #include \"test.h\"\n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 99B2EBE086\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Nov 2020 10:32:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1E410631BE;\n\tFri, 13 Nov 2020 11:32:07 +0100 (CET)","from mail-lj1-x241.google.com (mail-lj1-x241.google.com\n\t[IPv6:2a00:1450:4864:20::241])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 11EC5631B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Nov 2020 11:32:06 +0100 (CET)","by mail-lj1-x241.google.com with SMTP id l10so10071697lji.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Nov 2020 02:32:06 -0800 (PST)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tf22sm1038882ljn.99.2020.11.13.02.32.04\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 13 Nov 2020 02:32:04 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"ZVFU6zY/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=ZF07NnxVZC8Ps2wIJpxQU9Bpl8OzX0S6PZiTdU2WkUU=;\n\tb=ZVFU6zY/2KZq6Da9gCbNoiotgWKoFsPQJPwZl+Sb5OWIyh8Z9VOf1VXNYNg74EGZlb\n\tHcPzG3A2oXHf9heFbiX0OWWpiQlYEaX4kgupDO07fxqXufLqISe8Hb9Jft7uE/08nWG2\n\t4o2wcfamBShy2a9g3zgYz9zguEjh+N94Ca3HaskBqFO8xWHLmqhjV2b6i/xGq/69Ei7x\n\tbQY316Xz39fGvyxbxyaLi81LhzVWVQL4Z2erCDAl+bziUuShOCbQu5/HbjvfhQ3aWodX\n\tyBDr7+StH+f3KseeqTRgO/0G8igovHIXccp7kqDpzYeGYx+nRdSh4gYof5mf5ZOX8sXn\n\tWejw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=ZF07NnxVZC8Ps2wIJpxQU9Bpl8OzX0S6PZiTdU2WkUU=;\n\tb=NVcPDzP4XcslHcnifg24fqeiuAch+zgl44kcqgiyx90OGzSIPKlrAxLDB3fBI0ZniU\n\tCFtb0sxySw54jPYQk6sXnSGtJ0+JnnpmAnA6mkB2kvm4ErjGr2Op7b9rsacvvjTmq+N1\n\t9m+F/OpRufIzHkNQQUEAZTVf8/jRdpkTRsHnGL0t3Sl1hDHYykb6xs2vE6iR5bXDbxl/\n\trb08bZVvzNWKvQ+qhyI3FIhGs1zADVacZ7vC/7AwzjOdxPn7J7YfXpwp9ko8jMHU0qJA\n\tUxJ+d16DIttskjKcBZkRzHNSN+knW5JbPn5drJdSgBY6q/tEBlC0nPkGvheCuaAF5M0J\n\tFD3g==","X-Gm-Message-State":"AOAM5333vULSzQ4sT9M0YEZxL5vHhgB5PUGNd6Z3HF0KGEaOrIVtuWzG\n\tEkPpIcg+nRzOiH6wqROCTBJwQwYbBTn0Mw==","X-Google-Smtp-Source":"ABdhPJwAlhM8O8M56KG64n9zOLUw52AmCEadCqrNI+brhRQKE5EV4TPg2p4ubzjAKAbXI0oT0UE65g==","X-Received":"by 2002:a2e:9a52:: with SMTP id k18mr746969ljj.34.1605263525334; \n\tFri, 13 Nov 2020 02:32:05 -0800 (PST)","Date":"Fri, 13 Nov 2020 11:32:03 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20201113103203.GG1603296@oden.dyn.berto.se>","References":"<20201113063815.10288-1-laurent.pinchart@ideasonboard.com>\n\t<20201113063815.10288-4-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201113063815.10288-4-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v1 3/5] libcamera: Move\n\tEventDispatcher to internal API","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":13707,"web_url":"https://patchwork.libcamera.org/comment/13707/","msgid":"<20201113103638.GJ7524@pendragon.ideasonboard.com>","date":"2020-11-13T10:36:38","subject":"Re: [libcamera-devel] [PATCH v1 3/5] libcamera: Move\n\tEventDispatcher to internal API","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nOn Fri, Nov 13, 2020 at 11:32:03AM +0100, Niklas Söderlund wrote:\n> On 2020-11-13 08:38:13 +0200, Laurent Pinchart wrote:\n> > There's no user of the EventDispatcher (and the related EventNotifier\n> > and Timer classes) outside of libcamera. Move those classes to the\n> > internal API.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  include/libcamera/camera_manager.h            |  4 --\n> >  .../{ => internal}/event_dispatcher.h         |  0\n> >  .../internal/event_dispatcher_poll.h          |  2 +-\n> >  .../libcamera/{ => internal}/event_notifier.h |  0\n> >  include/libcamera/internal/meson.build        |  3 ++\n> >  include/libcamera/{ => internal}/timer.h      |  0\n> >  include/libcamera/meson.build                 |  3 --\n> >  src/libcamera/camera_manager.cpp              | 44 +------------------\n> >  src/libcamera/device_enumerator_udev.cpp      |  3 +-\n> >  src/libcamera/event_dispatcher.cpp            |  2 +-\n> >  src/libcamera/event_dispatcher_poll.cpp       |  5 +--\n> >  src/libcamera/event_notifier.cpp              |  4 +-\n> >  src/libcamera/ipc_unixsocket.cpp              |  3 +-\n> >  src/libcamera/pipeline/rkisp1/timeline.h      |  3 +-\n> >  src/libcamera/process.cpp                     |  3 +-\n> >  .../proxy/worker/ipa_proxy_linux_worker.cpp   |  2 +-\n> >  src/libcamera/thread.cpp                      |  3 +-\n> >  src/libcamera/timer.cpp                       |  4 +-\n> >  src/libcamera/v4l2_device.cpp                 |  3 +-\n> >  src/libcamera/v4l2_videodevice.cpp            |  2 +-\n> >  test/camera/buffer_import.cpp                 |  5 +--\n> >  test/camera/capture.cpp                       |  5 ++-\n> >  test/event-dispatcher.cpp                     |  5 +--\n> >  test/event-thread.cpp                         |  5 +--\n> >  test/event.cpp                                |  7 ++-\n> >  test/hotplug-cameras.cpp                      |  4 +-\n> >  test/ipa/ipa_interface_test.cpp               |  6 +--\n> >  test/ipc/unixsocket.cpp                       |  5 +--\n> >  test/log/log_process.cpp                      |  4 +-\n> >  test/object-invoke.cpp                        |  2 +-\n> >  test/process/process_test.cpp                 |  5 +--\n> >  test/timer-thread.cpp                         |  5 +--\n> >  test/timer.cpp                                |  5 +--\n> >  test/v4l2_videodevice/buffer_sharing.cpp      |  4 +-\n> >  test/v4l2_videodevice/capture_async.cpp       |  4 +-\n> >  test/v4l2_videodevice/v4l2_m2mdevice.cpp      |  4 +-\n> >  36 files changed, 55 insertions(+), 113 deletions(-)\n> >  rename include/libcamera/{ => internal}/event_dispatcher.h (100%)\n> >  rename include/libcamera/{ => internal}/event_notifier.h (100%)\n> >  rename include/libcamera/{ => internal}/timer.h (100%)\n> > \n> > diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h\n> > index 6d5341c76412..8c8830e7ff1d 100644\n> > --- a/include/libcamera/camera_manager.h\n> > +++ b/include/libcamera/camera_manager.h\n> > @@ -19,7 +19,6 @@\n> >  namespace libcamera {\n> >  \n> >  class Camera;\n> > -class EventDispatcher;\n> >  \n> >  class CameraManager : public Object, public Extensible\n> >  {\n> > @@ -43,9 +42,6 @@ public:\n> >  \n> >  \tstatic const std::string &version() { return version_; }\n> >  \n> > -\tvoid setEventDispatcher(std::unique_ptr<EventDispatcher> dispatcher);\n> > -\tEventDispatcher *eventDispatcher();\n> > -\n> >  \tSignal<std::shared_ptr<Camera>> cameraAdded;\n> >  \tSignal<std::shared_ptr<Camera>> cameraRemoved;\n> >  \n> > diff --git a/include/libcamera/event_dispatcher.h b/include/libcamera/internal/event_dispatcher.h\n> > similarity index 100%\n> > rename from include/libcamera/event_dispatcher.h\n> > rename to include/libcamera/internal/event_dispatcher.h\n> > diff --git a/include/libcamera/internal/event_dispatcher_poll.h b/include/libcamera/internal/event_dispatcher_poll.h\n> > index 39d9be525dab..33de051de261 100644\n> > --- a/include/libcamera/internal/event_dispatcher_poll.h\n> > +++ b/include/libcamera/internal/event_dispatcher_poll.h\n> > @@ -11,7 +11,7 @@\n> >  #include <map>\n> >  #include <vector>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  \n> >  struct pollfd;\n> >  \n> > diff --git a/include/libcamera/event_notifier.h b/include/libcamera/internal/event_notifier.h\n> > similarity index 100%\n> > rename from include/libcamera/event_notifier.h\n> > rename to include/libcamera/internal/event_notifier.h\n> > diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> > index 6500fe2a82fb..7cde023f7c3a 100644\n> > --- a/include/libcamera/internal/meson.build\n> > +++ b/include/libcamera/internal/meson.build\n> > @@ -18,7 +18,9 @@ libcamera_internal_headers = files([\n> >      'device_enumerator.h',\n> >      'device_enumerator_sysfs.h',\n> >      'device_enumerator_udev.h',\n> > +    'event_dispatcher.h',\n> >      'event_dispatcher_poll.h',\n> > +    'event_notifier.h',\n> >      'file.h',\n> >      'formats.h',\n> >      'ipa_context_wrapper.h',\n> > @@ -36,6 +38,7 @@ libcamera_internal_headers = files([\n> >      'semaphore.h',\n> >      'sysfs.h',\n> >      'thread.h',\n> > +    'timer.h',\n> >      'utils.h',\n> >      'v4l2_controls.h',\n> >      'v4l2_device.h',\n> > diff --git a/include/libcamera/timer.h b/include/libcamera/internal/timer.h\n> > similarity index 100%\n> > rename from include/libcamera/timer.h\n> > rename to include/libcamera/internal/timer.h\n> > diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> > index 0b891a8f4f9b..cf2935f1ee95 100644\n> > --- a/include/libcamera/meson.build\n> > +++ b/include/libcamera/meson.build\n> > @@ -6,8 +6,6 @@ libcamera_public_headers = files([\n> >      'camera.h',\n> >      'camera_manager.h',\n> >      'controls.h',\n> > -    'event_dispatcher.h',\n> > -    'event_notifier.h',\n> >      'extensible.h',\n> >      'file_descriptor.h',\n> >      'framebuffer_allocator.h',\n> > @@ -19,7 +17,6 @@ libcamera_public_headers = files([\n> >      'signal.h',\n> >      'span.h',\n> >      'stream.h',\n> > -    'timer.h',\n> >      'transform.h',\n> >  ])\n> >  \n> > diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> > index 427ea5daf671..67641a555e1e 100644\n> > --- a/src/libcamera/camera_manager.cpp\n> > +++ b/src/libcamera/camera_manager.cpp\n> > @@ -11,10 +11,8 @@\n> >  #include <map>\n> >  \n> >  #include <libcamera/camera.h>\n> > -#include <libcamera/event_dispatcher.h>\n> >  \n> >  #include \"libcamera/internal/device_enumerator.h\"\n> > -#include \"libcamera/internal/event_dispatcher_poll.h\"\n> >  #include \"libcamera/internal/ipa_manager.h\"\n> >  #include \"libcamera/internal/log.h\"\n> >  #include \"libcamera/internal/pipeline_handler.h\"\n> > @@ -244,12 +242,8 @@ void CameraManager::Private::removeCamera(Camera *camera)\n> >   * a time. Attempting to create a second instance without first deleting the\n> >   * existing instance results in undefined behaviour.\n> >   *\n> > - * The manager is initially stopped, and shall be configured before being\n> > - * started. In particular a custom event dispatcher shall be installed if\n> > - * needed with CameraManager::setEventDispatcher().\n> > - *\n> > - * Once the camera manager is configured, it shall be started with start().\n> > - * This will enumerate all the cameras present in the system, which can then be\n> > + * The manager is initially stopped, and shall be started with start(). This\n> > + * will enumerate all the cameras present in the system, which can then be\n> >   * listed with list() and retrieved with get().\n> >   *\n> >   * Cameras are shared through std::shared_ptr<>, ensuring that a camera will\n> > @@ -477,38 +471,4 @@ void CameraManager::removeCamera(std::shared_ptr<Camera> camera)\n> >   * \\return The libcamera version string\n> >   */\n> >  \n> > -/**\n> > - * \\brief Set the event dispatcher\n> > - * \\param[in] dispatcher Pointer to the event dispatcher\n> > - *\n> > - * libcamera requires an event dispatcher to integrate event notification and\n> > - * timers with the application event loop. Applications that want to provide\n> > - * their own event dispatcher shall call this function once and only once before\n> > - * the camera manager is started with start(). If no event dispatcher is\n> > - * provided, a default poll-based implementation will be used.\n> > - *\n> > - * The CameraManager takes ownership of the event dispatcher and will delete it\n> > - * when the application terminates.\n> > - */\n> > -void CameraManager::setEventDispatcher(std::unique_ptr<EventDispatcher> dispatcher)\n> > -{\n> > -\tthread()->setEventDispatcher(std::move(dispatcher));\n> > -}\n> > -\n> > -/**\n> > - * \\brief Retrieve the event dispatcher\n> > - *\n> > - * This function retrieves the event dispatcher set with setEventDispatcher().\n> > - * If no dispatcher has been set, a default poll-based implementation is created\n> > - * and returned, and no custom event dispatcher may be installed anymore.\n> > - *\n> > - * The returned event dispatcher is valid until the camera manager is destroyed.\n> > - *\n> > - * \\return Pointer to the event dispatcher\n> > - */\n> > -EventDispatcher *CameraManager::eventDispatcher()\n> > -{\n> > -\treturn thread()->eventDispatcher();\n> > -}\n> > -\n> >  } /* namespace libcamera */\n> > diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> > index c6e23a1a7a18..d26fcf10b3c4 100644\n> > --- a/src/libcamera/device_enumerator_udev.cpp\n> > +++ b/src/libcamera/device_enumerator_udev.cpp\n> > @@ -17,8 +17,7 @@\n> >  #include <sys/sysmacros.h>\n> >  #include <unistd.h>\n> >  \n> > -#include <libcamera/event_notifier.h>\n> > -\n> > +#include \"libcamera/internal/event_notifier.h\"\n> >  #include \"libcamera/internal/log.h\"\n> >  #include \"libcamera/internal/media_device.h\"\n> >  \n> > diff --git a/src/libcamera/event_dispatcher.cpp b/src/libcamera/event_dispatcher.cpp\n> > index 90bd5daf0612..e0ce1eb3cc04 100644\n> > --- a/src/libcamera/event_dispatcher.cpp\n> > +++ b/src/libcamera/event_dispatcher.cpp\n> > @@ -5,7 +5,7 @@\n> >   * event_dispatcher.cpp - Event dispatcher\n> >   */\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  \n> >  #include \"libcamera/internal/log.h\"\n> \n> Here and in other places below the grouping of internal headers are \n> broken. In some files (example src/libcamera/timer.cpp) internal headers \n> are included before system headers in this change. Is this intentional \n> or the result of a global sed operation ? :-)\n\nHere it's intentional, as we include the header first in the\ncorresponding .cpp file to ensure through compilation that the header is\nself-contained. Same for event_notifier.h and timer.h. Are there other\nproblematic occurrences ?\n\n> > diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/event_dispatcher_poll.cpp\n> > index 9ab85da7d75d..456c6def075b 100644\n> > --- a/src/libcamera/event_dispatcher_poll.cpp\n> > +++ b/src/libcamera/event_dispatcher_poll.cpp\n> > @@ -16,11 +16,10 @@\n> >  #include <sys/eventfd.h>\n> >  #include <unistd.h>\n> >  \n> > -#include <libcamera/event_notifier.h>\n> > -#include <libcamera/timer.h>\n> > -\n> > +#include \"libcamera/internal/event_notifier.h\"\n> >  #include \"libcamera/internal/log.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  #include \"libcamera/internal/utils.h\"\n> >  \n> >  /**\n> > diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/event_notifier.cpp\n> > index 21c07faf0963..6b0575c0db77 100644\n> > --- a/src/libcamera/event_notifier.cpp\n> > +++ b/src/libcamera/event_notifier.cpp\n> > @@ -5,11 +5,11 @@\n> >   * event_notifier.cpp - File descriptor event notifier\n> >   */\n> >  \n> > -#include <libcamera/event_notifier.h>\n> > +#include \"libcamera/internal/event_notifier.h\"\n> >  \n> >  #include <libcamera/camera_manager.h>\n> > -#include <libcamera/event_dispatcher.h>\n> >  \n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/message.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> >  \n> > diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> > index 5c8cce16200e..fdb359f7fcd1 100644\n> > --- a/src/libcamera/ipc_unixsocket.cpp\n> > +++ b/src/libcamera/ipc_unixsocket.cpp\n> > @@ -12,8 +12,7 @@\n> >  #include <sys/socket.h>\n> >  #include <unistd.h>\n> >  \n> > -#include <libcamera/event_notifier.h>\n> > -\n> > +#include \"libcamera/internal/event_notifier.h\"\n> >  #include \"libcamera/internal/log.h\"\n> >  \n> >  /**\n> > diff --git a/src/libcamera/pipeline/rkisp1/timeline.h b/src/libcamera/pipeline/rkisp1/timeline.h\n> > index 0c37b06fa6df..35a085159b8f 100644\n> > --- a/src/libcamera/pipeline/rkisp1/timeline.h\n> > +++ b/src/libcamera/pipeline/rkisp1/timeline.h\n> > @@ -10,8 +10,7 @@\n> >  #include <list>\n> >  #include <map>\n> >  \n> > -#include <libcamera/timer.h>\n> > -\n> > +#include \"libcamera/internal/timer.h\"\n> >  #include \"libcamera/internal/utils.h\"\n> >  \n> >  namespace libcamera {\n> > diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> > index 72b5afe2f9c0..40a434a6b0c2 100644\n> > --- a/src/libcamera/process.cpp\n> > +++ b/src/libcamera/process.cpp\n> > @@ -20,8 +20,7 @@\n> >  #include <unistd.h>\n> >  #include <vector>\n> >  \n> > -#include <libcamera/event_notifier.h>\n> > -\n> > +#include \"libcamera/internal/event_notifier.h\"\n> >  #include \"libcamera/internal/log.h\"\n> >  #include \"libcamera/internal/utils.h\"\n> >  \n> > diff --git a/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp b/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> > index 0c4687f737a3..bdbac988e057 100644\n> > --- a/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> > +++ b/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp\n> > @@ -9,10 +9,10 @@\n> >  #include <sys/types.h>\n> >  #include <unistd.h>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> >  #include <libcamera/ipa/ipa_interface.h>\n> >  #include <libcamera/logging.h>\n> >  \n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/ipa_module.h\"\n> >  #include \"libcamera/internal/ipc_unixsocket.h\"\n> >  #include \"libcamera/internal/log.h\"\n> > diff --git a/src/libcamera/thread.cpp b/src/libcamera/thread.cpp\n> > index b5d7103ad341..f339dab165b6 100644\n> > --- a/src/libcamera/thread.cpp\n> > +++ b/src/libcamera/thread.cpp\n> > @@ -14,8 +14,7 @@\n> >  #include <sys/types.h>\n> >  #include <unistd.h>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> > -\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/event_dispatcher_poll.h\"\n> >  #include \"libcamera/internal/log.h\"\n> >  #include \"libcamera/internal/message.h\"\n> > diff --git a/src/libcamera/timer.cpp b/src/libcamera/timer.cpp\n> > index 24e452eda49e..c242113a782e 100644\n> > --- a/src/libcamera/timer.cpp\n> > +++ b/src/libcamera/timer.cpp\n> > @@ -5,13 +5,13 @@\n> >   * timer.cpp - Generic timer\n> >   */\n> >  \n> > -#include <libcamera/timer.h>\n> > +#include \"libcamera/internal/timer.h\"\n> >  \n> >  #include <chrono>\n> >  \n> >  #include <libcamera/camera_manager.h>\n> > -#include <libcamera/event_dispatcher.h>\n> >  \n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/log.h\"\n> >  #include \"libcamera/internal/message.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> > index fd0b140f8ce7..decd19ef5281 100644\n> > --- a/src/libcamera/v4l2_device.cpp\n> > +++ b/src/libcamera/v4l2_device.cpp\n> > @@ -16,8 +16,7 @@\n> >  #include <sys/syscall.h>\n> >  #include <unistd.h>\n> >  \n> > -#include <libcamera/event_notifier.h>\n> > -\n> > +#include \"libcamera/internal/event_notifier.h\"\n> >  #include \"libcamera/internal/log.h\"\n> >  #include \"libcamera/internal/sysfs.h\"\n> >  #include \"libcamera/internal/utils.h\"\n> > diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> > index 5ee1b479b513..e76fe2dd1f3a 100644\n> > --- a/src/libcamera/v4l2_videodevice.cpp\n> > +++ b/src/libcamera/v4l2_videodevice.cpp\n> > @@ -20,9 +20,9 @@\n> >  \n> >  #include <linux/version.h>\n> >  \n> > -#include <libcamera/event_notifier.h>\n> >  #include <libcamera/file_descriptor.h>\n> >  \n> > +#include \"libcamera/internal/event_notifier.h\"\n> >  #include \"libcamera/internal/log.h\"\n> >  #include \"libcamera/internal/media_device.h\"\n> >  #include \"libcamera/internal/media_object.h\"\n> > diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp\n> > index ccf532d7b7fc..7ff628269c47 100644\n> > --- a/test/camera/buffer_import.cpp\n> > +++ b/test/camera/buffer_import.cpp\n> > @@ -12,12 +12,11 @@\n> >  #include <numeric>\n> >  #include <vector>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/timer.h>\n> > -\n> >  #include \"libcamera/internal/device_enumerator.h\"\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/media_device.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  #include \"libcamera/internal/v4l2_videodevice.h\"\n> >  \n> >  #include \"buffer_source.h\"\n> > diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp\n> > index fd5292b7c8c9..ec978068c977 100644\n> > --- a/test/camera/capture.cpp\n> > +++ b/test/camera/capture.cpp\n> > @@ -7,9 +7,10 @@\n> >  \n> >  #include <iostream>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> >  #include <libcamera/framebuffer_allocator.h>\n> > -#include <libcamera/timer.h>\n> > +\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  \n> >  #include \"libcamera/internal/thread.h\"\n> >  \n> > diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp\n> > index 1b61778699ed..8ae05ac62985 100644\n> > --- a/test/event-dispatcher.cpp\n> > +++ b/test/event-dispatcher.cpp\n> > @@ -10,10 +10,9 @@\n> >  #include <signal.h>\n> >  #include <sys/time.h>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/timer.h>\n> > -\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  \n> >  #include \"test.h\"\n> >  \n> > diff --git a/test/event-thread.cpp b/test/event-thread.cpp\n> > index c90e6ac04dd3..aeb8b3bf4bac 100644\n> > --- a/test/event-thread.cpp\n> > +++ b/test/event-thread.cpp\n> > @@ -10,10 +10,9 @@\n> >  #include <string.h>\n> >  #include <unistd.h>\n> >  \n> > -#include <libcamera/event_notifier.h>\n> > -#include <libcamera/timer.h>\n> > -\n> > +#include \"libcamera/internal/event_notifier.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  \n> >  #include \"test.h\"\n> >  \n> > diff --git a/test/event.cpp b/test/event.cpp\n> > index c865092c7a8a..1f16c97bbab5 100644\n> > --- a/test/event.cpp\n> > +++ b/test/event.cpp\n> > @@ -9,11 +9,10 @@\n> >  #include <string.h>\n> >  #include <unistd.h>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/event_notifier.h>\n> > -#include <libcamera/timer.h>\n> > -\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> > +#include \"libcamera/internal/event_notifier.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  \n> >  #include \"test.h\"\n> >  \n> > diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp\n> > index 7d551eeb900d..94cb859352ec 100644\n> > --- a/test/hotplug-cameras.cpp\n> > +++ b/test/hotplug-cameras.cpp\n> > @@ -13,11 +13,11 @@\n> >  \n> >  #include <libcamera/camera.h>\n> >  #include <libcamera/camera_manager.h>\n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/timer.h>\n> >  \n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/file.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  \n> >  #include \"test.h\"\n> >  \n> > diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\n> > index 67488409e7ff..9f575f9350ec 100644\n> > --- a/test/ipa/ipa_interface_test.cpp\n> > +++ b/test/ipa/ipa_interface_test.cpp\n> > @@ -12,16 +12,16 @@\n> >  #include <sys/types.h>\n> >  #include <unistd.h>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/event_notifier.h>\n> >  #include <libcamera/ipa/vimc.h>\n> > -#include <libcamera/timer.h>\n> >  \n> >  #include \"libcamera/internal/device_enumerator.h\"\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> > +#include \"libcamera/internal/event_notifier.h\"\n> >  #include \"libcamera/internal/ipa_manager.h\"\n> >  #include \"libcamera/internal/ipa_module.h\"\n> >  #include \"libcamera/internal/pipeline_handler.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  \n> >  #include \"test.h\"\n> >  \n> > diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp\n> > index 9cd07ce8d415..19a1d7dd8a2d 100644\n> > --- a/test/ipc/unixsocket.cpp\n> > +++ b/test/ipc/unixsocket.cpp\n> > @@ -15,11 +15,10 @@\n> >  #include <sys/wait.h>\n> >  #include <unistd.h>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/timer.h>\n> > -\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/ipc_unixsocket.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  #include \"libcamera/internal/utils.h\"\n> >  \n> >  #include \"test.h\"\n> > diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> > index 2a82622236b4..c0a1a012d366 100644\n> > --- a/test/log/log_process.cpp\n> > +++ b/test/log/log_process.cpp\n> > @@ -14,13 +14,13 @@\n> >  #include <unistd.h>\n> >  #include <vector>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> >  #include <libcamera/logging.h>\n> > -#include <libcamera/timer.h>\n> >  \n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/log.h\"\n> >  #include \"libcamera/internal/process.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  #include \"libcamera/internal/utils.h\"\n> >  \n> >  #include \"test.h\"\n> > diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp\n> > index f3fd23283239..a6f816f395eb 100644\n> > --- a/test/object-invoke.cpp\n> > +++ b/test/object-invoke.cpp\n> > @@ -8,9 +8,9 @@\n> >  #include <iostream>\n> >  #include <thread>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> >  #include <libcamera/object.h>\n> >  \n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> >  \n> >  #include \"test.h\"\n> > diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> > index a3eaef80b2a2..1279d8c17598 100644\n> > --- a/test/process/process_test.cpp\n> > +++ b/test/process/process_test.cpp\n> > @@ -9,11 +9,10 @@\n> >  #include <unistd.h>\n> >  #include <vector>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/timer.h>\n> > -\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/process.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  #include \"libcamera/internal/utils.h\"\n> >  \n> >  #include \"test.h\"\n> > diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp\n> > index f794d8e7dd4e..be29eee1bdb6 100644\n> > --- a/test/timer-thread.cpp\n> > +++ b/test/timer-thread.cpp\n> > @@ -8,10 +8,9 @@\n> >  #include <chrono>\n> >  #include <iostream>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/timer.h>\n> > -\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  \n> >  #include \"test.h\"\n> >  \n> > diff --git a/test/timer.cpp b/test/timer.cpp\n> > index 537489d736ad..fc90b11040d8 100644\n> > --- a/test/timer.cpp\n> > +++ b/test/timer.cpp\n> > @@ -8,10 +8,9 @@\n> >  #include <chrono>\n> >  #include <iostream>\n> >  \n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/timer.h>\n> > -\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  \n> >  #include \"test.h\"\n> >  \n> > diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp\n> > index 5e7e2d97f011..c75259be0d10 100644\n> > --- a/test/v4l2_videodevice/buffer_sharing.cpp\n> > +++ b/test/v4l2_videodevice/buffer_sharing.cpp\n> > @@ -13,10 +13,10 @@\n> >  #include <iostream>\n> >  \n> >  #include <libcamera/buffer.h>\n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/timer.h>\n> >  \n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  \n> >  #include \"v4l2_videodevice_test.h\"\n> >  \n> > diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp\n> > index 2b38102e9cad..accdb34a699c 100644\n> > --- a/test/v4l2_videodevice/capture_async.cpp\n> > +++ b/test/v4l2_videodevice/capture_async.cpp\n> > @@ -8,10 +8,10 @@\n> >  #include <iostream>\n> >  \n> >  #include <libcamera/buffer.h>\n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/timer.h>\n> >  \n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  \n> >  #include \"v4l2_videodevice_test.h\"\n> >  \n> > diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> > index 616261e11c71..e0f068082c01 100644\n> > --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> > +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp\n> > @@ -8,12 +8,12 @@\n> >  #include <iostream>\n> >  \n> >  #include <libcamera/buffer.h>\n> > -#include <libcamera/event_dispatcher.h>\n> > -#include <libcamera/timer.h>\n> >  \n> >  #include \"libcamera/internal/device_enumerator.h\"\n> > +#include \"libcamera/internal/event_dispatcher.h\"\n> >  #include \"libcamera/internal/media_device.h\"\n> >  #include \"libcamera/internal/thread.h\"\n> > +#include \"libcamera/internal/timer.h\"\n> >  #include \"libcamera/internal/v4l2_videodevice.h\"\n> >  \n> >  #include \"test.h\"","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BAC4CBE082\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Nov 2020 10:36:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8492D631BD;\n\tFri, 13 Nov 2020 11:36:44 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2C0E5631B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Nov 2020 11:36:43 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B123931A;\n\tFri, 13 Nov 2020 11:36:42 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"XiuEi5Gm\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1605263802;\n\tbh=EluNS6CzBGWpi+X57whxwKLITzya2n8VL8mMNybhy/8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=XiuEi5Gm+kT46f0LI+GW7B9rXa/z2RYp49K3rf3HMO1+TOx9+MqueH6mZMf3IXVAJ\n\tt0PVbdNDL6n0d5MAZghE5IXDNvTCHRc5e4lv7khxVIkvEq/bpYVPioq8Uxy2940NoK\n\t8ZsQt2W7lLHTwLrZysaXE8aDBaVcYqCtJpza9uYk=","Date":"Fri, 13 Nov 2020 12:36:38 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20201113103638.GJ7524@pendragon.ideasonboard.com>","References":"<20201113063815.10288-1-laurent.pinchart@ideasonboard.com>\n\t<20201113063815.10288-4-laurent.pinchart@ideasonboard.com>\n\t<20201113103203.GG1603296@oden.dyn.berto.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201113103203.GG1603296@oden.dyn.berto.se>","Subject":"Re: [libcamera-devel] [PATCH v1 3/5] libcamera: Move\n\tEventDispatcher to internal API","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]