[libcamera-devel] [PATCH] Expose the Request Sequence Number in Python Bindings

Matthew Goodman matt at exclosure.io
Wed Dec 7 00:29:54 CET 2022


This is a one line change to expose the Request object's sequence number on
the pybind11 surfaces for use in upstream applications.

I'm new to this email based approach (let me know if I am doing this
right), but the associated PR is here:
https://github.com/kbingham/libcamera/pull/61

Signed-off-by: Matthew Goodman <matt at exclosure.io>
---
diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp
index 75947889..d14e18e2 100644
--- a/src/py/libcamera/py_main.cpp
+++ b/src/py/libcamera/py_main.cpp
@@ -335,6 +335,7 @@ PYBIND11_MODULE(_libcamera, m)
                .def_property_readonly("status", &Request::status)
                .def_property_readonly("buffers", &Request::buffers)
                .def_property_readonly("cookie", &Request::cookie)
+               .def_property_readonly("sequence", &Request::sequence)
                .def_property_readonly("has_pending_buffers",
&Request::hasPendingBuffers)
                .def("set_control", [](Request &self, const ControlId &id,
py::object value) {
                        self.controls().set(id.id(),
pyToControlValue(value, id.type()));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20221206/0b434647/attachment.htm>


More information about the libcamera-devel mailing list