Show a patch.

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

{
    "id": 16922,
    "url": "https://patchwork.libcamera.org/api/patches/16922/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16922/",
    "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": "<20220802194705.7539-1-laurent.pinchart@ideasonboard.com>",
    "date": "2022-08-02T19:47:05",
    "name": "[libcamera-devel] libcamera: v4l2_pixelformat: Implement std::hash specialization",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "44bc7635e99cfe22550adb7b1cb67cffe05d6267",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16922/mbox/",
    "series": [
        {
            "id": 3361,
            "url": "https://patchwork.libcamera.org/api/series/3361/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3361",
            "date": "2022-08-02T19:47:05",
            "name": "[libcamera-devel] libcamera: v4l2_pixelformat: Implement std::hash specialization",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3361/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16922/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16922/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 B4589BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Aug 2022 19:47:13 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2D8106330E;\n\tTue,  2 Aug 2022 21:47:13 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 764BD603E7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Aug 2022 21:47:11 +0200 (CEST)",
            "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DBDF425B;\n\tTue,  2 Aug 2022 21:47:10 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659469633;\n\tbh=EopRhHjvPKB9opT4RoFxUktky+Bv+x8h5Yd1aT9MCSU=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=ePTXOY6l2N/S6l+wk92f/p9QKCGkl/Do6Ipev2mdkYnbp96uGY+YwJJCH5SkX2uxb\n\tb6A7rDT7JKqVqQ6426dUmExJXtLoi1qqFRWALr0zf2YNH25ui8ZmYelVVl3Jjb0BMP\n\tsXZRYHj/qE8o5YwNrKtl0VT2IYQZ9zjrJ4nQ4mIF2R1psYp/dkXBFAGEL7gspyiups\n\tS+chWzhpJ9XpYd9vDhi/XGypL7jwtDVNm6+friYJKk2ExUYTnDTIlAPzmzr5fZniyc\n\t4NsMe6qhB2/Geb7RqgvIkz2FWMKUp1Ejg8d8Q9fRTeMyj0eOajMU4Gu4ubRypsTynS\n\tyXpHz+lEjqRKQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659469631;\n\tbh=EopRhHjvPKB9opT4RoFxUktky+Bv+x8h5Yd1aT9MCSU=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=aqCM6HtaDp1fnrhd+yzbi+TADXUAleqSJNkEf6I8f79uN3aYk1Yp+hM4FGPgHWYde\n\tjpNWkmoYzCBLX8EJ7n0s7zegiW793wLcXibLBOz0Ewsf/uo2IGh4ehX/5LkJ4LG4vw\n\t/pOeZiBCIwmUo6Lu7p8W7HVbbs2ujLzMNh6Uc8/g="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"aqCM6Hta\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  2 Aug 2022 22:47:05 +0300",
        "Message-Id": "<20220802194705.7539-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] libcamera: v4l2_pixelformat: Implement\n\tstd::hash specialization",
        "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": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Inject a specialization of std::hash<> for the V4L2PixelFormat class in\nthe std namespace to make it possible to store instances of the class in\nthe std::unordered_map and std::unordered_set containers.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/internal/v4l2_pixelformat.h | 13 +++++++++++++\n 1 file changed, 13 insertions(+)",
    "diff": "diff --git a/include/libcamera/internal/v4l2_pixelformat.h b/include/libcamera/internal/v4l2_pixelformat.h\nindex d5400f90a67e..fcc1dadd4de0 100644\n--- a/include/libcamera/internal/v4l2_pixelformat.h\n+++ b/include/libcamera/internal/v4l2_pixelformat.h\n@@ -8,6 +8,7 @@\n \n #pragma once\n \n+#include <functional>\n #include <ostream>\n #include <stdint.h>\n #include <string>\n@@ -55,3 +56,15 @@ private:\n std::ostream &operator<<(std::ostream &out, const V4L2PixelFormat &f);\n \n } /* namespace libcamera */\n+\n+namespace std {\n+\n+template<>\n+struct hash<libcamera::V4L2PixelFormat> {\n+\tsize_t operator()(libcamera::V4L2PixelFormat const &format) const noexcept\n+\t{\n+\t\treturn hash<uint32_t>{}(format.fourcc());\n+\t}\n+};\n+\n+} /* namespace std */\n",
    "prefixes": [
        "libcamera-devel"
    ]
}