Patch Detail
Show a patch.
GET /api/patches/16386/?format=api
{ "id": 16386, "url": "https://patchwork.libcamera.org/api/patches/16386/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16386/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20220627162732.33160-6-jacopo@jmondi.org>", "date": "2022-06-27T16:27:22", "name": "[libcamera-devel,05/15] libcamera: camera_sensor: Retrieve sensor delays", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": true, "hash": "b51aa3109a0e32d59748c3cd4cacdf359fa73788", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16386/mbox/", "series": [ { "id": 3224, "url": "https://patchwork.libcamera.org/api/series/3224/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3224", "date": "2022-06-27T16:27:17", "name": "Internal controls, sensor delays and IPA init/configure rework", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3224/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16386/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16386/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 81502BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jun 2022 16:27:51 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 324BF6564C;\n\tMon, 27 Jun 2022 18:27:51 +0200 (CEST)", "from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CDE0D65639\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jun 2022 18:27:44 +0200 (CEST)", "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 0D35B20009;\n\tMon, 27 Jun 2022 16:27:43 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656347271;\n\tbh=ckO0WIZjO53QzzWM6jMDukqqxc2tn5erdfG9AVHU+UY=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=SoqgSVxUvAhzQr86geLRVRaowKvbud6plNRZYOyQW+u5VNFD0ZDhZMZYFszkxQiV8\n\tyBpG9opEWemMT5gzvImatCelFF0M58Zr0n+vSYxvPDhQCRHp4VQJKcmllCpFOM3Zx5\n\ttTNYjui8XNIg0nGD2rP3GkSNzpVPKk24AiJOYaYxkAU/isHy3mRpk6vWoSaqRoMLB0\n\tjYHKmhGt4dom+cvi8Z8TnDxE6Y8qfBZsOc0ipatDDGtJbMJZYXWaMhbFDHgJHB4aI5\n\tpyWTBG3FaCvUhuZetoQHK+HfvYapAWvgqCOxQZaKHGmjaI0YStDFIqy1/c5MiObM6F\n\tT+SgKHFCpkx2Q==", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 27 Jun 2022 18:27:22 +0200", "Message-Id": "<20220627162732.33160-6-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.36.1", "In-Reply-To": "<20220627162732.33160-1-jacopo@jmondi.org>", "References": "<20220627162732.33160-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 05/15] libcamera: camera_sensor: Retrieve\n\tsensor delays", "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>", "From": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "Jacopo Mondi <jacopo@jmondi.org>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Add a function to the CameraSensor to retrieve the SensorDelay map that\nassociate controls to their latencies.\n\nIf such information is not provided, return a reference to an empty map.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/internal/camera_sensor.h | 4 +++\n src/libcamera/camera_sensor.cpp | 30 ++++++++++++++++++++++\n 2 files changed, 34 insertions(+)", "diff": "diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\nindex b9f4d7867854..0359d4609517 100644\n--- a/include/libcamera/internal/camera_sensor.h\n+++ b/include/libcamera/internal/camera_sensor.h\n@@ -9,6 +9,7 @@\n \n #include <memory>\n #include <string>\n+#include <unordered_map>\n #include <vector>\n \n #include <libcamera/base/class.h>\n@@ -34,6 +35,8 @@ struct CameraSensorProperties;\n class CameraSensor : protected Loggable\n {\n public:\n+\tusing SensorDelays = std::unordered_map<const ControlId *, unsigned int>;\n+\n \texplicit CameraSensor(const MediaEntity *entity);\n \t~CameraSensor();\n \n@@ -45,6 +48,7 @@ public:\n \tconst std::vector<unsigned int> &mbusCodes() const { return mbusCodes_; }\n \tstd::vector<Size> sizes(unsigned int mbusCode) const;\n \tSize resolution() const;\n+\tconst SensorDelays &sensorDelays();\n \tconst std::vector<controls::draft::TestPatternModeEnum> &testPatternModes() const\n \t{\n \t\treturn testPatternModes_;\ndiff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex d055c16a4885..5cd33e904174 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -47,6 +47,14 @@ LOG_DEFINE_CATEGORY(CameraSensor)\n * devices as the needs arise.\n */\n \n+/**\n+ * \\typedef CameraSensor::SensorDelays\n+ * \\brief Camera sensor controls delays\n+ *\n+ * Type to represent a map of camera sensor controls associated with their\n+ * latencies, expressed in frame periods.\n+ */\n+\n /**\n * \\brief Construct a CameraSensor\n * \\param[in] entity The media entity backing the camera sensor\n@@ -561,6 +569,28 @@ Size CameraSensor::resolution() const\n \treturn std::min(sizes_.back(), activeArea_.size());\n }\n \n+/**\n+ * \\brief Retrieve the map of latencies associated with camera controls\n+ *\n+ * Retrieve the SensorDelays map that associates camera controls with\n+ * their latencies.\n+ *\n+ * If a camera sensor does not provide such information an empty map is\n+ * returned.\n+ *\n+ * \\return A map of controls associated with their latencies or an empty map\n+ * if no sensor delays are available.\n+ */\n+const CameraSensor::SensorDelays &CameraSensor::sensorDelays()\n+{\n+\tstatic SensorDelays emptyDelays{};\n+\n+\tif (!staticProps_)\n+\t\treturn emptyDelays;\n+\n+\treturn staticProps_->sensorDelays;\n+}\n+\n /**\n * \\fn CameraSensor::testPatternModes()\n * \\brief Retrieve all the supported test pattern modes of the camera sensor\n", "prefixes": [ "libcamera-devel", "05/15" ] }