From patchwork Mon Dec 19 13:20:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18038 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 2D0D3C3200 for ; Mon, 19 Dec 2022 13:20:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4DB30633A2; Mon, 19 Dec 2022 14:20:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1671456035; bh=4uvPApkjwSp6alv92lFawGO7SZRis7GhDLdUb/VNv9A=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=dV/yiq9xFn6m0mOrWY1VNPF6ccBmIXZnk7dntK3k87Z0vg6YI4WaLZLIuzzeZbH8h /tM+5sJN6JKIAFc5aZ7Z9bSE/caMepuodcxMI38FI3zDpeWG5Y/WW65Z89Ucv8bpmw NLC/r1X3ky5jPt2FO81KQVz4MqL5i52JWw4RWiNIAgtpnAERjzZYyAG9zNL9DsZQoa ZEBobxhko16kpSrG4/GeYbK/3Lfshdqx1MgWOTPKoi/aFCVOapFJabrxQeb6rHdHa+ eIXb6tTFb5ulHh+Ve/Uo5A2CM7l2876RDlxiDMicYF3qktLPdWutxikL0dIjvUvoAy lYcxSZmePBa2Q== 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 2509C61508 for ; Mon, 19 Dec 2022 14:20:34 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="jh+Dc098"; dkim-atps=neutral Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 56417825; Mon, 19 Dec 2022 14:20:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1671456033; bh=4uvPApkjwSp6alv92lFawGO7SZRis7GhDLdUb/VNv9A=; h=From:To:Cc:Subject:Date:From; b=jh+Dc098/orNGy94q2zqZxErChbVGj/zhjXE+x9Ufu+7OYAxtAhjLacpXv5t7hdgN Gr3xFe8tifluJpP5cSqfjEFN3iCbNqL3eL+Qm5IP0qrYOVMVsIGS5cnhOFDPjBAJZI GNw32NUgvWWCyRUEbcLris0WMFDHRkZArs136Xo4= To: libcamera devel Date: Mon, 19 Dec 2022 13:20:29 +0000 Message-Id: <20221219132029.2228553-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2] Expose the Request Sequence Number in Python Bindings 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: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Matthew Goodman The python bindings are missing the ability to read the sequence number of the Request object from the public API. Expose the objects sequence number on the pybind11 surfaces to support applications reading this value. Signed-off-by: Matthew Goodman [Kieran: Revised commit message] Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham Reviewed-by: Tomi Valkeinen --- v2: - Revised commit message. Signed-off-by: Kieran Bingham 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 75947889f7b1..d14e18e25f3f 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()));