Show a patch.

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

{
    "id": 13764,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13764/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13764/",
    "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": "<20210908081437.4022697-6-paul.elder@ideasonboard.com>",
    "date": "2021-09-08T08:14:35",
    "name": "[libcamera-devel,v2,5/7] v4l2: v4l2_camera_proxy: Report the proper format name in enum_fmt",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4ddd30972852ce6862489d219dcff65a1e9778a1",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/13764/mbox/",
    "series": [
        {
            "id": 2497,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2497/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2497",
            "date": "2021-09-08T08:14:30",
            "name": "v4l2-compat fixes",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/2497/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13764/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13764/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 7D2FBBDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Sep 2021 08:15:03 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4B06269175;\n\tWed,  8 Sep 2021 10:15:03 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0395169171\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Sep 2021 10:15:00 +0200 (CEST)",
            "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 917EC993;\n\tWed,  8 Sep 2021 10:14:58 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"f3GqtZFA\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631088899;\n\tbh=8UMiSso+TIGsQVLvS4U0pKDQ0qeqUdJY4845Olf00d0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=f3GqtZFAoUtmfcpjMwQpZetxQyOzIZmi0GV8iq3e7le4AAVJN56mqtMetjYXIgrSP\n\teebrHaqB45prCA9er++8b1GD0sV4HmkMNmA23hORTFkScmOLmCp6WetfR5wGHZZDA4\n\tQeIyMdMEJpI5DxS3hXlvdsFAAhaekG9TNm6iFH8w=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  8 Sep 2021 17:14:35 +0900",
        "Message-Id": "<20210908081437.4022697-6-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210908081437.4022697-1-paul.elder@ideasonboard.com>",
        "References": "<20210908081437.4022697-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 5/7] v4l2: v4l2_camera_proxy: Report\n\tthe proper format name in enum_fmt",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Now that libcamera has the V4L2 format names, retrive and report those\nnames in ENUM_FMT. While at it, refactor the code slightly with\nPixelFormatInfo.\n\nThis fixes the test failures on v4l2-compliance with the v4l2\ncompatilibity layer that were observed in version v4l2-compliance\nversion 1.21.0-4838.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/v4l2/v4l2_camera_proxy.cpp | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\nindex aeffef26..5fbfcdd7 100644\n--- a/src/v4l2/v4l2_camera_proxy.cpp\n+++ b/src/v4l2/v4l2_camera_proxy.cpp\n@@ -274,13 +274,13 @@ int V4L2CameraProxy::vidioc_enum_fmt(V4L2CameraFile *file, struct v4l2_fmtdesc *\n \t\treturn -EINVAL;\n \n \tPixelFormat format = streamConfig_.formats().pixelformats()[arg->index];\n+\tconst V4L2PixelFormat &v4l2Format = V4L2PixelFormat::fromPixelFormat(format);\n \n \t/* \\todo Set V4L2_FMT_FLAG_COMPRESSED for compressed formats. */\n \targ->flags = 0;\n-\t/* \\todo Add map from format to description. */\n \tutils::strlcpy(reinterpret_cast<char *>(arg->description),\n-\t\t       \"Video Format Description\", sizeof(arg->description));\n-\targ->pixelformat = V4L2PixelFormat::fromPixelFormat(format);\n+\t\t       v4l2Format.toDescription(), sizeof(arg->description));\n+\targ->pixelformat = v4l2Format;\n \n \tmemset(arg->reserved, 0, sizeof(arg->reserved));\n \n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "5/7"
    ]
}