[PATCH 3/3] py: Add bindings for ControlId vendor information
Paul Elder
paul.elder at ideasonboard.com
Thu Oct 10 10:47:19 CEST 2024
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 <paul.elder at ideasonboard.com>
---
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({}, {}, {})")
--
2.39.2
More information about the libcamera-devel
mailing list