Patch Detail
Show a patch.
GET /api/patches/21640/?format=api
{ "id": 21640, "url": "https://patchwork.libcamera.org/api/patches/21640/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21640/", "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": "<20241016111943.1411372-4-paul.elder@ideasonboard.com>", "date": "2024-10-16T11:19:43", "name": "[v2,3/3] py: Add bindings for ControlId vendor information", "commit_ref": "79893cc00fc6b58d42c411164947b8876bc628c3", "pull_url": null, "state": "accepted", "archived": false, "hash": "713a4cff29c44c9236305d2176308372f1e3989f", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21640/mbox/", "series": [ { "id": 4704, "url": "https://patchwork.libcamera.org/api/series/4704/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4704", "date": "2024-10-16T11:19:40", "name": "libcamera: controls: Add namespace to ControlId", "version": 2, "mbox": "https://patchwork.libcamera.org/series/4704/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21640/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21640/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 BF29CC32FA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 16 Oct 2024 11:20:06 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 44BAB65384;\n\tWed, 16 Oct 2024 13:20:06 +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 7B38865386\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Oct 2024 13:19:57 +0200 (CEST)", "from neptunite.flets-east.jp (unknown\n\t[IPv6:2404:7a81:160:2100:b5b2:fcb4:385e:af78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6D576A57;\n\tWed, 16 Oct 2024 13:18:14 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mPWt+8fX\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1729077495;\n\tbh=7qR7DYbmfNfm5p786N1u52Kr/VeDB5XuEsWx1UPwNXo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=mPWt+8fXVL9NgMjRip03vK5MnP2Y0OOAR9jRz+WxlrhQOhMpstokd1YQXnY87zzGe\n\te1AVcV94fyqUbLiHFUl7pn6Z4Qo+UxKWX0v45iMJUucgXw1dDxvjBc53m9PHnB+HUD\n\t7Je1mtPLPWM0Eq9h1kIYG4xEZwlE/kU9G1sZ/VcQ=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Paul Elder <paul.elder@ideasonboard.com>", "Subject": "[PATCH v2 3/3] py: Add bindings for ControlId vendor information", "Date": "Wed, 16 Oct 2024 20:19:43 +0900", "Message-Id": "<20241016111943.1411372-4-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.39.2", "In-Reply-To": "<20241016111943.1411372-1-paul.elder@ideasonboard.com>", "References": "<20241016111943.1411372-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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": "Add python bindings for quering vendor information from a ControlId.\nWhile at it, update __repr__ so that it also prints the vendor.\n\nExample usage:\n>>> cid\nlibcamera.ControlId(20, libcamera.Saturation, ControlType.Float)\n>>> cid.vendor\n'libcamera'\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\nChanges in v2:\n- reorder code so vendor comes immediately after name\n- update repr\n---\n src/py/libcamera/py_main.cpp | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp\nindex 983b76f6e998..09b6f9db0650 100644\n--- a/src/py/libcamera/py_main.cpp\n+++ b/src/py/libcamera/py_main.cpp\n@@ -399,11 +399,12 @@ PYBIND11_MODULE(_libcamera, m)\n \tpyControlId\n \t\t.def_property_readonly(\"id\", &ControlId::id)\n \t\t.def_property_readonly(\"name\", &ControlId::name)\n+\t\t.def_property_readonly(\"vendor\", &ControlId::vendor)\n \t\t.def_property_readonly(\"type\", &ControlId::type)\n \t\t.def(\"__str__\", [](const ControlId &self) { return self.name(); })\n \t\t.def(\"__repr__\", [](const ControlId &self) {\n-\t\t\treturn py::str(\"libcamera.ControlId({}, {}, {})\")\n-\t\t\t\t.format(self.id(), self.name(), self.type());\n+\t\t\treturn py::str(\"libcamera.ControlId({}, {}.{}, {})\")\n+\t\t\t\t.format(self.id(), self.vendor(), self.name(), self.type());\n \t\t})\n \t\t.def(\"enumerators\", &ControlId::enumerators);\n \n", "prefixes": [ "v2", "3/3" ] }