Show a patch.

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

{
    "id": 14975,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14975/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14975/",
    "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": "<20211201154434.23127-3-david.plowman@raspberrypi.com>",
    "date": "2021-12-01T15:44:28",
    "name": "[libcamera-devel,v8,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/14975/mbox/",
    "series": [
        {
            "id": 2797,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2797/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2797",
            "date": "2021-12-01T15:44:26",
            "name": "Colour spaces",
            "version": 8,
            "mbox": "https://patchwork.libcamera.org/series/2797/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14975/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14975/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 78FE8C3250\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  1 Dec 2021 15:45:07 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2E1B9607E3;\n\tWed,  1 Dec 2021 16:45:07 +0100 (CET)",
            "from mail-wr1-x430.google.com (mail-wr1-x430.google.com\n\t[IPv6:2a00:1450:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AE4F3607BD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  1 Dec 2021 16:45:04 +0100 (CET)",
            "by mail-wr1-x430.google.com with SMTP id l16so53220883wrp.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 01 Dec 2021 07:45:04 -0800 (PST)",
            "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:e4a2:3070:eea4:e434])\n\tby smtp.gmail.com with ESMTPSA id\n\ty7sm148209wrw.55.2021.12.01.07.45.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 01 Dec 2021 07:45:03 -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=\"qroTas8c\"; 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=eq/N2vQlsBncc36dYA90+vuvH+H4tIw8Sag0Uta/y1A=;\n\tb=qroTas8c94LB82l4oPAZAbO1qisqadcYrQf9CDQy9I0GUt/n8EKAhpj0lc2C3alqKZ\n\tJsHMOCr3vq9ndsi4PqFJ1lzNDm6HQGxEVEpd7sU/+Z1UhvTTKRBZ0qWVjWNsO4ocZu5Q\n\t2II5Qgpv2gW9ovuC4wAQ6qf5ocusky5+OHJ8xzDeC8ePg1ofSZalXD5iZfY12FwyCGD7\n\tg/Z0O2RLWItIY7b/h3QB5hDPJi6zLYrsC63PkJPljP5Kz/aTNy7sg14gHGx3kKX2hpWp\n\tYiOvBhAegjKtQy8qZED+XpLzWQxqGg8vLnargfbwKc9OQLkOUT972l0EiU2QWBU6MSLe\n\tzMqw==",
        "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=eq/N2vQlsBncc36dYA90+vuvH+H4tIw8Sag0Uta/y1A=;\n\tb=hnhpv3yMox3My+ZeKCuaA/V9caP2wqJo2Bm5mLF7EsFugnq27T35eG6DPDX4PvDsIp\n\tZd6V1pdhZVRSMD8pAry7Ujsi7LyZ1W0gPnSIARWIf+nSsXNeJYwp3FW+AO9JPJ4LnT59\n\tn7w2m1QOGV1oEm0wSc2896rTsfiGz47PZa6CH0J6UwpIdNMG0u75DMXnZTaeQdlmnYBY\n\tgIbXMVmVu1EVFAomwCzIxKSPoRqYvEcxhZmkcCaly5W1bdRDd/7XB1sLKykfdnZ2alnE\n\t105qygs0S3z/pqMb0Y2+89+6mWd8IappG8JcARQRXfQ3J0i/HOEd1nYtm29fG0yWk6iK\n\tZlJw==",
        "X-Gm-Message-State": "AOAM533UGpo4G2oOtlYmf+bJoTekV/WIq6NCbwlX6uwkP+SdOyvmpHPD\n\tynLZs9mjEH9s3KMhyDHxwXeKl/u5pLAS1wji",
        "X-Google-Smtp-Source": "ABdhPJwlg5w/bwXue5WouxLniJtL5LkPs+Ar4Csk0cPIBfXGtzPIIreFcKQin5YNlpBtLwtuBvMMbA==",
        "X-Received": "by 2002:a05:6000:118a:: with SMTP id\n\tg10mr7917833wrx.533.1638373504065; \n\tWed, 01 Dec 2021 07:45:04 -0800 (PST)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tJacopo Mondi <jacopo@jmondi.org>,\n\tHans Verkuil <hverkuil-cisco@xs4all.nl>, \n\tTomasz Figa <tfiga@google.com>, Naushir Patuck <naush@raspberrypi.com>",
        "Date": "Wed,  1 Dec 2021 15:44:28 +0000",
        "Message-Id": "<20211201154434.23127-3-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20211201154434.23127-1-david.plowman@raspberrypi.com>",
        "References": "<20211201154434.23127-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v8 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",
        "v8",
        "2/8"
    ]
}