Show a patch.

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

{
    "id": 956,
    "url": "https://patchwork.libcamera.org/api/patches/956/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/956/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20190409192548.20325-2-jacopo@jmondi.org>",
    "date": "2019-04-09T19:25:37",
    "name": "[libcamera-devel,v4,01/12] libcamera: ipu3: Sub-class Stream with IPU3Stream",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "a15b620220d7c164df1386b36220f0f4c4a78bff",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/956/mbox/",
    "series": [
        {
            "id": 247,
            "url": "https://patchwork.libcamera.org/api/series/247/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=247",
            "date": "2019-04-09T19:25:36",
            "name": "libcamera: ipu3: Multiple streams support",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/247/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/956/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/956/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2662460004\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Apr 2019 21:25:06 +0200 (CEST)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id B649A20000B;\n\tTue,  9 Apr 2019 19:25:05 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue,  9 Apr 2019 21:25:37 +0200",
        "Message-Id": "<20190409192548.20325-2-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190409192548.20325-1-jacopo@jmondi.org>",
        "References": "<20190409192548.20325-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 01/12] libcamera: ipu3: Sub-class\n\tStream with IPU3Stream",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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>",
        "X-List-Received-Date": "Tue, 09 Apr 2019 19:25:06 -0000"
    },
    "content": "In preparation for multiple stream support provide a Stream sub-class to\nmaintain IPU3 specific data. In order to be able to sub-class Stream\nremove the 'final' specifier from the class definition and make its\nprivate members protected.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/stream.h           |  4 ++--\n src/libcamera/pipeline/ipu3/ipu3.cpp | 16 ++++++++++++++--\n 2 files changed, 16 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex d0f7b0e12485..8a47930f8614 100644\n--- a/include/libcamera/stream.h\n+++ b/include/libcamera/stream.h\n@@ -43,7 +43,7 @@ private:\n \tSize size_;\n };\n \n-class Stream final\n+class Stream\n {\n public:\n \tclass StillCapture : public StreamUsage\n@@ -68,7 +68,7 @@ public:\n \tBufferPool &bufferPool() { return bufferPool_; }\n \tconst StreamConfiguration &configuration() const { return configuration_; }\n \n-private:\n+protected:\n \tfriend class Camera;\n \n \tBufferPool bufferPool_;\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex ca09da753b90..00907bb53891 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -133,6 +133,18 @@ public:\n \tBufferPool pool_;\n };\n \n+class IPU3Stream : public Stream\n+{\n+public:\n+\tIPU3Stream()\n+\t\t: active_(false)\n+\t{\n+\t}\n+\n+\tbool active_;\n+\tstd::string name_;\n+};\n+\n class PipelineHandlerIPU3 : public PipelineHandler\n {\n public:\n@@ -171,7 +183,7 @@ private:\n \t\tCIO2Device cio2_;\n \t\tImgUDevice *imgu_;\n \n-\t\tStream stream_;\n+\t\tIPU3Stream stream_;\n \t};\n \n \tstatic constexpr unsigned int IPU3_BUFFER_COUNT = 4;\n@@ -404,7 +416,7 @@ int PipelineHandlerIPU3::queueRequest(Camera *camera, Request *request)\n {\n \tIPU3CameraData *data = cameraData(camera);\n \tV4L2Device *output = data->imgu_->output_.dev;\n-\tStream *stream = &data->stream_;\n+\tIPU3Stream *stream = &data->stream_;\n \n \t/* Queue a buffer to the ImgU output for capture. */\n \tBuffer *buffer = request->findBuffer(stream);\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "01/12"
    ]
}