Patch Detail
Show a patch.
GET /api/1.1/patches/12619/?format=api
{ "id": 12619, "url": "https://patchwork.libcamera.org/api/1.1/patches/12619/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12619/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20210616151152.3856595-4-kieran.bingham@ideasonboard.com>", "date": "2021-06-16T15:11:49", "name": "[libcamera-devel,3/6] libcamera-platform: Move utils to the platform library", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f6e4a2238988e7b4a39f765846eca229d7cb84a4", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/12619/mbox/", "series": [ { "id": 2143, "url": "https://patchwork.libcamera.org/api/1.1/series/2143/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2143", "date": "2021-06-16T15:11:46", "name": "libcamera-platform: Split library functionality", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2143/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12619/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12619/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 697F5C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 16 Jun 2021 15:12:02 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 25DDD68946;\n\tWed, 16 Jun 2021 17:12:02 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1454F68941\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Jun 2021 17:11:58 +0200 (CEST)", "from Monstersaurus.local\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9DBEB3E5;\n\tWed, 16 Jun 2021 17:11:57 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"l9YX/bUL\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1623856317;\n\tbh=KGrUUJpWxPKu3dmS6hhxzfQT1zqbFJquvcciX/jUQNA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=l9YX/bULy8hCFRKsymGGz9NMDyOgNDNP9ay+GEv+zlOK463BOegSPseHq8ZDg6efW\n\tFBXeYAFdwexAgOIEk18m/S0nhdLrxAXB73twNa0ZAE6ry3GtIRUv4lSXow7W91Xf9V\n\tP3rKCfFE+c7d60d+3xl9OK+6Xnxx0IbK+MbgS+Fg=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Date": "Wed, 16 Jun 2021 16:11:49 +0100", "Message-Id": "<20210616151152.3856595-4-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20210616151152.3856595-1-kieran.bingham@ideasonboard.com>", "References": "<20210616151152.3856595-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 3/6] libcamera-platform: Move utils to the\n\tplatform library", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Move the utils functionality to the libcamera-platform library.\n\nPlease note that the build_rpath addition that was previously added to\nthe libcamera.so is now moved to this library to ensure the\nfunctionality of isLibcameraInstalled continues.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/libcamera/internal/log.h | 2 +-\n include/libcamera/internal/meson.build | 1 -\n include/libcamera/internal/thread.h | 3 ++-\n include/libcamera/platform/meson.build | 1 +\n include/libcamera/{internal => platform}/utils.h | 8 ++++----\n src/android/camera_device.cpp | 3 ++-\n src/android/jpeg/exif.cpp | 3 ++-\n src/ipa/raspberrypi/cam_helper.hpp | 3 ++-\n src/ipa/raspberrypi/controller/agc_algorithm.hpp | 3 ++-\n src/ipa/raspberrypi/controller/agc_status.h | 2 +-\n src/ipa/raspberrypi/controller/camera_mode.h | 2 +-\n src/ipa/raspberrypi/controller/device_status.h | 2 +-\n src/ipa/raspberrypi/controller/rpi/agc.hpp | 2 +-\n src/ipa/raspberrypi/controller/rpi/lux.hpp | 2 +-\n src/libcamera-platform/meson.build | 10 ++++++++++\n src/{libcamera => libcamera-platform}/utils.cpp | 8 ++++----\n src/libcamera/camera_manager.cpp | 3 ++-\n src/libcamera/camera_sensor.cpp | 3 ++-\n src/libcamera/controls.cpp | 3 ++-\n src/libcamera/event_dispatcher_poll.cpp | 3 ++-\n src/libcamera/ipa_manager.cpp | 3 ++-\n src/libcamera/ipa_module.cpp | 3 ++-\n src/libcamera/ipa_proxy.cpp | 3 ++-\n src/libcamera/log.cpp | 3 ++-\n src/libcamera/meson.build | 7 -------\n src/libcamera/object.cpp | 3 ++-\n src/libcamera/pipeline/ipu3/imgu.cpp | 3 ++-\n src/libcamera/pipeline/ipu3/ipu3.cpp | 3 ++-\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 3 ++-\n src/libcamera/pipeline/simple/converter.cpp | 3 ++-\n src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 3 ++-\n src/libcamera/pipeline/vimc/vimc.cpp | 3 ++-\n src/libcamera/pipeline_handler.cpp | 3 ++-\n src/libcamera/process.cpp | 3 ++-\n src/libcamera/stream.cpp | 3 ++-\n src/libcamera/timer.cpp | 3 ++-\n src/libcamera/v4l2_device.cpp | 3 ++-\n src/libcamera/v4l2_subdevice.cpp | 3 ++-\n src/v4l2/v4l2_camera_proxy.cpp | 3 ++-\n src/v4l2/v4l2_compat_manager.cpp | 3 ++-\n test/camera-sensor.cpp | 3 ++-\n test/file-descriptor.cpp | 2 +-\n test/ipc/unixsocket_ipc.cpp | 3 ++-\n test/log/log_process.cpp | 3 ++-\n test/pixel-format.cpp | 2 +-\n test/process/process_test.cpp | 3 ++-\n test/signal-threads.cpp | 3 ++-\n test/utils.cpp | 2 +-\n test/v4l2_subdevice/list_formats.cpp | 3 ++-\n test/v4l2_videodevice/formats.cpp | 3 ++-\n 51 files changed, 100 insertions(+), 61 deletions(-)\n rename include/libcamera/{internal => platform}/utils.h (97%)\n rename src/{libcamera => libcamera-platform}/utils.cpp (99%)", "diff": "diff --git a/include/libcamera/internal/log.h b/include/libcamera/internal/log.h\nindex b8efb161407c..9cdb8de15fe7 100644\n--- a/include/libcamera/internal/log.h\n+++ b/include/libcamera/internal/log.h\n@@ -12,7 +12,7 @@\n \n #include <libcamera/class.h>\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n \n namespace libcamera {\n \ndiff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\nindex f019cfb3b0de..d88a8c6b9235 100644\n--- a/include/libcamera/internal/meson.build\n+++ b/include/libcamera/internal/meson.build\n@@ -42,7 +42,6 @@ libcamera_internal_headers = files([\n 'sysfs.h',\n 'thread.h',\n 'timer.h',\n- 'utils.h',\n 'v4l2_device.h',\n 'v4l2_pixelformat.h',\n 'v4l2_subdevice.h',\ndiff --git a/include/libcamera/internal/thread.h b/include/libcamera/internal/thread.h\nindex 25d0308d05b4..b3ae8f51ac17 100644\n--- a/include/libcamera/internal/thread.h\n+++ b/include/libcamera/internal/thread.h\n@@ -14,8 +14,9 @@\n \n #include <libcamera/signal.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/message.h\"\n-#include \"libcamera/internal/utils.h\"\n \n namespace libcamera {\n \ndiff --git a/include/libcamera/platform/meson.build b/include/libcamera/platform/meson.build\nindex c8e0d0c5ba12..84a0f8d20ef0 100644\n--- a/include/libcamera/platform/meson.build\n+++ b/include/libcamera/platform/meson.build\n@@ -3,6 +3,7 @@\n libcamera_platform_include_dir = libcamera_include_dir / 'platform'\n \n libcamera_platform_headers = files([\n+ 'utils.h',\n ])\n \n install_headers(libcamera_platform_headers,\ndiff --git a/include/libcamera/internal/utils.h b/include/libcamera/platform/utils.h\nsimilarity index 97%\nrename from include/libcamera/internal/utils.h\nrename to include/libcamera/platform/utils.h\nindex 15beb0f44172..eb904bc37d59 100644\n--- a/include/libcamera/internal/utils.h\n+++ b/include/libcamera/platform/utils.h\n@@ -4,8 +4,8 @@\n *\n * utils.h - Miscellaneous utility functions\n */\n-#ifndef __LIBCAMERA_INTERNAL_UTILS_H__\n-#define __LIBCAMERA_INTERNAL_UTILS_H__\n+#ifndef __LIBCAMERA_PLATFORM_UTILS_H__\n+#define __LIBCAMERA_PLATFORM_UTILS_H__\n \n #include <algorithm>\n #include <chrono>\n@@ -23,7 +23,7 @@\n \n /* uClibc and uClibc-ng don't provide O_TMPFILE */\n #ifndef O_TMPFILE\n-#define O_TMPFILE\t(020000000 | O_DIRECTORY)\n+#define O_TMPFILE (020000000 | O_DIRECTORY)\n #endif\n \n #endif\n@@ -352,4 +352,4 @@ std::basic_ostream<CharT, Traits> &operator<<(std::basic_ostream<CharT, Traits>\n \n } /* namespace libcamera */\n \n-#endif /* __LIBCAMERA_INTERNAL_UTILS_H__ */\n+#endif /* __LIBCAMERA_PLATFORM_UTILS_H__ */\ndiff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex aca273cc5b75..8b5aa7f91214 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -23,10 +23,11 @@\n #include <libcamera/formats.h>\n #include <libcamera/property_ids.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/formats.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/thread.h\"\n-#include \"libcamera/internal/utils.h\"\n \n #include \"system/graphics.h\"\n \ndiff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp\nindex 922086cdf6bc..07a047ea1d68 100644\n--- a/src/android/jpeg/exif.cpp\n+++ b/src/android/jpeg/exif.cpp\n@@ -14,8 +14,9 @@\n #include <tuple>\n #include <uchar.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/log.h\"\n-#include \"libcamera/internal/utils.h\"\n \n using namespace libcamera;\n \ndiff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp\nindex f53f5c39b01c..0d2688ced02a 100644\n--- a/src/ipa/raspberrypi/cam_helper.hpp\n+++ b/src/ipa/raspberrypi/cam_helper.hpp\n@@ -15,7 +15,8 @@\n #include \"controller/metadata.hpp\"\n #include \"md_parser.hpp\"\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/v4l2_videodevice.h\"\n \n namespace RPiController {\ndiff --git a/src/ipa/raspberrypi/controller/agc_algorithm.hpp b/src/ipa/raspberrypi/controller/agc_algorithm.hpp\nindex 134bbcda50ce..192b75db37ac 100644\n--- a/src/ipa/raspberrypi/controller/agc_algorithm.hpp\n+++ b/src/ipa/raspberrypi/controller/agc_algorithm.hpp\n@@ -6,7 +6,8 @@\n */\n #pragma once\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n+\n #include \"algorithm.hpp\"\n \n namespace RPiController {\ndiff --git a/src/ipa/raspberrypi/controller/agc_status.h b/src/ipa/raspberrypi/controller/agc_status.h\nindex 5d50e177f0dc..c7e280ec5b68 100644\n--- a/src/ipa/raspberrypi/controller/agc_status.h\n+++ b/src/ipa/raspberrypi/controller/agc_status.h\n@@ -6,7 +6,7 @@\n */\n #pragma once\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n \n // The AGC algorithm should post the following structure into the image's\n // \"agc.status\" metadata.\ndiff --git a/src/ipa/raspberrypi/controller/camera_mode.h b/src/ipa/raspberrypi/controller/camera_mode.h\nindex 2aa2335dcf90..2224b0f05745 100644\n--- a/src/ipa/raspberrypi/controller/camera_mode.h\n+++ b/src/ipa/raspberrypi/controller/camera_mode.h\n@@ -8,7 +8,7 @@\n \n #include <libcamera/transform.h>\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n \n // Description of a \"camera mode\", holding enough information for control\n // algorithms to adapt their behaviour to the different modes of the camera,\ndiff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h\nindex 131b4cd344ee..1b6c258befee 100644\n--- a/src/ipa/raspberrypi/controller/device_status.h\n+++ b/src/ipa/raspberrypi/controller/device_status.h\n@@ -6,7 +6,7 @@\n */\n #pragma once\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n \n // Definition of \"device metadata\" which stores things like shutter time and\n // analogue gain that downstream control algorithms will want to know.\ndiff --git a/src/ipa/raspberrypi/controller/rpi/agc.hpp b/src/ipa/raspberrypi/controller/rpi/agc.hpp\nindex 750789482b49..39898c66cf34 100644\n--- a/src/ipa/raspberrypi/controller/rpi/agc.hpp\n+++ b/src/ipa/raspberrypi/controller/rpi/agc.hpp\n@@ -9,7 +9,7 @@\n #include <vector>\n #include <mutex>\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n \n #include \"../agc_algorithm.hpp\"\n #include \"../agc_status.h\"\ndiff --git a/src/ipa/raspberrypi/controller/rpi/lux.hpp b/src/ipa/raspberrypi/controller/rpi/lux.hpp\nindex 45c844393e62..af6d6a11773a 100644\n--- a/src/ipa/raspberrypi/controller/rpi/lux.hpp\n+++ b/src/ipa/raspberrypi/controller/rpi/lux.hpp\n@@ -8,7 +8,7 @@\n \n #include <mutex>\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n \n #include \"../lux_status.h\"\n #include \"../algorithm.hpp\"\ndiff --git a/src/libcamera-platform/meson.build b/src/libcamera-platform/meson.build\nindex 64d0dfee2731..d53413fdffde 100644\n--- a/src/libcamera-platform/meson.build\n+++ b/src/libcamera-platform/meson.build\n@@ -1,15 +1,25 @@\n # SPDX-License-Identifier: CC0-1.0\n \n libcamera_platform_sources = files([\n+ 'utils.cpp',\n ])\n \n+libdl = cc.find_library('dl')\n+\n libcamera_platform_deps = [\n+ libdl,\n ]\n \n+# We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.\n+# The build_rpath is stripped at install time by meson, so we determine at\n+# runtime if the library is running from an installed location by checking\n+# for the presence or abscence of the dynamic tag.\n+\n libcamera_platform_lib = shared_library('libcamera_platform',\n [libcamera_platform_sources, libcamera_platform_headers],\n name_prefix : '',\n install : true,\n+ build_rpath : '/',\n cpp_args : libcamera_cpp_args,\n include_directories : libcamera_includes,\n dependencies : libcamera_platform_deps)\ndiff --git a/src/libcamera/utils.cpp b/src/libcamera-platform/utils.cpp\nsimilarity index 99%\nrename from src/libcamera/utils.cpp\nrename to src/libcamera-platform/utils.cpp\nindex 2e7d35fb1173..cfd3a4becdde 100644\n--- a/src/libcamera/utils.cpp\n+++ b/src/libcamera-platform/utils.cpp\n@@ -5,7 +5,7 @@\n * utils.cpp - Miscellaneous utility functions\n */\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n \n #include <dlfcn.h>\n #include <elf.h>\n@@ -20,7 +20,7 @@\n #include <unistd.h>\n \n /**\n- * \\file utils.h\n+ * \\file platform/utils.h\n * \\brief Miscellaneous utility functions\n */\n \n@@ -44,8 +44,8 @@ namespace utils {\n */\n const char *basename(const char *path)\n {\n- const char *base = strrchr(path, '/');\n- return base ? base + 1 : path;\n+\tconst char *base = strrchr(path, '/');\n+\treturn base ? base + 1 : path;\n }\n \n /**\ndiff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\nindex 1ecf2b07d5a3..8198494e439c 100644\n--- a/src/libcamera/camera_manager.cpp\n+++ b/src/libcamera/camera_manager.cpp\n@@ -12,13 +12,14 @@\n \n #include <libcamera/camera.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/device_enumerator.h\"\n #include \"libcamera/internal/ipa_manager.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/pipeline_handler.h\"\n #include \"libcamera/internal/process.h\"\n #include \"libcamera/internal/thread.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file camera_manager.h\ndiff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 3e135353f1d7..64468e7e5288 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -18,11 +18,12 @@\n \n #include <libcamera/property_ids.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/bayer_format.h\"\n #include \"libcamera/internal/camera_sensor_properties.h\"\n #include \"libcamera/internal/formats.h\"\n #include \"libcamera/internal/sysfs.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file camera_sensor.h\ndiff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\nindex 5aef4e7145bd..d23349eb953f 100644\n--- a/src/libcamera/controls.cpp\n+++ b/src/libcamera/controls.cpp\n@@ -12,9 +12,10 @@\n #include <string>\n #include <string.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/control_validator.h\"\n #include \"libcamera/internal/log.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file controls.h\ndiff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/event_dispatcher_poll.cpp\nindex 456c6def075b..30ffeaf5d4d8 100644\n--- a/src/libcamera/event_dispatcher_poll.cpp\n+++ b/src/libcamera/event_dispatcher_poll.cpp\n@@ -16,11 +16,12 @@\n #include <sys/eventfd.h>\n #include <unistd.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/event_notifier.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/thread.h\"\n #include \"libcamera/internal/timer.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file event_dispatcher_poll.h\ndiff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\nindex 93d02d947c46..0f8e5de87f99 100644\n--- a/src/libcamera/ipa_manager.cpp\n+++ b/src/libcamera/ipa_manager.cpp\n@@ -12,12 +12,13 @@\n #include <string.h>\n #include <sys/types.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/file.h\"\n #include \"libcamera/internal/ipa_module.h\"\n #include \"libcamera/internal/ipa_proxy.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/pipeline_handler.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file ipa_manager.h\ndiff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\nindex f53e529b0380..bf272ba35df7 100644\n--- a/src/libcamera/ipa_module.cpp\n+++ b/src/libcamera/ipa_module.cpp\n@@ -23,10 +23,11 @@\n \n #include <libcamera/span.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/file.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/pipeline_handler.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file ipa_module.h\ndiff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\nindex b70fde581eeb..d659230f55c9 100644\n--- a/src/libcamera/ipa_proxy.cpp\n+++ b/src/libcamera/ipa_proxy.cpp\n@@ -12,9 +12,10 @@\n #include <sys/types.h>\n #include <unistd.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/ipa_module.h\"\n #include \"libcamera/internal/log.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file ipa_proxy.h\ndiff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp\nindex 74829a56916e..72c80208f583 100644\n--- a/src/libcamera/log.cpp\n+++ b/src/libcamera/log.cpp\n@@ -23,8 +23,9 @@\n \n #include <libcamera/logging.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/thread.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file log.h\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 6ba59e4006cb..870d4c4276e9 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -51,7 +51,6 @@ libcamera_sources = files([\n 'thread.cpp',\n 'timer.cpp',\n 'transform.cpp',\n- 'utils.cpp',\n 'v4l2_device.cpp',\n 'v4l2_pixelformat.cpp',\n 'v4l2_subdevice.cpp',\n@@ -131,18 +130,12 @@ libcamera_deps = [\n dependency('threads'),\n ]\n \n-# We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.\n-# The build_rpath is stripped at install time by meson, so we determine at\n-# runtime if the library is running from an installed location by checking\n-# for the presence or abscence of the dynamic tag.\n-\n libcamera = shared_library('camera',\n libcamera_sources,\n install : true,\n cpp_args : libcamera_cpp_args,\n include_directories : includes,\n objects : libcamera_objects,\n- build_rpath : '/',\n dependencies : libcamera_deps)\n \n # TODO Drop libcamera_generated_ipa_headers from libcamera_dep as libcamera_dep\ndiff --git a/src/libcamera/object.cpp b/src/libcamera/object.cpp\nindex 5e6b73f9af84..71739d6c2fff 100644\n--- a/src/libcamera/object.cpp\n+++ b/src/libcamera/object.cpp\n@@ -11,11 +11,12 @@\n \n #include <libcamera/signal.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/message.h\"\n #include \"libcamera/internal/semaphore.h\"\n #include \"libcamera/internal/thread.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file object.h\ndiff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\nindex 4eb3f7b730a9..297685bc597f 100644\n--- a/src/libcamera/pipeline/ipu3/imgu.cpp\n+++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n@@ -16,9 +16,10 @@\n #include <libcamera/formats.h>\n #include <libcamera/stream.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/media_device.h\"\n-#include \"libcamera/internal/utils.h\"\n \n namespace libcamera {\n \ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 6c93bc6d161d..269ab18938c6 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -20,6 +20,8 @@\n #include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/camera_sensor.h\"\n #include \"libcamera/internal/delayed_controls.h\"\n #include \"libcamera/internal/device_enumerator.h\"\n@@ -27,7 +29,6 @@\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/media_device.h\"\n #include \"libcamera/internal/pipeline_handler.h\"\n-#include \"libcamera/internal/utils.h\"\n \n #include \"cio2.h\"\n #include \"frames.h\"\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex a65b4568256c..dc3fe63112d4 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -24,6 +24,8 @@\n #include <libcamera/property_ids.h>\n #include <libcamera/request.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include <linux/bcm2835-isp.h>\n #include <linux/videodev2.h>\n \n@@ -35,7 +37,6 @@\n #include \"libcamera/internal/ipa_manager.h\"\n #include \"libcamera/internal/media_device.h\"\n #include \"libcamera/internal/pipeline_handler.h\"\n-#include \"libcamera/internal/utils.h\"\n #include \"libcamera/internal/v4l2_videodevice.h\"\n \n #include \"dma_heaps.h\"\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 6699839c4623..30a015e2ed59 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -24,6 +24,8 @@\n #include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/camera_sensor.h\"\n #include \"libcamera/internal/delayed_controls.h\"\n #include \"libcamera/internal/device_enumerator.h\"\n@@ -31,7 +33,6 @@\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/media_device.h\"\n #include \"libcamera/internal/pipeline_handler.h\"\n-#include \"libcamera/internal/utils.h\"\n #include \"libcamera/internal/v4l2_subdevice.h\"\n #include \"libcamera/internal/v4l2_videodevice.h\"\n \ndiff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp\nindex 68644ef6477f..6c729408cb08 100644\n--- a/src/libcamera/pipeline/simple/converter.cpp\n+++ b/src/libcamera/pipeline/simple/converter.cpp\n@@ -15,9 +15,10 @@\n #include <libcamera/signal.h>\n #include <libcamera/stream.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/media_device.h\"\n-#include \"libcamera/internal/utils.h\"\n #include \"libcamera/internal/v4l2_videodevice.h\"\n \n namespace libcamera {\ndiff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\nindex 12a85b2407db..d5b325bd6b34 100644\n--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n@@ -19,12 +19,13 @@\n #include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/device_enumerator.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/media_device.h\"\n #include \"libcamera/internal/pipeline_handler.h\"\n #include \"libcamera/internal/sysfs.h\"\n-#include \"libcamera/internal/utils.h\"\n #include \"libcamera/internal/v4l2_videodevice.h\"\n \n namespace libcamera {\ndiff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\nindex 8bbac0085c9b..b20bef0f5ace 100644\n--- a/src/libcamera/pipeline/vimc/vimc.cpp\n+++ b/src/libcamera/pipeline/vimc/vimc.cpp\n@@ -23,13 +23,14 @@\n #include <libcamera/request.h>\n #include <libcamera/stream.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/camera_sensor.h\"\n #include \"libcamera/internal/device_enumerator.h\"\n #include \"libcamera/internal/ipa_manager.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/media_device.h\"\n #include \"libcamera/internal/pipeline_handler.h\"\n-#include \"libcamera/internal/utils.h\"\n #include \"libcamera/internal/v4l2_subdevice.h\"\n #include \"libcamera/internal/v4l2_videodevice.h\"\n \ndiff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\nindex e507a8bba8a6..a138db9fda4a 100644\n--- a/src/libcamera/pipeline_handler.cpp\n+++ b/src/libcamera/pipeline_handler.cpp\n@@ -13,11 +13,12 @@\n #include <libcamera/camera.h>\n #include <libcamera/camera_manager.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/device_enumerator.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/media_device.h\"\n #include \"libcamera/internal/tracepoints.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file pipeline_handler.h\ndiff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\nindex 40a434a6b0c2..94dce3c7de46 100644\n--- a/src/libcamera/process.cpp\n+++ b/src/libcamera/process.cpp\n@@ -20,9 +20,10 @@\n #include <unistd.h>\n #include <vector>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/event_notifier.h\"\n #include \"libcamera/internal/log.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file process.h\ndiff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\nindex f7bafcf8fc97..fae217fe21fa 100644\n--- a/src/libcamera/stream.cpp\n+++ b/src/libcamera/stream.cpp\n@@ -15,8 +15,9 @@\n \n #include <libcamera/request.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/log.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file stream.h\ndiff --git a/src/libcamera/timer.cpp b/src/libcamera/timer.cpp\nindex c242113a782e..22bf4ffe3704 100644\n--- a/src/libcamera/timer.cpp\n+++ b/src/libcamera/timer.cpp\n@@ -11,11 +11,12 @@\n \n #include <libcamera/camera_manager.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/event_dispatcher.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/message.h\"\n #include \"libcamera/internal/thread.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file timer.h\ndiff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 5660e6ea5839..693c62a1f895 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -16,10 +16,11 @@\n #include <sys/syscall.h>\n #include <unistd.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/event_notifier.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/sysfs.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file v4l2_device.h\ndiff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 721ff5a92a2b..8091b4cadd58 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -19,10 +19,11 @@\n \n #include <libcamera/geometry.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/media_device.h\"\n #include \"libcamera/internal/media_object.h\"\n-#include \"libcamera/internal/utils.h\"\n \n /**\n * \\file v4l2_subdevice.h\ndiff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\nindex f8bfe595e90e..a94132e2511b 100644\n--- a/src/v4l2/v4l2_camera_proxy.cpp\n+++ b/src/v4l2/v4l2_camera_proxy.cpp\n@@ -20,9 +20,10 @@\n #include <libcamera/formats.h>\n #include <libcamera/object.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/formats.h\"\n #include \"libcamera/internal/log.h\"\n-#include \"libcamera/internal/utils.h\"\n \n #include \"v4l2_camera.h\"\n #include \"v4l2_camera_file.h\"\ndiff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp\nindex 96dbcdf28f04..1ab706b9a60f 100644\n--- a/src/v4l2/v4l2_compat_manager.cpp\n+++ b/src/v4l2/v4l2_compat_manager.cpp\n@@ -22,8 +22,9 @@\n #include <libcamera/camera.h>\n #include <libcamera/camera_manager.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/log.h\"\n-#include \"libcamera/internal/utils.h\"\n \n #include \"v4l2_camera_file.h\"\n \ndiff --git a/test/camera-sensor.cpp b/test/camera-sensor.cpp\nindex 8c7fd1d2d444..90772e7a3eb3 100644\n--- a/test/camera-sensor.cpp\n+++ b/test/camera-sensor.cpp\n@@ -10,10 +10,11 @@\n \n #include <linux/media-bus-format.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/camera_sensor.h\"\n #include \"libcamera/internal/device_enumerator.h\"\n #include \"libcamera/internal/media_device.h\"\n-#include \"libcamera/internal/utils.h\"\n #include \"libcamera/internal/v4l2_subdevice.h\"\n \n #include \"test.h\"\ndiff --git a/test/file-descriptor.cpp b/test/file-descriptor.cpp\nindex aa3c896fb937..890fd297f115 100644\n--- a/test/file-descriptor.cpp\n+++ b/test/file-descriptor.cpp\n@@ -13,7 +13,7 @@\n \n #include <libcamera/file_descriptor.h>\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n \n #include \"test.h\"\n \ndiff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp\nindex 3049eaa8bb2a..21a5580db7fe 100644\n--- a/test/ipc/unixsocket_ipc.cpp\n+++ b/test/ipc/unixsocket_ipc.cpp\n@@ -15,6 +15,8 @@\n #include <sys/wait.h>\n #include <unistd.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/event_dispatcher.h\"\n #include \"libcamera/internal/ipa_data_serializer.h\"\n #include \"libcamera/internal/ipc_pipe.h\"\n@@ -22,7 +24,6 @@\n #include \"libcamera/internal/process.h\"\n #include \"libcamera/internal/thread.h\"\n #include \"libcamera/internal/timer.h\"\n-#include \"libcamera/internal/utils.h\"\n \n #include \"test.h\"\n \ndiff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\nindex c0a1a012d366..43c269dc0176 100644\n--- a/test/log/log_process.cpp\n+++ b/test/log/log_process.cpp\n@@ -16,12 +16,13 @@\n \n #include <libcamera/logging.h>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/event_dispatcher.h\"\n #include \"libcamera/internal/log.h\"\n #include \"libcamera/internal/process.h\"\n #include \"libcamera/internal/thread.h\"\n #include \"libcamera/internal/timer.h\"\n-#include \"libcamera/internal/utils.h\"\n \n #include \"test.h\"\n \ndiff --git a/test/pixel-format.cpp b/test/pixel-format.cpp\nindex c4a08f468ade..36dafcf1e78f 100644\n--- a/test/pixel-format.cpp\n+++ b/test/pixel-format.cpp\n@@ -10,7 +10,7 @@\n #include <libcamera/formats.h>\n #include <libcamera/pixel_format.h>\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n \n #include \"test.h\"\n \ndiff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\nindex 1279d8c17598..54b2b8fda2b5 100644\n--- a/test/process/process_test.cpp\n+++ b/test/process/process_test.cpp\n@@ -9,11 +9,12 @@\n #include <unistd.h>\n #include <vector>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/event_dispatcher.h\"\n #include \"libcamera/internal/process.h\"\n #include \"libcamera/internal/thread.h\"\n #include \"libcamera/internal/timer.h\"\n-#include \"libcamera/internal/utils.h\"\n \n #include \"test.h\"\n \ndiff --git a/test/signal-threads.cpp b/test/signal-threads.cpp\nindex 3c5f3792e385..c3145aebe85f 100644\n--- a/test/signal-threads.cpp\n+++ b/test/signal-threads.cpp\n@@ -9,9 +9,10 @@\n #include <iostream>\n #include <thread>\n \n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/message.h\"\n #include \"libcamera/internal/thread.h\"\n-#include \"libcamera/internal/utils.h\"\n \n #include \"test.h\"\n \ndiff --git a/test/utils.cpp b/test/utils.cpp\nindex f170ae4c2f35..b65de56bf6c5 100644\n--- a/test/utils.cpp\n+++ b/test/utils.cpp\n@@ -14,7 +14,7 @@\n #include <libcamera/geometry.h>\n #include <libcamera/span.h>\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n \n #include \"test.h\"\n \ndiff --git a/test/v4l2_subdevice/list_formats.cpp b/test/v4l2_subdevice/list_formats.cpp\nindex 74ec81a8560c..5fadfc935a3e 100644\n--- a/test/v4l2_subdevice/list_formats.cpp\n+++ b/test/v4l2_subdevice/list_formats.cpp\n@@ -10,7 +10,8 @@\n \n #include <libcamera/geometry.h>\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/v4l2_subdevice.h\"\n \n #include \"v4l2_subdevice_test.h\"\ndiff --git a/test/v4l2_videodevice/formats.cpp b/test/v4l2_videodevice/formats.cpp\nindex 255446fe758a..2bf64f341084 100644\n--- a/test/v4l2_videodevice/formats.cpp\n+++ b/test/v4l2_videodevice/formats.cpp\n@@ -8,7 +8,8 @@\n #include <iostream>\n #include <limits.h>\n \n-#include \"libcamera/internal/utils.h\"\n+#include <libcamera/platform/utils.h>\n+\n #include \"libcamera/internal/v4l2_videodevice.h\"\n \n #include \"v4l2_videodevice_test.h\"\n", "prefixes": [ "libcamera-devel", "3/6" ] }