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