Show a patch.

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

{
    "id": 9023,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/9023/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/9023/",
    "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": "<20200727162143.31317-3-kgupta@es.iitr.ac.in>",
    "date": "2020-07-27T16:21:42",
    "name": "[libcamera-devel,v4,2/3] libcamera: pixel_format: Add a function to return format based on string",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "b4be29b551c770d096bd3f7933f556bbe28f21a2",
    "submitter": {
        "id": 39,
        "url": "https://patchwork.libcamera.org/api/1.1/people/39/?format=api",
        "name": "Kaaira Gupta",
        "email": "kgupta@es.iitr.ac.in"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/9023/mbox/",
    "series": [
        {
            "id": 1153,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1153/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1153",
            "date": "2020-07-27T16:21:40",
            "name": "Enable formats lookup based on name",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/1153/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/9023/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/9023/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 1B280BD86F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jul 2020 16:22:01 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DBEA461759;\n\tMon, 27 Jul 2020 18:22:00 +0200 (CEST)",
            "from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com\n\t[IPv6:2607:f8b0:4864:20::1030])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A44F5613AA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2020 18:21:59 +0200 (CEST)",
            "by mail-pj1-x1030.google.com with SMTP id k71so9759324pje.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2020 09:21:59 -0700 (PDT)",
            "from kaaira-HP-Pavilion-Notebook ([103.113.213.178])\n\tby smtp.gmail.com with ESMTPSA id\n\tgn5sm78288pjb.23.2020.07.27.09.21.57\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 27 Jul 2020 09:21:57 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=es-iitr-ac-in.20150623.gappssmtp.com\n\theader.i=@es-iitr-ac-in.20150623.gappssmtp.com\n\theader.b=\"kwLZHoQf\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=w9eGLE0dedOumJlBcT9N4fn1cOiqA+G5CpQFzujn6Gg=;\n\tb=kwLZHoQf+fsf2oEKKAKU2/+LKo0SO8u3bcv1bP49o9CfN25C7mqq5c5/9up28yfd2g\n\tDjf5d2cN4kCDne5SFTR/eUmW4ErS80dcD3SYLzW7GUnjpFxhN6oj0u/L38nW3PktfGyG\n\tIQaN70/CsIMjmxK47hkkWezGitFjWgHs1isNqdeH0FXlwtMk8Xeysv6apyHZ/zPUboCc\n\t6uJhVGx66W5I3LOf8NzmIdpSEItZUO1KFlQ5ogrvkNrGHKoyzmZ22htPSntIUUOCUfFK\n\to6txt8Rmn3mKMtjPlLIZVGyEsm6i2x3L/rVglGzojuxckgGKQc9i3RJtPHCpJlICubmQ\n\tMR6w==",
        "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;\n\tbh=w9eGLE0dedOumJlBcT9N4fn1cOiqA+G5CpQFzujn6Gg=;\n\tb=Dn0Dg4C2rXR1Ve4tcsFQ2hLaaMq0dshiRG/dicDRLI7uRiKlph/lYmcX49vSdnezLj\n\to8/DctMsF9BjqI7BV/RUl4OQtjM3xLpXT8eT9Y4xayl7QbcnS/RprNDfRDAHRUjokQt0\n\t9lbbfF1928XsMUGxhbbri6SRkb7PC8XdascwOgjwgF2O9zZqOHEXYt7D0CL1fAND/r/R\n\tOpECHwPOd6Z8jvY/7itN6MzmA9ukqFfYnAKUHiK4ETgzLB5I6kP0vccHoO4xQnbIeksh\n\twelPOLjFvcDtzNgVOn2eMWUZ8ECFDN2PzQ+2Wrysp4piR5Iuo8x07nWYEpuS6JNg/2p1\n\tWp7Q==",
        "X-Gm-Message-State": "AOAM532F17I5/kwCGtTBL712wECScVnD7F1IJHln0cK4uC2n18x2oV0E\n\tFF3B3r/Dy+DmsLL+XWmgYhOM4g==",
        "X-Google-Smtp-Source": "ABdhPJzCrFia1VZOy46tNkaseMC1pSDvEjbPgJK76M/xcp7g6zereODJzgVcibViFEUldKukNIWSQA==",
        "X-Received": "by 2002:a17:90b:188b:: with SMTP id\n\tmn11mr49157pjb.179.1595866918296; \n\tMon, 27 Jul 2020 09:21:58 -0700 (PDT)",
        "From": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "To": "libcamera-devel@lists.libcamera.org, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, =?utf-8?q?Niklas_S=C3=B6derlund?=\n\t<niklas.soderlund@ragnatech.se>",
        "Date": "Mon, 27 Jul 2020 21:51:42 +0530",
        "Message-Id": "<20200727162143.31317-3-kgupta@es.iitr.ac.in>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200727162143.31317-1-kgupta@es.iitr.ac.in>",
        "References": "<20200727162143.31317-1-kgupta@es.iitr.ac.in>",
        "Subject": "[libcamera-devel] [PATCH v4 2/3] libcamera: pixel_format: Add a\n\tfunction to return format based on string",
        "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>",
        "Cc": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "MIME-Version": "1.0",
        "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": "Add a function which retrieves pixel format corrsponding to its name\nfrom PixelFormatInfo.\n\nSigned-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>\n---\n include/libcamera/pixel_format.h | 2 ++\n src/libcamera/pixel_format.cpp   | 9 +++++++++\n 2 files changed, 11 insertions(+)",
    "diff": "diff --git a/include/libcamera/pixel_format.h b/include/libcamera/pixel_format.h\nindex 6727315..c4ae088 100644\n--- a/include/libcamera/pixel_format.h\n+++ b/include/libcamera/pixel_format.h\n@@ -38,6 +38,8 @@ public:\n \n \tstd::string toString() const;\n \n+\tstatic PixelFormat fromString(const std::string &name);\n+\n private:\n \tuint32_t fourcc_;\n \tuint64_t modifier_;\ndiff --git a/src/libcamera/pixel_format.cpp b/src/libcamera/pixel_format.cpp\nindex 14addb5..9b07781 100644\n--- a/src/libcamera/pixel_format.cpp\n+++ b/src/libcamera/pixel_format.cpp\n@@ -130,4 +130,13 @@ std::string PixelFormat::toString() const\n \treturn info.name;\n }\n \n+/**\n+ * \\brief Retrive pixel format corresponding to the string\n+ * \\return Pixel format\n+ */\n+PixelFormat PixelFormat::fromString(const std::string &name)\n+{\n+\treturn PixelFormatInfo::info(name).format;\n+}\n+\n } /* namespace libcamera */\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "2/3"
    ]
}