Show a patch.

GET /api/1.1/patches/16508/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 16508,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/16508/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16508/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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-17-tomi.valkeinen@ideasonboard.com>",
    "date": "2022-07-01T08:45:20",
    "name": "[libcamera-devel,v3,16/17] py: simple-cam.py: Use new events support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "1e8f07d0e7e133759fce21d7f84d5f68bd0d8256",
    "submitter": {
        "id": 109,
        "url": "https://patchwork.libcamera.org/api/1.1/people/109/?format=api",
        "name": "Tomi Valkeinen",
        "email": "tomi.valkeinen@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16508/mbox/",
    "series": [
        {
            "id": 3241,
            "url": "https://patchwork.libcamera.org/api/1.1/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/16508/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16508/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 91C4FBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  1 Jul 2022 08:45:58 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4D1E16565C;\n\tFri,  1 Jul 2022 10:45:58 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 34BAF65659\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  1 Jul 2022 10:45:48 +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 AB25574A;\n\tFri,  1 Jul 2022 10:45:47 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656665158;\n\tbh=MYlDkRTAp41zXQKsbu1oUXZKNRGPOXw62F5eXwtarUg=;\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=tyxc+zIFHFBCdOBCtOOFfNA868w2yNInbLsPLqqK3McnDSiDtu7RrOPmP/DM7di3H\n\tevF/waMrGpSxgzGug2ekLfQ2XlGP7eGGya6WfF6ZnbWTpnJarPQfipmS8/VlISBODq\n\tTN1Sq/cRRO1XPsO8RzYC9Xr7nwBdYJKYOAKYVzfMNH3bEYYsEhtoeaI4u0/cNJPJaR\n\t7+U/TcIRc5zND3Cxy+yo7Bo2+6juD5E5cqXdSYnn87/W3B/dFSR25W1r53u2bNINSH\n\tY7e1g45QV5stYk70h6Ulr3o/041r4Bgn8LOkA+QpPyyuQotso0ZGdG4oTaoi8RHMvP\n\tDNy1noIRrOjQA==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1656665148;\n\tbh=MYlDkRTAp41zXQKsbu1oUXZKNRGPOXw62F5eXwtarUg=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=S24WYZY/bqbsZkg3GMANaNmEVikl2zVx9RxlLLGUFeFblDg3X1zlxzt/dgNBXrjT3\n\tOLkw+8+8J+aI7nTyBiLwaONJqmOL6VZoozTAPMCDa11ObGUdGdUD9cPFC3WAJQPNsX\n\t10QOKzx9WBh0+r4wn7kFH9xyuaymVZicbtO3KjHk="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"S24WYZY/\"; 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:20 +0300",
        "Message-Id": "<20220701084521.31831-17-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 16/17] py: simple-cam.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-cam.py | 17 +++++++++--------\n 1 file changed, 9 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/src/py/examples/simple-cam.py b/src/py/examples/simple-cam.py\nindex 1cd1019d..2dcf962a 100755\n--- a/src/py/examples/simple-cam.py\n+++ b/src/py/examples/simple-cam.py\n@@ -19,16 +19,17 @@ TIMEOUT_SEC = 3\n \n \n def handle_camera_event(cm):\n-    # cm.get_ready_requests() returns the ready requests, which in our case\n-    # should almost always return a single Request, but in some cases there\n-    # could be multiple or none.\n+    # cm.get_events() returns the ready events, which in our case should\n+    # almost always return a single RequestCompleted event, but in some\n+    # cases there could be multiple or none.\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-    # Process the captured frames\n-\n-    for req in reqs:\n-        process_request(req)\n+        # Process the captured frames\n+        process_request(ev.request)\n \n \n def process_request(request):\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "16/17"
    ]
}