Show a patch.

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

{
    "id": 9428,
    "url": "https://patchwork.libcamera.org/api/patches/9428/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/9428/",
    "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": "<20200829115429.30010-3-david.plowman@raspberrypi.com>",
    "date": "2020-08-29T11:54:23",
    "name": "[libcamera-devel,v5,2/8] libcamera: Allow access to v4l2_query_ext_ctrl structure for a V4L2 control",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "e8e2a048b85714df8661e2b4a0fe330921f7d1c2",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/9428/mbox/",
    "series": [
        {
            "id": 1252,
            "url": "https://patchwork.libcamera.org/api/series/1252/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1252",
            "date": "2020-08-29T11:54:21",
            "name": "2D transforms",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/1252/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/9428/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/9428/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 EE7ABBF019\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 29 Aug 2020 11:54:38 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BB5F16292D;\n\tSat, 29 Aug 2020 13:54:38 +0200 (CEST)",
            "from mail-wr1-x442.google.com (mail-wr1-x442.google.com\n\t[IPv6:2a00:1450:4864:20::442])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4952262920\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Aug 2020 13:54:36 +0200 (CEST)",
            "by mail-wr1-x442.google.com with SMTP id f7so1579457wrw.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Aug 2020 04:54:36 -0700 (PDT)",
            "from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tv16sm3071523wmj.14.2020.08.29.04.54.34\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 29 Aug 2020 04:54:35 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"nga6bylE\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=+nJuZEg21MKi4Uhs6WPxSDSjqeKRFDsK98iClUN++28=;\n\tb=nga6bylEhon7ah3PjG7rIDg1Ogoz6v8snI9rzu9Y+30tEwUjK9LjN65dmM50TXoshi\n\tjPESaesPbpppo7TLM/bQLDfWSSr7YqVFnLpd0U1gDZ/gHS2G6/9Z3svRf3a5gIQAkB2W\n\tTTV0YDsRUifMHbbBrJ+vZigVA5CZfkd/IoGfU2uyOWMiLLqHEiwFuhIuBsXOvjUAr0vj\n\tddhLtp5LBnDYaLtb5VHVEzb1G2mpLTe8pkhVhG/5O4Evuh/Rdc46FjoE9bPaMp8dUCuO\n\tsWGiwIgXZNM9AP3QFud+ZSxjVXi9ZHJT55922efUR6I4ZpPyh3yD2Vv4jJA60GwnTHus\n\t3C5g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=+nJuZEg21MKi4Uhs6WPxSDSjqeKRFDsK98iClUN++28=;\n\tb=FASM7CWLDjnLPswUG6U4gLLMyJfTeIu0tanui/lSBhN8kLPQPKhJHrcJ9zBL/DJnFK\n\t+yaELf+eSh8RXXPUN4a9iCfMcXNL+aa5Wn4uBPsWl43xeZAEfTdUdMzsjTvxj/eZ7CgJ\n\tWjkCjyhCE2VHrZF8igjeouUzhudhAW5du6RMwrxMOuZtNDEmGrTAp8k2sF4tfAu2L6CM\n\tabjGwar/Pgpp/LvfcUL46HxNvh+ANUow0gL4fPjaOhBbg3GkD5lF5hX0JErAgUUcsGqU\n\tGGtdA0Vug/NF9d5RGpMcfAS+wsmvy2+TgioWSTMcFpGjd7yQNzIfLXaIaCeRwAIvg+Oj\n\tVnzQ==",
        "X-Gm-Message-State": "AOAM533/Imu1PXu8rNMxvL3GiO5MwYzXsACVxLamUZMe5EkHfWYNNLoJ\n\ty1ncLgQlQ9tM25NOtvgIXRX3RT4bF+z5PQ==",
        "X-Google-Smtp-Source": "ABdhPJzr1s+t1UyJD7al9OQHQYuR4bdoTOYOqhqBVnq/5/03Qn9xlbn3UedeX9j0hcLxlGtYn1WhYg==",
        "X-Received": "by 2002:a5d:5052:: with SMTP id\n\th18mr3387666wrt.156.1598702075651; \n\tSat, 29 Aug 2020 04:54:35 -0700 (PDT)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat, 29 Aug 2020 12:54:23 +0100",
        "Message-Id": "<20200829115429.30010-3-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200829115429.30010-1-david.plowman@raspberrypi.com>",
        "References": "<20200829115429.30010-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v5 2/8] libcamera: Allow access to\n\tv4l2_query_ext_ctrl structure for a V4L2 control",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The V4L2Device::queryCtrl method simply returns a pointer to the\nv4l2_query_ext_ctrl structure for the given control, which has already\nbeen retrieved and stored.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n include/libcamera/internal/v4l2_device.h |  2 ++\n src/libcamera/v4l2_device.cpp            | 15 +++++++++++++++\n 2 files changed, 17 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h\nindex 3b605aa..86dc05c 100644\n--- a/include/libcamera/internal/v4l2_device.h\n+++ b/include/libcamera/internal/v4l2_device.h\n@@ -29,6 +29,8 @@ public:\n \tControlList getControls(const std::vector<uint32_t> &ids);\n \tint setControls(ControlList *ctrls);\n \n+\tconst struct v4l2_query_ext_ctrl *queryControl(uint32_t id);\n+\n \tconst std::string &deviceNode() const { return deviceNode_; }\n \tstd::string devicePath() const;\n \ndiff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 65830d4..af48107 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -353,6 +353,21 @@ int V4L2Device::setControls(ControlList *ctrls)\n \treturn ret;\n }\n \n+/**\n+ * \\brief Return the v4l2_query_ext_ctrl information for the given control.\n+ * \\param[in] id The id number of the V4L2 control.\n+ * \\return A pointer to the v4l2_query_ext_ctrl structure for the given\n+ * control, or a null pointer if not found.\n+ */\n+const struct v4l2_query_ext_ctrl *V4L2Device::queryControl(uint32_t id)\n+{\n+\tconst auto it = controlInfo_.find(id);\n+\tif (it == controlInfo_.end())\n+\t\treturn nullptr;\n+\n+\treturn &it->second;\n+}\n+\n /**\n  * \\brief Retrieve the device path in sysfs\n  *\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "2/8"
    ]
}