similarity index 100%
rename from include/libcamera/file_descriptor.h
rename to include/libcamera/base/file_descriptor.h
@@ -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',
@@ -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;
@@ -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 {
@@ -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',
@@ -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>
similarity index 99%
rename from src/libcamera/file_descriptor.cpp
rename to 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
*/
@@ -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',
@@ -14,7 +14,6 @@ libcamera_sources = files([
'delayed_controls.cpp',
'device_enumerator.cpp',
'device_enumerator_sysfs.cpp',
- 'file_descriptor.cpp',
'formats.cpp',
'framebuffer.cpp',
'framebuffer_allocator.cpp',
@@ -7,7 +7,7 @@
#pragma once
-#include <libcamera/file_descriptor.h>
+#include <libcamera/base/file_descriptor.h>
namespace libcamera {
@@ -12,9 +12,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>
@@ -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"
@@ -11,10 +11,10 @@
#include <mutex>
#include <utility>
+#include <libcamera/base/file_descriptor.h>
#include <libcamera/base/semaphore.h>
#include <libcamera/camera.h>
-#include <libcamera/file_descriptor.h>
#include <libcamera/framebuffer.h>
#include <libcamera/framebuffer_allocator.h>
@@ -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"