summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-11-28 05:07:54 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-03 19:20:31 +0200
commit6c6acaa7ea1893b99adbf2becc46238e4a5c78b2 (patch)
tree56c89594833ade5b8018de1e77d0e94f8be24f10
parent6b1e25693402a1db6cde995ae8e1b8bf74b88e17 (diff)
libcamera: Move file_descriptor.h to base/
The FileDescriptor class is a generic helper that matches the criteria for the base library. Move it there. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
-rw-r--r--include/libcamera/base/file_descriptor.h (renamed from include/libcamera/file_descriptor.h)0
-rw-r--r--include/libcamera/base/meson.build1
-rw-r--r--include/libcamera/framebuffer.h3
-rw-r--r--include/libcamera/internal/ipc_pipe.h3
-rw-r--r--include/libcamera/meson.build1
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp2
-rw-r--r--src/libcamera/base/file_descriptor.cpp (renamed from src/libcamera/file_descriptor.cpp)4
-rw-r--r--src/libcamera/base/meson.build1
-rw-r--r--src/libcamera/meson.build1
-rw-r--r--src/libcamera/pipeline/raspberrypi/dma_heaps.h2
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp3
-rw-r--r--src/libcamera/v4l2_videodevice.cpp3
-rw-r--r--src/v4l2/v4l2_camera.h2
-rw-r--r--test/file-descriptor.cpp3
14 files changed, 13 insertions, 16 deletions
diff --git a/include/libcamera/file_descriptor.h b/include/libcamera/base/file_descriptor.h
index 8d764f8b..8d764f8b 100644
--- a/include/libcamera/file_descriptor.h
+++ b/include/libcamera/base/file_descriptor.h
diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build
index 210a54f8..abd4cfc7 100644
--- a/include/libcamera/base/meson.build
+++ b/include/libcamera/base/meson.build
@@ -11,6 +11,7 @@ libcamera_base_headers = files([
'event_dispatcher_poll.h',
'event_notifier.h',
'file.h',
+ 'file_descriptor.h',
'flags.h',
'log.h',
'message.h',
diff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h
index 4e710e33..2fbea9c5 100644
--- a/include/libcamera/framebuffer.h
+++ b/include/libcamera/framebuffer.h
@@ -13,10 +13,9 @@
#include <vector>
#include <libcamera/base/class.h>
+#include <libcamera/base/file_descriptor.h>
#include <libcamera/base/span.h>
-#include <libcamera/file_descriptor.h>
-
namespace libcamera {
class Request;
diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h
index bd8824f2..986f8d88 100644
--- a/include/libcamera/internal/ipc_pipe.h
+++ b/include/libcamera/internal/ipc_pipe.h
@@ -9,10 +9,9 @@
#include <vector>
+#include <libcamera/base/file_descriptor.h>
#include <libcamera/base/signal.h>
-#include <libcamera/file_descriptor.h>
-
#include "libcamera/internal/ipc_unixsocket.h"
namespace libcamera {
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index a8cca2a8..5f42977c 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -6,7 +6,6 @@ libcamera_public_headers = files([
'camera.h',
'camera_manager.h',
'controls.h',
- 'file_descriptor.h',
'framebuffer.h',
'framebuffer_allocator.h',
'geometry.h',
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index fed82e22..c6aec090 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -15,12 +15,12 @@
#include <linux/bcm2835-isp.h>
+#include <libcamera/base/file_descriptor.h>
#include <libcamera/base/log.h>
#include <libcamera/base/span.h>
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
-#include <libcamera/file_descriptor.h>
#include <libcamera/framebuffer.h>
#include <libcamera/ipa/ipa_interface.h>
#include <libcamera/ipa/ipa_module_info.h>
diff --git a/src/libcamera/file_descriptor.cpp b/src/libcamera/base/file_descriptor.cpp
index 0409c3e1..f5f87c56 100644
--- a/src/libcamera/file_descriptor.cpp
+++ b/src/libcamera/base/file_descriptor.cpp
@@ -5,7 +5,7 @@
* file_descriptor.cpp - File descriptor wrapper
*/
-#include <libcamera/file_descriptor.h>
+#include <libcamera/base/file_descriptor.h>
#include <string.h>
#include <sys/stat.h>
@@ -16,7 +16,7 @@
#include <libcamera/base/log.h>
/**
- * \file file_descriptor.h
+ * \file base/file_descriptor.h
* \brief File descriptor wrapper
*/
diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
index b93b8505..55692015 100644
--- a/src/libcamera/base/meson.build
+++ b/src/libcamera/base/meson.build
@@ -8,6 +8,7 @@ libcamera_base_sources = files([
'event_dispatcher_poll.cpp',
'event_notifier.cpp',
'file.cpp',
+ 'file_descriptor.cpp',
'flags.cpp',
'log.cpp',
'message.cpp',
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index a0e3c689..2e54cc04 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',
- 'file_descriptor.cpp',
'formats.cpp',
'framebuffer.cpp',
'framebuffer_allocator.cpp',
diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/raspberrypi/dma_heaps.h
index 38dfc242..57beaeb2 100644
--- a/src/libcamera/pipeline/raspberrypi/dma_heaps.h
+++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.h
@@ -7,7 +7,7 @@
#pragma once
-#include <libcamera/file_descriptor.h>
+#include <libcamera/base/file_descriptor.h>
namespace libcamera {
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 7f387626..f4ddcc04 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -13,9 +13,10 @@
#include <queue>
#include <unordered_set>
+#include <libcamera/base/file_descriptor.h>
+
#include <libcamera/camera.h>
#include <libcamera/control_ids.h>
-#include <libcamera/file_descriptor.h>
#include <libcamera/formats.h>
#include <libcamera/ipa/raspberrypi.h>
#include <libcamera/ipa/raspberrypi_ipa_interface.h>
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 4f04212d..0a85bcf6 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -22,11 +22,10 @@
#include <linux/version.h>
#include <libcamera/base/event_notifier.h>
+#include <libcamera/base/file_descriptor.h>
#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
-#include <libcamera/file_descriptor.h>
-
#include "libcamera/internal/formats.h"
#include "libcamera/internal/framebuffer.h"
#include "libcamera/internal/media_device.h"
diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
index 9307d61d..47d2259c 100644
--- a/src/v4l2/v4l2_camera.h
+++ b/src/v4l2/v4l2_camera.h
@@ -10,11 +10,11 @@
#include <deque>
#include <utility>
+#include <libcamera/base/file_descriptor.h>
#include <libcamera/base/mutex.h>
#include <libcamera/base/semaphore.h>
#include <libcamera/camera.h>
-#include <libcamera/file_descriptor.h>
#include <libcamera/framebuffer.h>
#include <libcamera/framebuffer_allocator.h>
diff --git a/test/file-descriptor.cpp b/test/file-descriptor.cpp
index 85b077a2..76badc4c 100644
--- a/test/file-descriptor.cpp
+++ b/test/file-descriptor.cpp
@@ -11,8 +11,7 @@
#include <sys/types.h>
#include <unistd.h>
-#include <libcamera/file_descriptor.h>
-
+#include <libcamera/base/file_descriptor.h>
#include <libcamera/base/utils.h>
#include "test.h"