summaryrefslogtreecommitdiff
path: root/src/libcamera
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera')
-rw-r--r--src/libcamera/base/meson.build1
-rw-r--r--src/libcamera/base/utils.cpp (renamed from src/libcamera/utils.cpp)8
-rw-r--r--src/libcamera/camera_manager.cpp3
-rw-r--r--src/libcamera/camera_sensor.cpp3
-rw-r--r--src/libcamera/controls.cpp3
-rw-r--r--src/libcamera/event_dispatcher_poll.cpp3
-rw-r--r--src/libcamera/ipa_manager.cpp3
-rw-r--r--src/libcamera/ipa_module.cpp3
-rw-r--r--src/libcamera/ipa_proxy.cpp3
-rw-r--r--src/libcamera/log.cpp3
-rw-r--r--src/libcamera/meson.build1
-rw-r--r--src/libcamera/object.cpp3
-rw-r--r--src/libcamera/pipeline/ipu3/imgu.cpp3
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp3
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp3
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp3
-rw-r--r--src/libcamera/pipeline/simple/converter.cpp3
-rw-r--r--src/libcamera/pipeline/uvcvideo/uvcvideo.cpp3
-rw-r--r--src/libcamera/pipeline/vimc/vimc.cpp3
-rw-r--r--src/libcamera/pipeline_handler.cpp3
-rw-r--r--src/libcamera/process.cpp3
-rw-r--r--src/libcamera/source_paths.cpp2
-rw-r--r--src/libcamera/stream.cpp3
-rw-r--r--src/libcamera/timer.cpp3
-rw-r--r--src/libcamera/v4l2_device.cpp3
-rw-r--r--src/libcamera/v4l2_subdevice.cpp3
26 files changed, 50 insertions, 28 deletions
diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
index e8384602..6d9ec374 100644
--- a/src/libcamera/base/meson.build
+++ b/src/libcamera/base/meson.build
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: CC0-1.0
libcamera_base_sources = files([
+ 'utils.cpp',
])
libcamera_base_deps = [
diff --git a/src/libcamera/utils.cpp b/src/libcamera/base/utils.cpp
index c7ebef68..45b92b67 100644
--- a/src/libcamera/utils.cpp
+++ b/src/libcamera/base/utils.cpp
@@ -5,7 +5,7 @@
* utils.cpp - Miscellaneous utility functions
*/
-#include "libcamera/internal/utils.h"
+#include <libcamera/base/utils.h>
#include <iomanip>
#include <sstream>
@@ -14,7 +14,7 @@
#include <unistd.h>
/**
- * \file utils.h
+ * \file base/utils.h
* \brief Miscellaneous utility functions
*/
@@ -35,8 +35,8 @@ namespace utils {
*/
const char *basename(const char *path)
{
- const char *base = strrchr(path, '/');
- return base ? base + 1 : path;
+ const char *base = strrchr(path, '/');
+ return base ? base + 1 : path;
}
/**
diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp
index 1ecf2b07..a3784db6 100644
--- a/src/libcamera/camera_manager.cpp
+++ b/src/libcamera/camera_manager.cpp
@@ -12,13 +12,14 @@
#include <libcamera/camera.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/ipa_manager.h"
#include "libcamera/internal/log.h"
#include "libcamera/internal/pipeline_handler.h"
#include "libcamera/internal/process.h"
#include "libcamera/internal/thread.h"
-#include "libcamera/internal/utils.h"
/**
* \file camera_manager.h
diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
index 3e135353..94dcf4f9 100644
--- a/src/libcamera/camera_sensor.cpp
+++ b/src/libcamera/camera_sensor.cpp
@@ -18,11 +18,12 @@
#include <libcamera/property_ids.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/bayer_format.h"
#include "libcamera/internal/camera_sensor_properties.h"
#include "libcamera/internal/formats.h"
#include "libcamera/internal/sysfs.h"
-#include "libcamera/internal/utils.h"
/**
* \file camera_sensor.h
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index 5aef4e71..7df372ad 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -12,9 +12,10 @@
#include <string>
#include <string.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/control_validator.h"
#include "libcamera/internal/log.h"
-#include "libcamera/internal/utils.h"
/**
* \file controls.h
diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/event_dispatcher_poll.cpp
index 456c6def..0b6aee18 100644
--- a/src/libcamera/event_dispatcher_poll.cpp
+++ b/src/libcamera/event_dispatcher_poll.cpp
@@ -16,11 +16,12 @@
#include <sys/eventfd.h>
#include <unistd.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/event_notifier.h"
#include "libcamera/internal/log.h"
#include "libcamera/internal/thread.h"
#include "libcamera/internal/timer.h"
-#include "libcamera/internal/utils.h"
/**
* \file event_dispatcher_poll.h
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
index 93d02d94..263cacd6 100644
--- a/src/libcamera/ipa_manager.cpp
+++ b/src/libcamera/ipa_manager.cpp
@@ -12,12 +12,13 @@
#include <string.h>
#include <sys/types.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/file.h"
#include "libcamera/internal/ipa_module.h"
#include "libcamera/internal/ipa_proxy.h"
#include "libcamera/internal/log.h"
#include "libcamera/internal/pipeline_handler.h"
-#include "libcamera/internal/utils.h"
/**
* \file ipa_manager.h
diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp
index f53e529b..a4e7fb86 100644
--- a/src/libcamera/ipa_module.cpp
+++ b/src/libcamera/ipa_module.cpp
@@ -23,10 +23,11 @@
#include <libcamera/span.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/file.h"
#include "libcamera/internal/log.h"
#include "libcamera/internal/pipeline_handler.h"
-#include "libcamera/internal/utils.h"
/**
* \file ipa_module.h
diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp
index b70fde58..ca980ec7 100644
--- a/src/libcamera/ipa_proxy.cpp
+++ b/src/libcamera/ipa_proxy.cpp
@@ -12,9 +12,10 @@
#include <sys/types.h>
#include <unistd.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/ipa_module.h"
#include "libcamera/internal/log.h"
-#include "libcamera/internal/utils.h"
/**
* \file ipa_proxy.h
diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp
index 74829a56..5ff0e901 100644
--- a/src/libcamera/log.cpp
+++ b/src/libcamera/log.cpp
@@ -23,8 +23,9 @@
#include <libcamera/logging.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/thread.h"
-#include "libcamera/internal/utils.h"
/**
* \file log.h
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index 655c0c16..b70688d8 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -52,7 +52,6 @@ libcamera_sources = files([
'thread.cpp',
'timer.cpp',
'transform.cpp',
- 'utils.cpp',
'v4l2_device.cpp',
'v4l2_pixelformat.cpp',
'v4l2_subdevice.cpp',
diff --git a/src/libcamera/object.cpp b/src/libcamera/object.cpp
index 5e6b73f9..51cac64e 100644
--- a/src/libcamera/object.cpp
+++ b/src/libcamera/object.cpp
@@ -11,11 +11,12 @@
#include <libcamera/signal.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/log.h"
#include "libcamera/internal/message.h"
#include "libcamera/internal/semaphore.h"
#include "libcamera/internal/thread.h"
-#include "libcamera/internal/utils.h"
/**
* \file object.h
diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp
index 4eb3f7b7..32d143a8 100644
--- a/src/libcamera/pipeline/ipu3/imgu.cpp
+++ b/src/libcamera/pipeline/ipu3/imgu.cpp
@@ -16,9 +16,10 @@
#include <libcamera/formats.h>
#include <libcamera/stream.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
-#include "libcamera/internal/utils.h"
namespace libcamera {
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 6c93bc6d..6b43ad2f 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -20,6 +20,8 @@
#include <libcamera/request.h>
#include <libcamera/stream.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/camera_sensor.h"
#include "libcamera/internal/delayed_controls.h"
#include "libcamera/internal/device_enumerator.h"
@@ -27,7 +29,6 @@
#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
-#include "libcamera/internal/utils.h"
#include "cio2.h"
#include "frames.h"
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 4e26a193..082eb1ee 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -24,6 +24,8 @@
#include <libcamera/property_ids.h>
#include <libcamera/request.h>
+#include <libcamera/base/utils.h>
+
#include <linux/bcm2835-isp.h>
#include <linux/videodev2.h>
@@ -35,7 +37,6 @@
#include "libcamera/internal/ipa_manager.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
-#include "libcamera/internal/utils.h"
#include "libcamera/internal/v4l2_videodevice.h"
#include "dma_heaps.h"
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 6699839c..c625d724 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -24,6 +24,8 @@
#include <libcamera/request.h>
#include <libcamera/stream.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/camera_sensor.h"
#include "libcamera/internal/delayed_controls.h"
#include "libcamera/internal/device_enumerator.h"
@@ -31,7 +33,6 @@
#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
-#include "libcamera/internal/utils.h"
#include "libcamera/internal/v4l2_subdevice.h"
#include "libcamera/internal/v4l2_videodevice.h"
diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp
index 68644ef6..589f185b 100644
--- a/src/libcamera/pipeline/simple/converter.cpp
+++ b/src/libcamera/pipeline/simple/converter.cpp
@@ -15,9 +15,10 @@
#include <libcamera/signal.h>
#include <libcamera/stream.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
-#include "libcamera/internal/utils.h"
#include "libcamera/internal/v4l2_videodevice.h"
namespace libcamera {
diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
index 12a85b24..d8c17dcc 100644
--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
@@ -19,12 +19,13 @@
#include <libcamera/request.h>
#include <libcamera/stream.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
#include "libcamera/internal/sysfs.h"
-#include "libcamera/internal/utils.h"
#include "libcamera/internal/v4l2_videodevice.h"
namespace libcamera {
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index 8bbac008..025ca562 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -23,13 +23,14 @@
#include <libcamera/request.h>
#include <libcamera/stream.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/camera_sensor.h"
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/ipa_manager.h"
#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/pipeline_handler.h"
-#include "libcamera/internal/utils.h"
#include "libcamera/internal/v4l2_subdevice.h"
#include "libcamera/internal/v4l2_videodevice.h"
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index e507a8bb..6fb2a743 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -13,11 +13,12 @@
#include <libcamera/camera.h>
#include <libcamera/camera_manager.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/tracepoints.h"
-#include "libcamera/internal/utils.h"
/**
* \file pipeline_handler.h
diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp
index 40a434a6..35091f60 100644
--- a/src/libcamera/process.cpp
+++ b/src/libcamera/process.cpp
@@ -20,9 +20,10 @@
#include <unistd.h>
#include <vector>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/event_notifier.h"
#include "libcamera/internal/log.h"
-#include "libcamera/internal/utils.h"
/**
* \file process.h
diff --git a/src/libcamera/source_paths.cpp b/src/libcamera/source_paths.cpp
index 834b698f..19689585 100644
--- a/src/libcamera/source_paths.cpp
+++ b/src/libcamera/source_paths.cpp
@@ -14,7 +14,7 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include "libcamera/internal/utils.h"
+#include <libcamera/base/utils.h>
/**
* \file source_paths.h
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index f7bafcf8..d5d68427 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -15,8 +15,9 @@
#include <libcamera/request.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/log.h"
-#include "libcamera/internal/utils.h"
/**
* \file stream.h
diff --git a/src/libcamera/timer.cpp b/src/libcamera/timer.cpp
index c242113a..9496671e 100644
--- a/src/libcamera/timer.cpp
+++ b/src/libcamera/timer.cpp
@@ -11,11 +11,12 @@
#include <libcamera/camera_manager.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/event_dispatcher.h"
#include "libcamera/internal/log.h"
#include "libcamera/internal/message.h"
#include "libcamera/internal/thread.h"
-#include "libcamera/internal/utils.h"
/**
* \file timer.h
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index 5660e6ea..facb53e1 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -16,10 +16,11 @@
#include <sys/syscall.h>
#include <unistd.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/event_notifier.h"
#include "libcamera/internal/log.h"
#include "libcamera/internal/sysfs.h"
-#include "libcamera/internal/utils.h"
/**
* \file v4l2_device.h
diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
index 721ff5a9..2c56cfaf 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -19,10 +19,11 @@
#include <libcamera/geometry.h>
+#include <libcamera/base/utils.h>
+
#include "libcamera/internal/log.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/media_object.h"
-#include "libcamera/internal/utils.h"
/**
* \file v4l2_subdevice.h