summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-06-25 02:06:55 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-06-25 16:11:10 +0100
commitf9ee72430735f749fb7d8fd4a8fe01ca88dc1f88 (patch)
tree3de5662a1ad584c4e69449fe8b00cdfedae8399c
parentb304bc013ef8022131ef0a146f20c6bad7ac45d5 (diff)
libcamera/base: Move event_notifier to base
Move the event notifier, and associated header updates. Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--include/libcamera/base/event_notifier.h (renamed from include/libcamera/internal/event_notifier.h)6
-rw-r--r--include/libcamera/base/meson.build1
-rw-r--r--include/libcamera/internal/meson.build1
-rw-r--r--src/libcamera/base/event_dispatcher_poll.cpp3
-rw-r--r--src/libcamera/base/event_notifier.cpp (renamed from src/libcamera/event_notifier.cpp)6
-rw-r--r--src/libcamera/base/meson.build1
-rw-r--r--src/libcamera/device_enumerator_udev.cpp2
-rw-r--r--src/libcamera/ipc_unixsocket.cpp3
-rw-r--r--src/libcamera/meson.build1
-rw-r--r--src/libcamera/process.cpp3
-rw-r--r--src/libcamera/v4l2_device.cpp2
-rw-r--r--src/libcamera/v4l2_videodevice.cpp2
-rw-r--r--test/event-thread.cpp3
-rw-r--r--test/event.cpp3
-rw-r--r--test/ipa/ipa_interface_test.cpp2
15 files changed, 17 insertions, 22 deletions
diff --git a/include/libcamera/internal/event_notifier.h b/include/libcamera/base/event_notifier.h
index 8a6419f2..5aa2784a 100644
--- a/include/libcamera/internal/event_notifier.h
+++ b/include/libcamera/base/event_notifier.h
@@ -4,8 +4,8 @@
*
* event_notifier.h - File descriptor event notifier
*/
-#ifndef __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
-#define __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__
+#ifndef __LIBCAMERA_BASE_EVENT_NOTIFIER_H__
+#define __LIBCAMERA_BASE_EVENT_NOTIFIER_H__
#include <libcamera/base/object.h>
#include <libcamera/base/signal.h>
@@ -45,4 +45,4 @@ private:
} /* namespace libcamera */
-#endif /* __LIBCAMERA_INTERNAL_EVENT_NOTIFIER_H__ */
+#endif /* __LIBCAMERA_BASE_EVENT_NOTIFIER_H__ */
diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
index 6fc6c138..83c664af 100644
--- a/include/libcamera/base/meson.build
+++ b/include/libcamera/base/meson.build
@@ -7,6 +7,7 @@ libcamera_base_headers = files([
'class.h',
'event_dispatcher.h',
'event_dispatcher_poll.h',
+ 'event_notifier.h',
'file.h',
'log.h',
'message.h',
diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build
index 60e9775b..16a76ebd 100644
--- a/include/libcamera/internal/meson.build
+++ b/include/libcamera/internal/meson.build
@@ -22,7 +22,6 @@ libcamera_internal_headers = files([
'device_enumerator.h',
'device_enumerator_sysfs.h',
'device_enumerator_udev.h',
- 'event_notifier.h',
'formats.h',
'ipa_manager.h',
'ipa_module.h',
diff --git a/src/libcamera/base/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp
index d76ca7fc..5839373a 100644
--- a/src/libcamera/base/event_dispatcher_poll.cpp
+++ b/src/libcamera/base/event_dispatcher_poll.cpp
@@ -16,13 +16,12 @@
#include <sys/eventfd.h>
#include <unistd.h>
+#include <libcamera/base/event_notifier.h>
#include <libcamera/base/log.h>
#include <libcamera/base/thread.h>
#include <libcamera/base/timer.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/event_notifier.h"
-
/**
* \file base/event_dispatcher_poll.h
*/
diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/base/event_notifier.cpp
index 784016a9..fd93c087 100644
--- a/src/libcamera/event_notifier.cpp
+++ b/src/libcamera/base/event_notifier.cpp
@@ -5,14 +5,14 @@
* event_notifier.cpp - File descriptor event notifier
*/
-#include "libcamera/internal/event_notifier.h"
-
-#include <libcamera/camera_manager.h>
+#include <libcamera/base/event_notifier.h>
#include <libcamera/base/event_dispatcher.h>
#include <libcamera/base/message.h>
#include <libcamera/base/thread.h>
+#include <libcamera/camera_manager.h>
+
/**
* \file event_notifier.h
* \brief File descriptor event notifier
diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
index fb8ed79a..a8b04cfc 100644
--- a/src/libcamera/base/meson.build
+++ b/src/libcamera/base/meson.build
@@ -5,6 +5,7 @@ libcamera_base_sources = files([
'bound_method.cpp',
'event_dispatcher.cpp',
'event_dispatcher_poll.cpp',
+ 'event_notifier.cpp',
'file.cpp',
'log.cpp',
'message.cpp',
diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp
index 4b842773..37a2c5aa 100644
--- a/src/libcamera/device_enumerator_udev.cpp
+++ b/src/libcamera/device_enumerator_udev.cpp
@@ -17,9 +17,9 @@
#include <sys/sysmacros.h>
#include <unistd.h>
+#include <libcamera/base/event_notifier.h>
#include <libcamera/base/log.h>
-#include "libcamera/internal/event_notifier.h"
#include "libcamera/internal/media_device.h"
namespace libcamera {
diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp
index 14665970..f23eb783 100644
--- a/src/libcamera/ipc_unixsocket.cpp
+++ b/src/libcamera/ipc_unixsocket.cpp
@@ -12,10 +12,9 @@
#include <sys/socket.h>
#include <unistd.h>
+#include <libcamera/base/event_notifier.h>
#include <libcamera/base/log.h>
-#include "libcamera/internal/event_notifier.h"
-
/**
* \file ipc_unixsocket.h
* \brief IPC mechanism based on Unix sockets
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index 36f6ddd7..e0c47352 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -15,7 +15,6 @@ libcamera_sources = files([
'delayed_controls.cpp',
'device_enumerator.cpp',
'device_enumerator_sysfs.cpp',
- 'event_notifier.cpp',
'file_descriptor.cpp',
'formats.cpp',
'framebuffer_allocator.cpp',
diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp
index 46338029..4fe4ad57 100644
--- a/src/libcamera/process.cpp
+++ b/src/libcamera/process.cpp
@@ -20,11 +20,10 @@
#include <unistd.h>
#include <vector>
+#include <libcamera/base/event_notifier.h>
#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/event_notifier.h"
-
/**
* \file process.h
* \brief Process object
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index 334b9b78..98d93a12 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -16,10 +16,10 @@
#include <sys/syscall.h>
#include <unistd.h>
+#include <libcamera/base/event_notifier.h>
#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/event_notifier.h"
#include "libcamera/internal/sysfs.h"
/**
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index dc23510b..3d2d99b4 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -21,11 +21,11 @@
#include <linux/version.h>
+#include <libcamera/base/event_notifier.h>
#include <libcamera/base/log.h>
#include <libcamera/file_descriptor.h>
-#include "libcamera/internal/event_notifier.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/media_object.h"
diff --git a/test/event-thread.cpp b/test/event-thread.cpp
index 05c5d26d..57526166 100644
--- a/test/event-thread.cpp
+++ b/test/event-thread.cpp
@@ -10,11 +10,10 @@
#include <string.h>
#include <unistd.h>
+#include <libcamera/base/event_notifier.h>
#include <libcamera/base/thread.h>
#include <libcamera/base/timer.h>
-#include "libcamera/internal/event_notifier.h"
-
#include "test.h"
using namespace std;
diff --git a/test/event.cpp b/test/event.cpp
index aa79da99..c2274344 100644
--- a/test/event.cpp
+++ b/test/event.cpp
@@ -10,11 +10,10 @@
#include <unistd.h>
#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/event_notifier.h>
#include <libcamera/base/thread.h>
#include <libcamera/base/timer.h>
-#include "libcamera/internal/event_notifier.h"
-
#include "test.h"
using namespace std;
diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp
index 656d8655..ee9f2651 100644
--- a/test/ipa/ipa_interface_test.cpp
+++ b/test/ipa/ipa_interface_test.cpp
@@ -15,11 +15,11 @@
#include <libcamera/ipa/vimc_ipa_proxy.h>
#include <libcamera/base/event_dispatcher.h>
+#include <libcamera/base/event_notifier.h>
#include <libcamera/base/thread.h>
#include <libcamera/base/timer.h>
#include "libcamera/internal/device_enumerator.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"