Show a patch.

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

{
    "id": 15043,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/15043/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15043/",
    "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": "<20211206105032.13876-3-david.plowman@raspberrypi.com>",
    "date": "2021-12-06T10:50:25",
    "name": "[libcamera-devel,v9,2/8] libcamera: Add ColorSpace fields to StreamConfiguration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "cf78a336651f15c101dcc5162976fbd2fd6de722",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15043/mbox/",
    "series": [
        {
            "id": 2817,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2817/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2817",
            "date": "2021-12-06T10:50:23",
            "name": "Colour spaces",
            "version": 9,
            "mbox": "https://patchwork.libcamera.org/series/2817/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15043/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15043/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 21A34BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Dec 2021 10:51:27 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2F54C60889;\n\tMon,  6 Dec 2021 11:51:26 +0100 (CET)",
            "from mail-wm1-x330.google.com (mail-wm1-x330.google.com\n\t[IPv6:2a00:1450:4864:20::330])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3984360872\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Dec 2021 11:51:22 +0100 (CET)",
            "by mail-wm1-x330.google.com with SMTP id 137so7787515wma.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 06 Dec 2021 02:51:22 -0800 (PST)",
            "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:1ce1:9965:4328:89c4])\n\tby smtp.gmail.com with ESMTPSA id\n\tr7sm10878186wrq.29.2021.12.06.02.51.21\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 06 Dec 2021 02:51:21 -0800 (PST)"
        ],
        "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=\"pz/nsoPZ\"; 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=S8VVl7/+9S4D8aM7tuAng1H4cosPqk1LN3e9Ply+FyA=;\n\tb=pz/nsoPZTNrA+iB4gG2vFGL8u54tylLEhKC6wEM9cTdD7W6d6BKpR3cbqcprZaOOP1\n\tRinK3pRsL5SvlCxjHR9s2Dk+Qy1rG+/Mp2HTfqSSG/8JtUPeQMYVggfOldg5h+rxpAme\n\tJE623mEZoOgn83XWU+mW1JZpun2f517DlPStIOJBSBTTKKMdzbo4A2V1foxwiNfbAfpl\n\tTY2sX+sCQCFnKp1C+hYziNvxVNccmKMMUtWm+wHUR9K20vOcYGeQLEpwsO4Gp6+TMdaJ\n\tGm5aVAHq+LsYVK96GFHj/A+FLw5+JfrfXTKqTfT0ziOagSbMEmHvXr8HAHs8AI+n3n+1\n\tGiCA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=S8VVl7/+9S4D8aM7tuAng1H4cosPqk1LN3e9Ply+FyA=;\n\tb=h1mCtCaM+9ETho5CKyL3LDUZTUhCJF7xQ/OpHIeUCKakl/YgSH6hCg93A8nUxYcybR\n\tdUvGn8ihJpVkjV+iiyLEp8MsgJFEHNlQ7PiOf997yqy/qcdRgwUKM1CELUEt63oic4hU\n\trJGStblYhDnu/O2xqlQ38sMVjBu/4wuDcQ3jSEKJLqY0J7f8+gxMu3/Ghgo5lEPYtZCI\n\tuBYcfR3B+oe5lYav97g/GMq8g+n65ukOywa3tnefP9Jj6Iuu101AeQck4YQT0r2A39ip\n\tUZV1Qk0Xmn9F53x8BP7HPdJz4XnFT7bmAn8zqvnH2glYJWPST/aZW0BkVIkvSxp4foTB\n\toaFA==",
        "X-Gm-Message-State": "AOAM530K0yauo8V+83RZxrrJ66oDjs/2itmaUAvHX8cBs8uHmDxJDihv\n\thatSlsA4rdk4YL311htLisjobQhVlohrkHif",
        "X-Google-Smtp-Source": "ABdhPJzDqd18HhseDaf+4MiQwDJT8dEy7O3BZ5ud3wKGODEKd4zIckwJrgvlo3Guzd5ab6yj1I2+ag==",
        "X-Received": "by 2002:a05:600c:3788:: with SMTP id\n\to8mr36845761wmr.82.1638787881790; \n\tMon, 06 Dec 2021 02:51:21 -0800 (PST)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org, naush@raspberrypi.com,\n\tjacopo@jmondi.org, tfiga@google.com, hverkuil-cisco@xs4all.nl,\n\tkieran.bingham@ideasonboard.com, laurent.pinchart@ideasonboard.com",
        "Date": "Mon,  6 Dec 2021 10:50:25 +0000",
        "Message-Id": "<20211206105032.13876-3-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20211206105032.13876-1-david.plowman@raspberrypi.com>",
        "References": "<20211206105032.13876-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v9 2/8] libcamera: Add ColorSpace fields\n\tto StreamConfiguration",
        "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": "This is so that applications can choose appropriate color spaces which\nwill then be passed down to the V4L2 devices.\n\nThe ColorSpace field is actually optional. If it is not set you will\nget the driver's default color space.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/stream.h |  3 +++\n src/libcamera/stream.cpp   | 20 ++++++++++++++++++++\n 2 files changed, 23 insertions(+)",
    "diff": "diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex 41ec02b1..f0ae7e62 100644\n--- a/include/libcamera/stream.h\n+++ b/include/libcamera/stream.h\n@@ -12,6 +12,7 @@\n #include <string>\n #include <vector>\n \n+#include <libcamera/color_space.h>\n #include <libcamera/framebuffer.h>\n #include <libcamera/geometry.h>\n #include <libcamera/pixel_format.h>\n@@ -47,6 +48,8 @@ struct StreamConfiguration {\n \n \tunsigned int bufferCount;\n \n+\tstd::optional<ColorSpace> colorSpace;\n+\n \tStream *stream() const { return stream_; }\n \tvoid setStream(Stream *stream) { stream_ = stream; }\n \tconst StreamFormats &formats() const { return formats_; }\ndiff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\nindex b421e17e..686e693b 100644\n--- a/src/libcamera/stream.cpp\n+++ b/src/libcamera/stream.cpp\n@@ -329,6 +329,26 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)\n  * \\brief Requested number of buffers to allocate for the stream\n  */\n \n+/**\n+ * \\var StreamConfiguration::colorSpace\n+ * \\brief The ColorSpace for this stream\n+ *\n+ * This field allows a ColorSpace to be selected for this Stream.\n+ *\n+ * The field is optional and an application can choose to leave it unset.\n+ * Platforms that support the use of color spaces may provide default\n+ * values through the generateConfiguration() method. An application can\n+ * override these when necessary.\n+ *\n+ * If a specific ColorSpace is requested but the Camera cannot deliver it,\n+ * then the StreamConfiguration will be adjusted to a value that can be\n+ * delivered. In this case the validate() method will indicate via its\n+ * return value that the CameraConfiguration has been adjusted.\n+ *\n+ * Note that platforms will typically have different constraints on what\n+ * color spaces can be supported and in what combinations.\n+ */\n+\n /**\n  * \\fn StreamConfiguration::stream()\n  * \\brief Retrieve the stream associated with the configuration\n",
    "prefixes": [
        "libcamera-devel",
        "v9",
        "2/8"
    ]
}