Show a patch.

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

{
    "id": 16407,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/16407/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16407/",
    "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": "<20220629070416.17550-2-tomi.valkeinen@ideasonboard.com>",
    "date": "2022-06-29T07:04:03",
    "name": "[libcamera-devel,v2,01/14] py: cam.py: Fix multi camera capture without -C",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "cf4b962b9a74ad5f27edb427bdb47c8bb06472f7",
    "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/16407/mbox/",
    "series": [
        {
            "id": 3230,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3230/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3230",
            "date": "2022-06-29T07:04:02",
            "name": "Python bindings event handling",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3230/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16407/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16407/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 B634FBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 Jun 2022 07:04:46 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 961A665636;\n\tWed, 29 Jun 2022 09:04:43 +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 9A46F65631\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Jun 2022 09:04:40 +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 E2FDB6D1;\n\tWed, 29 Jun 2022 09:04:39 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656486283;\n\tbh=kAL85UrCX4ZS6H5jh0S4WDQbWuTWODAQW0q+OmJ+1ng=;\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=s5oFWW9wJcV7M+Xa+WosaofnRNWibP+EmSxmnqP63YdSqNBu0zROTjkT8CJdUe+CN\n\t/hEvhaVIFi7UeeMWTVmrE5xRB5ppEkL8m1GRkcJtL7EHGrI6G/GWdjSx2n20dK70yw\n\tsSZMZa0g5kty9vPPjdWPGTqfDdZJNUzgxgcHE2kHc5KuIinSs/tnOFH6Sahr5xz0Og\n\tb6bSbvkOKrmsHXbUOOLMEP7nFzNw8QKSKHFuCwGdyHNTHjhnBz46cyXQkDzvbyf+MS\n\tzq+YBpj3oIZUcOcHeg/DSHRImFALF75UOhpt0j7yDy4w4kn2vxTd6SiQH7VTQh0IjT\n\tvgJqak6LA876g==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1656486280;\n\tbh=kAL85UrCX4ZS6H5jh0S4WDQbWuTWODAQW0q+OmJ+1ng=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Wq+zs6lXsW7fgOhcjWCKrn9opX6NDsUu/IFwlfGP3Ltf1tyEn6pw/xkYUJc3zR5sY\n\t3I84rojbEiRd/m5Ai+enYq4yADbtinRzC8+8oayrWT86hEZe+YMM4YmZ89eK2er2Gi\n\tk1oRXA+hHZZY7c0jJWcMSwJuvt/9lbpe4QRFpbYM="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Wq+zs6lX\"; 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": "Wed, 29 Jun 2022 10:04:03 +0300",
        "Message-Id": "<20220629070416.17550-2-tomi.valkeinen@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220629070416.17550-1-tomi.valkeinen@ideasonboard.com>",
        "References": "<20220629070416.17550-1-tomi.valkeinen@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 01/14] py: cam.py: Fix multi camera\n\tcapture without -C",
        "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": "-C flag is supposed to affect only the camera that was previously\ndefined in the arguments. That's not the case, and, e.g.:\n\ncam.py -c2 -C -c3\n\ncauses camera 3 to start capturing, but it stops after the initial\nRequests have been completed.\n\nFix the issue by filtering out camera contexts that do not have -C\ndefined.\n\nSigned-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/py/cam/cam.py | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/py/cam/cam.py b/src/py/cam/cam.py\nindex 2ae89fa8..8a82e092 100755\n--- a/src/py/cam/cam.py\n+++ b/src/py/cam/cam.py\n@@ -434,7 +434,10 @@ def main():\n         if args.info:\n             ctx.do_cmd_info()\n \n-    if args.capture:\n+    # Filter out capture contexts which are not marked for capture\n+    contexts = [ctx for ctx in contexts if ctx.opt_capture > 0]\n+\n+    if contexts:\n         state = CaptureState(cm, contexts)\n \n         if args.renderer == 'null':\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "01/14"
    ]
}