Patch Detail
Show a patch.
GET /api/patches/16506/?format=api
{ "id": 16506, "url": "https://patchwork.libcamera.org/api/patches/16506/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16506/", "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": "<20220701084521.31831-15-tomi.valkeinen@ideasonboard.com>", "date": "2022-07-01T08:45:18", "name": "[libcamera-devel,v3,14/17] py: simple-capture.py: Use new events support", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "efce3e762ef0fdef4e580ec7bad81b69248f81ad", "submitter": { "id": 109, "url": "https://patchwork.libcamera.org/api/people/109/?format=api", "name": "Tomi Valkeinen", "email": "tomi.valkeinen@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16506/mbox/", "series": [ { "id": 3241, "url": "https://patchwork.libcamera.org/api/series/3241/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3241", "date": "2022-07-01T08:45:04", "name": "Python bindings event handling", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3241/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16506/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16506/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 8FE3BBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 1 Jul 2022 08:45:57 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 598C165657;\n\tFri, 1 Jul 2022 10:45:57 +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 4F03465657\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 1 Jul 2022 10:45:47 +0200 (CEST)", "from deskari.lan (91-158-154-79.elisa-laajakaista.fi\n\t[91.158.154.79])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C6FFD6BB;\n\tFri, 1 Jul 2022 10:45:46 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656665157;\n\tbh=dEMxUwcl6KLgUabu02fgNyd1D1uOBovj3Is2gM6gduc=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=XEJs2dWp5Vx+A6n1oz1DqB/iSmqGJntvn/XkvIQ3OwEwdPp0zps2dRu2cSQXTHkp/\n\tI90CF3AFWh9ZnIrDhZRjMHjrrpTv4KZAsP1cqYgvsZPMKhToXO0KMneAtskNnj4sfU\n\tSoTjl/YxPCG0exDZppLR6hR74V0fcxLkRF6j7DitOaKuAd7askuFguf89pBFjlEkX4\n\tEyeApnWCB1GDjtJ/1u2kcdFDMr1aHIp3NttJR8TlJCZRI64WIoSm8c/xC4fKgQ6h95\n\tEwyGZXMtfCkYDVP49gMBiDjWyEWJznK3cpbR5A3tPqTRGLLE/qhNd6L881wY5SOUY4\n\t3TjST3YCmFJqw==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1656665147;\n\tbh=dEMxUwcl6KLgUabu02fgNyd1D1uOBovj3Is2gM6gduc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=FLEbA0P1P0aU1Y6JtXWycPVJ/INmeB+n3yUkyF6245MSD0Tdcef40S5ErNJvflhwn\n\t+quOgbSoE6jEyQONqJQ6ILGu6K8UNDksHaJWVj34mEe/qlhvFauVVfr9GfGJCLwRki\n\tEvyNA5K/5MOtelkvfKJKj1M/pn/TA1vASqTcEhxM=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"FLEbA0P1\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tJacopo Mondi <jacopo@jmondi.org>", "Date": "Fri, 1 Jul 2022 11:45:18 +0300", "Message-Id": "<20220701084521.31831-15-tomi.valkeinen@ideasonboard.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20220701084521.31831-1-tomi.valkeinen@ideasonboard.com>", "References": "<20220701084521.31831-1-tomi.valkeinen@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 14/17] py: simple-capture.py: Use new\n\tevents support", "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>", "From": "Tomi Valkeinen via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n---\n src/py/examples/simple-capture.py | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/py/examples/simple-capture.py b/src/py/examples/simple-capture.py\nindex 4b85408f..c26e638b 100755\n--- a/src/py/examples/simple-capture.py\n+++ b/src/py/examples/simple-capture.py\n@@ -107,7 +107,7 @@ def main():\n sel.register(cm.event_fd, selectors.EVENT_READ)\n \n while frames_done < TOTAL_FRAMES:\n- # cm.get_ready_requests() does not block, so we use a Selector to wait\n+ # cm.get_events() does not block, so we use a Selector to wait\n # for a camera event. Here we should almost always get a single\n # Request, but in some cases there could be multiple or none.\n \n@@ -115,9 +115,13 @@ def main():\n if not events:\n continue\n \n- reqs = cm.get_ready_requests()\n+ for ev in cm.get_events():\n+ # We are only interested in RequestCompleted events\n+ if ev.type != libcam.Event.Type.RequestCompleted:\n+ continue\n+\n+ req = ev.request\n \n- for req in reqs:\n frames_done += 1\n \n buffers = req.buffers\n", "prefixes": [ "libcamera-devel", "v3", "14/17" ] }