Show a patch.

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

{
    "id": 910,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/910/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/910/",
    "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": "<20190403150735.27580-6-jacopo@jmondi.org>",
    "date": "2019-04-03T15:07:32",
    "name": "[libcamera-devel,v3,5/8] libcamera: request: Add streams() method",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "bce25f9e55979aba2d6c4fecc4a842b5888ed928",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/910/mbox/",
    "series": [
        {
            "id": 239,
            "url": "https://patchwork.libcamera.org/api/1.1/series/239/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=239",
            "date": "2019-04-03T15:07:27",
            "name": "libcamera: ipu3: Multiple streams support",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/239/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/910/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/910/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[217.70.183.199])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BEE3D6110D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Apr 2019 17:06:58 +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 relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 54BE8FF806;\n\tWed,  3 Apr 2019 15:06:58 +0000 (UTC)"
        ],
        "X-Originating-IP": "2.224.242.101",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  3 Apr 2019 17:07:32 +0200",
        "Message-Id": "<20190403150735.27580-6-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190403150735.27580-1-jacopo@jmondi.org>",
        "References": "<20190403150735.27580-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 5/8] libcamera: request: Add streams()\n\tmethod",
        "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": "Wed, 03 Apr 2019 15:06:59 -0000"
    },
    "content": "Add a method to retrieve the list of streams contained in a requests.\n\nThis is useful for pipeline handler willing to cycle on all the streams\na request contains at queueRequest() time.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/request.h |  3 +++\n src/libcamera/request.cpp   | 15 +++++++++++++++\n 2 files changed, 18 insertions(+)",
    "diff": "diff --git a/include/libcamera/request.h b/include/libcamera/request.h\nindex 0dbd425115e8..5ac4d20d1d9f 100644\n--- a/include/libcamera/request.h\n+++ b/include/libcamera/request.h\n@@ -7,6 +7,7 @@\n #ifndef __LIBCAMERA_REQUEST_H__\n #define __LIBCAMERA_REQUEST_H__\n \n+#include <list>\n #include <map>\n #include <unordered_set>\n \n@@ -35,6 +36,8 @@ public:\n \tint setBuffers(const std::map<Stream *, Buffer *> &streamMap);\n \tBuffer *findBuffer(Stream *stream) const;\n \n+\tconst std::list<Stream *> streams() const;\n+\n \tStatus status() const { return status_; }\n \n private:\ndiff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\nindex e0e77e972411..3a7841fb2bb3 100644\n--- a/src/libcamera/request.cpp\n+++ b/src/libcamera/request.cpp\n@@ -93,6 +93,21 @@ Buffer *Request::findBuffer(Stream *stream) const\n \treturn it->second;\n }\n \n+/**\n+ * \\brief Retrieve the set of streams contained in the request\n+ *\n+ * \\return The set of streams contained in the request\n+ */\n+const std::list<Stream *> Request::streams() const\n+{\n+\tstd::list<Stream *> streams = {};\n+\n+\tfor (auto const &it : bufferMap_)\n+\t\tstreams.push_front(it.first);\n+\n+\treturn streams;\n+}\n+\n /**\n  * \\fn Request::status()\n  * \\brief Retrieve the request completion status\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "5/8"
    ]
}