Show a patch.

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

{
    "id": 25467,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25467/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25467/",
    "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": "<20251210164055.17856-3-david.plowman@raspberrypi.com>",
    "date": "2025-12-10T16:15:17",
    "name": "[02/11] libcamera: Add a direction (input or output) to the stream configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b8e316dc91e5605acb0b7a4de5310eb1803cf056",
    "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/25467/mbox/",
    "series": [
        {
            "id": 5650,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5650/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5650",
            "date": "2025-12-10T16:15:15",
            "name": "Bayer re-processing",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5650/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25467/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25467/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 29809C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 16:41:07 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C9607614C0;\n\tWed, 10 Dec 2025 17:41:06 +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 7879A6149B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 17:41:01 +0100 (CET)",
            "by mail-wm1-x330.google.com with SMTP id\n\t5b1f17b1804b1-477b198f4bcso61194715e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 08:41:01 -0800 (PST)",
            "from davidp-pi5.pitowers.org\n\t([2a00:1098:3142:1f:88ea:c658:5b20:5e46])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-47a88371e13sm1270415e9.11.2025.12.10.08.40.59\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 10 Dec 2025 08:40:59 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"b0qhvtxE\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1765384860; x=1765989660;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=uWau+eh2Ecj16as7FhmAPsEXKhyf4sxG9O0J3vJHad8=;\n\tb=b0qhvtxEwV3tEPHOuaGqc4JCeg4COoT0mettg3lqiALvL4ntKLYoeyLPYgGBNWnzZl\n\trBN8rHxgns66WbUd7l0hgnSfdQAMJ4DpvFJuPkmeMx8/aKaJrqPMtgk4ogsnv7whV/hX\n\tKmxk/isFlF/jmGdluUj6qxbDG8QRo0FTEvBcfQk23TSJHL/Xn59JyPjPHDYik9lcUXIG\n\tMkIvTOkW5nODciBxHIhkaWAmWcOHxkD9dkilqMLJs7TryEUa80/HHMsVvvfJWZt5Xh7m\n\t2clRzpyLiSy+AM53aAPdqh1w+UsPh0EJCAMHGMHJl2n/tdWtnjBArUlgxsOAN1q7QSEA\n\tIbdQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765384860; x=1765989660;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=uWau+eh2Ecj16as7FhmAPsEXKhyf4sxG9O0J3vJHad8=;\n\tb=u4YXEetuHW0Hnbjs/TKOp6t0A+cQuDWufxBnPBmig10Pk8taxWbXld5ZRZ/wZg4YFi\n\tirCIdAElsbjoW4uZ0hXxqQxSc9OwDQPxZEbLuuMCfNYL94Uhmty0bXY98OFXUnqSIwZJ\n\tjaQl5rOGz0ck1cgOuUTB3mbbLuZv1dzoKOrMMN8WsfeVY2hF+hgtx/vym3M1J874jg1m\n\tj4aLSJ2Pjw7lAZuigw9X46y+Pw3IFhALBSUTMwNAzDbTakRCe0npwSLTZKT1/nXa4IcP\n\teATLKvjzydVZMv9rwB6/5OPXiPHd9YV38HWI0UyVqnKDquh/0vPWhKP1irKFI0Ljyw/r\n\tMe4w==",
        "X-Gm-Message-State": "AOJu0YyuaxDdOcsPJ0uGlv9E2fDwY0oQkvYC0YUiFxQdgQfA15WMCdzx\n\tIM9mwTtJpOiFVk1kfenOaU8XxeWq8AT4thLmstMu/6PXJJLfAlAxzDDnX8PG2QXbhYbFPSzIqyx\n\ti9b8n",
        "X-Gm-Gg": "ASbGnctEa4+/J6oRjDV6ny6U4MMA8ZrxV4k/dQRb6JdiGXrZzGNDWqpprNp4EPspx1i\n\t1jIIK+PjqZs9fZhr09HMMZ1/JB8rHKFFEebzDKQmlTdGtV5fRbB5q2gO0M40lILKm0g8pxNMO4Q\n\t8ZDxBHQ01NIPIwJAUF25OGHQUGAx4II5zjnk7xYbnwhd4R48JS5VGrav4pMQP3vB6I+fRk1mKat\n\t0KzOJhuZcX0AHhCIWkNq8jSH8hwFs8lx+WR2+9YKcEo9LW+K8xqDEw6w858Vyusp0uLJTU2oBkq\n\tX0aLKMofzUuhbm78HICR5jHipcpexJnT94XgMOXhvmW0wQKG6yJd06C10OB1sR6WkZC1t8f8XPL\n\tjToHqWBLyAOiMC5B+wHThKWRcyo+KkgxjoRL0XE0+mIU0hiIhclM/M/nIGUVU2tDZR6Pv+1CxdW\n\tbvb+pWv5VMxrlE3VD1zryCu0MukwGqK9QXxEixm7O+6aONnjcWSNjfkt5/FLaAx9n5H8j+QfbBN\n\tqcaZc1xjtQRTk5Yrgla+euaFSsxfg==",
        "X-Google-Smtp-Source": "AGHT+IHIQwgYoQ13cFTStu76MMedA6pusDKtUegtSqJOxV5s0/BmYFX554HU5Xy5HuCFW3WYbuwmqQ==",
        "X-Received": "by 2002:a05:600c:45cd:b0:471:672:3486 with SMTP id\n\t5b1f17b1804b1-47a83759eb3mr29591035e9.15.1765384860432; \n\tWed, 10 Dec 2025 08:41:00 -0800 (PST)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "David Plowman <david.plowman@raspberrypi.com>",
        "Subject": "[PATCH 02/11] libcamera: Add a direction (input or output) to the\n\tstream configuration",
        "Date": "Wed, 10 Dec 2025 16:15:17 +0000",
        "Message-ID": "<20251210164055.17856-3-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20251210164055.17856-1-david.plowman@raspberrypi.com>",
        "References": "<20251210164055.17856-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "We are now going to support input streams as well as output streams, for\nexample for passing in a Bayer image for raw re-processing.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n include/libcamera/stream.h | 10 ++++++++++\n src/libcamera/stream.cpp   |  6 ++++--\n 2 files changed, 14 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex b5e8f0a9..39fed302 100644\n--- a/include/libcamera/stream.h\n+++ b/include/libcamera/stream.h\n@@ -37,6 +37,11 @@ private:\n \tstd::map<PixelFormat, std::vector<SizeRange>> formats_;\n };\n \n+enum class StreamDirection {\n+\tInput,\n+\tOutput\n+};\n+\n struct StreamConfiguration {\n \tStreamConfiguration();\n \tStreamConfiguration(const StreamFormats &formats);\n@@ -46,6 +51,8 @@ struct StreamConfiguration {\n \tunsigned int stride;\n \tunsigned int frameSize;\n \n+\tStreamDirection direction;\n+\n \tunsigned int bufferCount;\n \n \tstd::optional<ColorSpace> colorSpace;\n@@ -53,6 +60,8 @@ struct StreamConfiguration {\n \tStream *stream() const { return stream_; }\n \tvoid setStream(Stream *stream) { stream_ = stream; }\n \tconst StreamFormats &formats() const { return formats_; }\n+\tbool isOutput() const { return direction == StreamDirection::Output; }\n+\tbool isInput() const { return direction == StreamDirection::Input; }\n \n \tstd::string toString() const;\n \n@@ -68,6 +77,7 @@ enum class StreamRole {\n \tStillCapture,\n \tVideoRecording,\n \tViewfinder,\n+\tRawInput\n };\n \n std::ostream &operator<<(std::ostream &out, StreamRole role);\ndiff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\nindex f091487c..439c61c4 100644\n--- a/src/libcamera/stream.cpp\n+++ b/src/libcamera/stream.cpp\n@@ -280,8 +280,8 @@ SizeRange StreamFormats::range(const PixelFormat &pixelformat) const\n  * handlers provide StreamFormats.\n  */\n StreamConfiguration::StreamConfiguration()\n-\t: pixelFormat(0), stride(0), frameSize(0), bufferCount(0),\n-\t  stream_(nullptr)\n+\t: pixelFormat(0), stride(0), frameSize(0),\n+\t  direction(StreamDirection::Output), bufferCount(0), stream_(nullptr)\n {\n }\n \n@@ -409,6 +409,8 @@ std::ostream &operator<<(std::ostream &out, const StreamConfiguration &cfg)\n {\n \tout << cfg.size << \"-\" << cfg.pixelFormat << \"/\"\n \t    << ColorSpace::toString(cfg.colorSpace);\n+\tif (cfg.direction == StreamDirection::Input)\n+\t\tout << \"/in\";\n \treturn out;\n }\n \n",
    "prefixes": [
        "02/11"
    ]
}