Show a patch.

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

{
    "id": 24517,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/24517/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24517/",
    "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": "<20250930122726.1837524-19-stefan.klug@ideasonboard.com>",
    "date": "2025-09-30T12:26:39",
    "name": "[v1,18/33] libcamera: converter: converter_v4l2_m2m: Add makeStream() function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "157337ecaa149bddd40d60e3f64cee65b8b700af",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/24517/mbox/",
    "series": [
        {
            "id": 5468,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5468/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5468",
            "date": "2025-09-30T12:26:21",
            "name": "Full dewarper support on imx8mp",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5468/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/24517/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24517/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 D08ECC324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Sep 2025 13:11:00 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0195B69367;\n\tTue, 30 Sep 2025 15:11:00 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E202362C35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Sep 2025 15:10:57 +0200 (CEST)",
            "from ideasonboard.com (unknown [94.31.94.171])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 92E05BB;\n\tTue, 30 Sep 2025 15:09:29 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"d9BLLIo/\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1759237769;\n\tbh=R98BKcwzCyJIp3s8sEmNrjCk4iXFa/wrxpA4wKiYe7M=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=d9BLLIo/eXLYxbY/euM/v+OA8+YRU2poWpVKKv+B9ncSMWmt2EQfD/68eUeJPAxwk\n\thrP9W6tLXi8DiXAp73L2+d0HmkLJxQUCpkwukwIEauPYO8+Z3FEj9QqjmfJ0wIuzZX\n\tDOu0tUlZ36aKmS4uGN073/7pdtUo7Yv4JcdFz8Fc=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "Subject": "[PATCH v1 18/33] libcamera: converter: converter_v4l2_m2m: Add\n\tmakeStream() function",
        "Date": "Tue, 30 Sep 2025 14:26:39 +0200",
        "Message-ID": "<20250930122726.1837524-19-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.48.1",
        "In-Reply-To": "<20250930122726.1837524-1-stefan.klug@ideasonboard.com>",
        "References": "<20250930122726.1837524-1-stefan.klug@ideasonboard.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": "Add a makeStream() function that is called by the converter to create a\ncorresponding stream. This can be overwritten by subclasses to be able\nto implement a custom stream type.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n include/libcamera/internal/converter/converter_v4l2_m2m.h | 2 ++\n src/libcamera/converter/converter_v4l2_m2m.cpp            | 8 ++++++--\n 2 files changed, 8 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/converter/converter_v4l2_m2m.h b/include/libcamera/internal/converter/converter_v4l2_m2m.h\nindex 615369c1a167..033c4ba42292 100644\n--- a/include/libcamera/internal/converter/converter_v4l2_m2m.h\n+++ b/include/libcamera/internal/converter/converter_v4l2_m2m.h\n@@ -127,6 +127,8 @@ protected:\n \tSize adjustSizes(const Size &size, const std::vector<SizeRange> &ranges,\n \t\t\t Alignment align);\n \n+\tvirtual std::unique_ptr<V4L2M2MStream> makeStream(const Stream *stream);\n+\n \tstd::unique_ptr<V4L2M2MDevice> m2m_;\n \n \tstd::map<const Stream *, std::unique_ptr<V4L2M2MStream>> streams_;\ndiff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp\nindex 43379b31881d..d6b95fbe9105 100644\n--- a/src/libcamera/converter/converter_v4l2_m2m.cpp\n+++ b/src/libcamera/converter/converter_v4l2_m2m.cpp\n@@ -548,8 +548,7 @@ int V4L2M2MConverter::configure(const StreamConfiguration &inputCfg,\n \n \tfor (unsigned int i = 0; i < outputCfgs.size(); ++i) {\n \t\tconst StreamConfiguration &cfg = outputCfgs[i];\n-\t\tstd::unique_ptr<V4L2M2MStream> stream =\n-\t\t\tstd::make_unique<V4L2M2MStream>(this, cfg.stream());\n+\t\tstd::unique_ptr<V4L2M2MStream> stream = makeStream(cfg.stream());\n \n \t\tif (!stream->isValid()) {\n \t\t\tLOG(Converter, Error)\n@@ -796,6 +795,11 @@ bool V4L2M2MConverter::supportsRequests()\n \treturn ret;\n }\n \n+std::unique_ptr<V4L2M2MConverter::V4L2M2MStream> V4L2M2MConverter::makeStream(const Stream *stream)\n+{\n+\treturn std::make_unique<V4L2M2MConverter::V4L2M2MStream>(this, stream);\n+}\n+\n /*\n  * \\todo This should be extended to include Feature::Flag to denote\n  * what each converter supports feature-wise.\n",
    "prefixes": [
        "v1",
        "18/33"
    ]
}