Show a patch.

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

{
    "id": 14627,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14627/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14627/",
    "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": "<20211118151933.15627-3-david.plowman@raspberrypi.com>",
    "date": "2021-11-18T15:19:28",
    "name": "[libcamera-devel,v6,2/7] libcamera: Add ColorSpace fields to StreamConfiguration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "eb7f3be3c5eeb1f684a577a0c4f5d788d391d48b",
    "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/14627/mbox/",
    "series": [
        {
            "id": 2726,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2726/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2726",
            "date": "2021-11-18T15:19:26",
            "name": "Colour spaces",
            "version": 6,
            "mbox": "https://patchwork.libcamera.org/series/2726/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14627/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14627/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 5D2DABF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Nov 2021 15:20:33 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0864360371;\n\tThu, 18 Nov 2021 16:20:30 +0100 (CET)",
            "from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D6F9E6038A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Nov 2021 16:20:26 +0100 (CET)",
            "by mail-wr1-x429.google.com with SMTP id u1so12208868wru.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Nov 2021 07:20:26 -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\tp12sm147367wro.33.2021.11.18.07.20.25\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 18 Nov 2021 07:20:26 -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=\"D9pAURQ0\"; 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=kLk2z8qXqfOpGggekOhFU+kISUZcUm+8gTdLG71oWtQ=;\n\tb=D9pAURQ0CNj+Xm919iQ+lQNeDQCH3P3++ZpwvVkcTlyGu+YzBJoseGKdFHQD4zYgzp\n\tBb+5lOYEaTmlBfWy8aKCxAqTutzTPbwHIM75kyEC6YiU2REMOMVqQUXjLrB0QPh8ao79\n\tFxsn1D5Y+xg3SdQmIT0c9UjvGFZtDBxAgIPM6pn5fR9V+dKw0oDXarLcDhkNq/y4pejj\n\t22EDoJtpCVxSM9Qsr//BxCN/5ki785vDapefxotMQMxkEWA/c4Wq+QTwARKilI4ZWqrR\n\tw+trMzfM+oiQkIIc7jukkHwSHFkCqLSUqgoVTrAO6UaWBJyeymzacJo2Z1iDfafbXcz6\n\tIpVg==",
        "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=kLk2z8qXqfOpGggekOhFU+kISUZcUm+8gTdLG71oWtQ=;\n\tb=M2fNUiiTb+s5gXb8MgJDkb8V6KAYdqYuGp0hFYEKKZnzPkwmPvhxsBua+UIcDBtC0e\n\t2csOHz6SAIUsxPr3mo0cKN/DlYskQWFg1GPpBrUTsiNG+Oc2iOr9hj95frS8b89eMVoG\n\tnddBawUbwR8uf7GfwKtatxmjIm0FFDWWNRkUC+T0AFCTEFssF8WepzeUiD3hvhzpboTS\n\tT7kfaG3cuuh3PCelukvuySEIaXnZIyICeoHdSTszTg8JhfPHxZYHmbIKZ1hIMOXAE43o\n\tP4+prpVUMYsxj5to85aRTzagNedEk8Yjgpmr6TvMG2/q7Qu+zdfj5XfsfYEKbwK/btA1\n\tkywg==",
        "X-Gm-Message-State": "AOAM5328/ixlKclhP4qiOLnLeUTqUoh8M3NjfKx1ohuj81Ex1+YVKwXA\n\t2aMzSWpERpzM6a6BR+ZCjvxSEg==",
        "X-Google-Smtp-Source": "ABdhPJx/MP1iXD71qEns5O9vMKAyvBo91FlSomT9nJWbyGAmGnPqc9RGqvewbaAWWeJiNZxsTU8MMw==",
        "X-Received": "by 2002:adf:9bdb:: with SMTP id\n\te27mr32804867wrc.417.1637248826625; \n\tThu, 18 Nov 2021 07:20:26 -0800 (PST)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com,\n\thverkuil-cisco@xs4all.nl, tfiga@google.com, jacopo@jmondi.org,\n\tnaush@raspberrypi.com, libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 18 Nov 2021 15:19:28 +0000",
        "Message-Id": "<20211118151933.15627-3-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20211118151933.15627-1-david.plowman@raspberrypi.com>",
        "References": "<20211118151933.15627-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v6 2/7] 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>\n---\n include/libcamera/stream.h |  3 +++\n src/libcamera/stream.cpp   | 14 ++++++++++++++\n 2 files changed, 17 insertions(+)",
    "diff": "diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex 0c55e716..bea88eb4 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..300b3af7 100644\n--- a/src/libcamera/stream.cpp\n+++ b/src/libcamera/stream.cpp\n@@ -329,6 +329,20 @@ 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+ * A suitable color space may be set here or chosen by an application.\n+ * Alternatively the color space may be left unset, in which case it will\n+ * be up to the driver to choose a color space.\n+ *\n+ * If the system cannot deliver the requested color space, the validate()\n+ * method will overwrite the value here with what it can deliver. Note that\n+ * platforms may enforce extra contraints here, such as requiring all output\n+ * streams to share the same color space.\n+ */\n+\n /**\n  * \\fn StreamConfiguration::stream()\n  * \\brief Retrieve the stream associated with the configuration\n",
    "prefixes": [
        "libcamera-devel",
        "v6",
        "2/7"
    ]
}