From 27aff949fbc1b9aabfc594bbfd6f94be55a086ec Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Tue, 15 Jun 2021 16:15:12 +0100 Subject: libcamera/base: Move extended base functionality Move the functionality for the following components to the new base support library: - BoundMethod - EventDispatcher - EventDispatcherPoll - Log - Message - Object - Signal - Semaphore - Thread - Timer While it would be preferable to see these split to move one component per commit, these components are all interdependent upon each other, which leaves us with one big change performing the move for all of them. Reviewed-by: Hirokazu Honda Reviewed-by: Paul Elder Signed-off-by: Kieran Bingham --- test/camera/buffer_import.cpp | 7 ++++--- test/camera/capture.cpp | 6 +++--- test/event-dispatcher.cpp | 6 +++--- test/event-thread.cpp | 5 +++-- test/event.cpp | 7 ++++--- test/hotplug-cameras.cpp | 7 ++++--- test/ipa/ipa_interface_test.cpp | 7 ++++--- test/ipc/unixsocket.cpp | 7 ++++--- test/ipc/unixsocket_ipc.cpp | 7 +++---- test/log/log_api.cpp | 4 ++-- test/log/log_process.cpp | 8 ++++---- test/message.cpp | 4 ++-- test/object-delete.cpp | 5 ++--- test/object-invoke.cpp | 7 +++---- test/object.cpp | 7 +++---- test/process/process_test.cpp | 7 ++++--- test/serialization/ipa_data_serializer_test.cpp | 5 +++-- test/signal-threads.cpp | 5 ++--- test/signal.cpp | 4 ++-- test/threads.cpp | 2 +- test/timer-thread.cpp | 6 +++--- test/timer.cpp | 6 +++--- test/v4l2_videodevice/buffer_sharing.cpp | 6 +++--- test/v4l2_videodevice/capture_async.cpp | 6 +++--- test/v4l2_videodevice/v4l2_m2mdevice.cpp | 7 ++++--- 25 files changed, 76 insertions(+), 72 deletions(-) (limited to 'test') diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp index 61f4eb92..c504ea09 100644 --- a/test/camera/buffer_import.cpp +++ b/test/camera/buffer_import.cpp @@ -12,11 +12,12 @@ #include #include +#include +#include +#include + #include "libcamera/internal/device_enumerator.h" -#include "libcamera/internal/event_dispatcher.h" #include "libcamera/internal/media_device.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" #include "libcamera/internal/v4l2_videodevice.h" #include "buffer_source.h" diff --git a/test/camera/capture.cpp b/test/camera/capture.cpp index c4bc2110..238d98db 100644 --- a/test/camera/capture.cpp +++ b/test/camera/capture.cpp @@ -9,9 +9,9 @@ #include -#include "libcamera/internal/event_dispatcher.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" +#include +#include +#include #include "camera_test.h" #include "test.h" diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp index 8ae05ac6..1cc17b04 100644 --- a/test/event-dispatcher.cpp +++ b/test/event-dispatcher.cpp @@ -10,9 +10,9 @@ #include #include -#include "libcamera/internal/event_dispatcher.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" +#include +#include +#include #include "test.h" diff --git a/test/event-thread.cpp b/test/event-thread.cpp index aeb8b3bf..05c5d26d 100644 --- a/test/event-thread.cpp +++ b/test/event-thread.cpp @@ -10,9 +10,10 @@ #include #include +#include +#include + #include "libcamera/internal/event_notifier.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" #include "test.h" diff --git a/test/event.cpp b/test/event.cpp index 1f16c97b..aa79da99 100644 --- a/test/event.cpp +++ b/test/event.cpp @@ -9,10 +9,11 @@ #include #include -#include "libcamera/internal/event_dispatcher.h" +#include +#include +#include + #include "libcamera/internal/event_notifier.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" #include "test.h" diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp index 94cb8593..bb160537 100644 --- a/test/hotplug-cameras.cpp +++ b/test/hotplug-cameras.cpp @@ -14,10 +14,11 @@ #include #include -#include "libcamera/internal/event_dispatcher.h" +#include +#include +#include + #include "libcamera/internal/file.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" #include "test.h" diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp index d6ca6f51..656d8655 100644 --- a/test/ipa/ipa_interface_test.cpp +++ b/test/ipa/ipa_interface_test.cpp @@ -14,15 +14,16 @@ #include +#include +#include +#include + #include "libcamera/internal/device_enumerator.h" -#include "libcamera/internal/event_dispatcher.h" #include "libcamera/internal/event_notifier.h" #include "libcamera/internal/ipa_manager.h" #include "libcamera/internal/ipa_module.h" #include "libcamera/internal/pipeline_handler.h" #include "libcamera/internal/process.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" #include "test.h" diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp index 80157b34..aa35c8f0 100644 --- a/test/ipc/unixsocket.cpp +++ b/test/ipc/unixsocket.cpp @@ -16,10 +16,11 @@ #include #include -#include "libcamera/internal/event_dispatcher.h" +#include +#include +#include + #include "libcamera/internal/ipc_unixsocket.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" #include "test.h" diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp index 161d09b9..6fe7fd9b 100644 --- a/test/ipc/unixsocket_ipc.cpp +++ b/test/ipc/unixsocket_ipc.cpp @@ -15,19 +15,18 @@ #include #include +#include +#include +#include #include -#include "libcamera/internal/event_dispatcher.h" #include "libcamera/internal/ipa_data_serializer.h" #include "libcamera/internal/ipc_pipe.h" #include "libcamera/internal/ipc_pipe_unixsocket.h" #include "libcamera/internal/process.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" #include "test.h" - using namespace std; using namespace libcamera; diff --git a/test/log/log_api.cpp b/test/log/log_api.cpp index ae3c607a..53118960 100644 --- a/test/log/log_api.cpp +++ b/test/log/log_api.cpp @@ -16,9 +16,9 @@ #include #include -#include +#include -#include "libcamera/internal/log.h" +#include #include "test.h" diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index 413d9207..d138aa7f 100644 --- a/test/log/log_process.cpp +++ b/test/log/log_process.cpp @@ -16,13 +16,13 @@ #include +#include +#include +#include +#include #include -#include "libcamera/internal/event_dispatcher.h" -#include "libcamera/internal/log.h" #include "libcamera/internal/process.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" #include "test.h" diff --git a/test/message.cpp b/test/message.cpp index 9553ba8c..eeea57fe 100644 --- a/test/message.cpp +++ b/test/message.cpp @@ -9,8 +9,8 @@ #include #include -#include "libcamera/internal/message.h" -#include "libcamera/internal/thread.h" +#include +#include #include "test.h" diff --git a/test/object-delete.cpp b/test/object-delete.cpp index a1a6f5cc..eabefe93 100644 --- a/test/object-delete.cpp +++ b/test/object-delete.cpp @@ -7,9 +7,8 @@ #include -#include - -#include "libcamera/internal/thread.h" +#include +#include #include "test.h" diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp index a6f816f3..b1c0f473 100644 --- a/test/object-invoke.cpp +++ b/test/object-invoke.cpp @@ -8,10 +8,9 @@ #include #include -#include - -#include "libcamera/internal/event_dispatcher.h" -#include "libcamera/internal/thread.h" +#include +#include +#include #include "test.h" diff --git a/test/object.cpp b/test/object.cpp index 264659b4..cbd0d3ec 100644 --- a/test/object.cpp +++ b/test/object.cpp @@ -7,10 +7,9 @@ #include -#include - -#include "libcamera/internal/message.h" -#include "libcamera/internal/thread.h" +#include +#include +#include #include "test.h" diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp index a5155bae..8f7a1f05 100644 --- a/test/process/process_test.cpp +++ b/test/process/process_test.cpp @@ -9,12 +9,13 @@ #include #include + +#include +#include +#include #include -#include "libcamera/internal/event_dispatcher.h" #include "libcamera/internal/process.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" #include "test.h" diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp index dbbba891..880bcd02 100644 --- a/test/serialization/ipa_data_serializer_test.cpp +++ b/test/serialization/ipa_data_serializer_test.cpp @@ -17,13 +17,14 @@ #include #include +#include +#include + #include "libcamera/internal/device_enumerator.h" #include "libcamera/internal/ipa_data_serializer.h" #include "libcamera/internal/ipa_manager.h" #include "libcamera/internal/ipa_module.h" #include "libcamera/internal/pipeline_handler.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" #include "serialization_test.h" #include "test.h" diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp index 8a96b5d2..d5e2eb66 100644 --- a/test/signal-threads.cpp +++ b/test/signal-threads.cpp @@ -9,11 +9,10 @@ #include #include +#include +#include #include -#include "libcamera/internal/message.h" -#include "libcamera/internal/thread.h" - #include "test.h" using namespace std; diff --git a/test/signal.cpp b/test/signal.cpp index f83ceb05..aceb0278 100644 --- a/test/signal.cpp +++ b/test/signal.cpp @@ -8,8 +8,8 @@ #include #include -#include -#include +#include +#include #include "test.h" diff --git a/test/threads.cpp b/test/threads.cpp index e0c50dc9..d83b5833 100644 --- a/test/threads.cpp +++ b/test/threads.cpp @@ -10,7 +10,7 @@ #include #include -#include "libcamera/internal/thread.h" +#include #include "test.h" diff --git a/test/timer-thread.cpp b/test/timer-thread.cpp index be29eee1..2c14865b 100644 --- a/test/timer-thread.cpp +++ b/test/timer-thread.cpp @@ -8,9 +8,9 @@ #include #include -#include "libcamera/internal/event_dispatcher.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" +#include +#include +#include #include "test.h" diff --git a/test/timer.cpp b/test/timer.cpp index fc90b110..88f226e7 100644 --- a/test/timer.cpp +++ b/test/timer.cpp @@ -8,9 +8,9 @@ #include #include -#include "libcamera/internal/event_dispatcher.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" +#include +#include +#include #include "test.h" diff --git a/test/v4l2_videodevice/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp index c75259be..91b3e4a0 100644 --- a/test/v4l2_videodevice/buffer_sharing.cpp +++ b/test/v4l2_videodevice/buffer_sharing.cpp @@ -14,9 +14,9 @@ #include -#include "libcamera/internal/event_dispatcher.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" +#include +#include +#include #include "v4l2_videodevice_test.h" diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp index accdb34a..f12c8bef 100644 --- a/test/v4l2_videodevice/capture_async.cpp +++ b/test/v4l2_videodevice/capture_async.cpp @@ -9,9 +9,9 @@ #include -#include "libcamera/internal/event_dispatcher.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" +#include +#include +#include #include "v4l2_videodevice_test.h" diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp index e0f06808..fe4b3cc6 100644 --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp @@ -9,11 +9,12 @@ #include +#include +#include +#include + #include "libcamera/internal/device_enumerator.h" -#include "libcamera/internal/event_dispatcher.h" #include "libcamera/internal/media_device.h" -#include "libcamera/internal/thread.h" -#include "libcamera/internal/timer.h" #include "libcamera/internal/v4l2_videodevice.h" #include "test.h" -- cgit v1.2.1