From patchwork Thu Oct 10 08:47:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 21583 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id BD87DC32EF for ; Thu, 10 Oct 2024 08:47:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 09C6565373; Thu, 10 Oct 2024 10:47:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="sedyFELk"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2E7786536B for ; Thu, 10 Oct 2024 10:47:39 +0200 (CEST) Received: from neptunite.flets-east.jp (unknown [IPv6:2404:7a81:160:2100:c738:203:8807:bdb1]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2A6B9D21; Thu, 10 Oct 2024 10:45:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1728549961; bh=rHsihfg6nz0zcdjfJFsJujwPFpkZ3hjgn5uX3dDfFZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sedyFELk6pLV7S6SLZaHQ/wNIrNhtVC/q65vR+KjIe/LvHfYxloofoNbfMwfbBIQ4 UHg0XGz8R0KDiCeaHo38uTFAXoFGU+D8dWTJFkpYREiSGmBDUDzPNwGRueKO1+i46g pUlgFWBT1i7Y19+RuG/YybvFbhxhB2IEgZOCM1Cs= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder Subject: [PATCH 3/3] py: Add bindings for ControlId vendor information Date: Thu, 10 Oct 2024 17:47:19 +0900 Message-Id: <20241010084719.712485-4-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241010084719.712485-1-paul.elder@ideasonboard.com> References: <20241010084719.712485-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add python bindings for quering vendor information from a ControlId. Example usage: >>> cid libcamera.ControlId(20, Saturation, ControlType.Float) >>> cid.vendor 'libcamera' Signed-off-by: Paul Elder --- src/py/libcamera/py_main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp index 983b76f6e998..11e9dd6bf6eb 100644 --- a/src/py/libcamera/py_main.cpp +++ b/src/py/libcamera/py_main.cpp @@ -400,6 +400,7 @@ PYBIND11_MODULE(_libcamera, m) .def_property_readonly("id", &ControlId::id) .def_property_readonly("name", &ControlId::name) .def_property_readonly("type", &ControlId::type) + .def_property_readonly("vendor", &ControlId::vendor) .def("__str__", [](const ControlId &self) { return self.name(); }) .def("__repr__", [](const ControlId &self) { return py::str("libcamera.ControlId({}, {}, {})")