Show a patch.

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

{
    "id": 3071,
    "url": "https://patchwork.libcamera.org/api/patches/3071/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3071/",
    "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": "<20200309162414.720306-7-jacopo@jmondi.org>",
    "date": "2020-03-09T16:24:09",
    "name": "[libcamera-devel,06/11] libcamera: v4l2_controls: Cache query control information",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ebb80586485d85842caf49ee177d0945352ca749",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3071/mbox/",
    "series": [
        {
            "id": 716,
            "url": "https://patchwork.libcamera.org/api/series/716/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=716",
            "date": "2020-03-09T16:24:03",
            "name": "Adda support for V4L2 array control and strings",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/716/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3071/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3071/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6B4026293C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Mar 2020 17:21:30 +0100 (CET)",
            "from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 38EC360019\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Mar 2020 16:21:30 +0000 (UTC)"
        ],
        "X-Originating-IP": "93.34.114.233",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  9 Mar 2020 17:24:09 +0100",
        "Message-Id": "<20200309162414.720306-7-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.25.0",
        "In-Reply-To": "<20200309162414.720306-1-jacopo@jmondi.org>",
        "References": "<20200309162414.720306-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 06/11] libcamera: v4l2_controls: Cache\n\tquery control information",
        "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>",
        "X-List-Received-Date": "Mon, 09 Mar 2020 16:21:32 -0000"
    },
    "content": "Cache the V4L2 control info retrieved with VIDIOC_QUERY_EXT_CTRL\nat control listing time for later use.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/include/v4l2_device.h | 1 +\n src/libcamera/v4l2_device.cpp       | 1 +\n 2 files changed, 2 insertions(+)",
    "diff": "diff --git a/src/libcamera/include/v4l2_device.h b/src/libcamera/include/v4l2_device.h\nindex 6bfddefe336c..e1fd048cc85a 100644\n--- a/src/libcamera/include/v4l2_device.h\n+++ b/src/libcamera/include/v4l2_device.h\n@@ -48,6 +48,7 @@ private:\n \t\t\t    const struct v4l2_ext_control *v4l2Ctrls,\n \t\t\t    unsigned int count);\n \n+\tstd::map<unsigned int, struct v4l2_query_ext_ctrl> ctrlsInfo_;\n \tstd::vector<std::unique_ptr<V4L2ControlId>> controlIds_;\n \tControlInfoMap controls_;\n \tstd::string deviceNode_;\ndiff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\nindex 179476e9afad..65e97f92b01f 100644\n--- a/src/libcamera/v4l2_device.cpp\n+++ b/src/libcamera/v4l2_device.cpp\n@@ -382,6 +382,7 @@ void V4L2Device::listControls()\n \n \t\tcontrolIds_.emplace_back(std::make_unique<V4L2ControlId>(ctrl));\n \t\tctrls.emplace(controlIds_.back().get(), V4L2ControlInfo(ctrl));\n+\t\tctrlsInfo_[ctrl.id] = ctrl;\n \t}\n \n \tcontrols_ = std::move(ctrls);\n",
    "prefixes": [
        "libcamera-devel",
        "06/11"
    ]
}