Show a patch.

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

{
    "id": 529,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/529/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/529/",
    "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": "<20190206060818.13907-15-laurent.pinchart@ideasonboard.com>",
    "date": "2019-02-06T06:08:05",
    "name": "[libcamera-devel,14/27] libcamera: stream: Add stream configuration to the stream object",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "877ad84110198d4219587969b71101f8aa8bab1d",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/529/mbox/",
    "series": [
        {
            "id": 170,
            "url": "https://patchwork.libcamera.org/api/1.1/series/170/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=170",
            "date": "2019-02-06T06:07:51",
            "name": "Capture frames throught requests",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/170/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/529/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/529/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF08961031\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Feb 2019 07:08:26 +0100 (CET)",
            "from pendragon.ideasonboard.com (d51A4137F.access.telenet.be\n\t[81.164.19.127])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5C5BE2D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Feb 2019 07:08:26 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1549433306;\n\tbh=jgbIrKU/oRcUzCL3uuRTA+xd+WvGgv6wQGZZkBzYs7A=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=TyBOVN25Fd3HZs2XAQoaNbHTCcDQEybGgYErUvaiXQMkwEijE06VEapfzmh8x1/dU\n\tac9nGrQsyqd1SN5Q8T2+mXRd4lQwws8DqlPssjKW/NUwb7OEhfYI9h5zXR8417mRhl\n\tvy0LHhTuxqx1hho2eWixHIDdh0zcpfHGH8CqrrDg=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  6 Feb 2019 08:08:05 +0200",
        "Message-Id": "<20190206060818.13907-15-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.19.2",
        "In-Reply-To": "<20190206060818.13907-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20190206060818.13907-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 14/27] libcamera: stream: Add stream\n\tconfiguration to the stream object",
        "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, 06 Feb 2019 06:08:29 -0000"
    },
    "content": "From: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\nAdd a cache of the active stream configuration to the stream object.\nThis cache is to be updated from the Camera object and can be accessed\nread only from both the application and pipeline handlers.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/stream.h | 20 ++++++++----\n src/libcamera/stream.cpp   | 62 +++++++++++++++++++++-----------------\n 2 files changed, 48 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex 111f2c933efa..3e8e83a2ff24 100644\n--- a/include/libcamera/stream.h\n+++ b/include/libcamera/stream.h\n@@ -11,23 +11,31 @@\n \n namespace libcamera {\n \n+class Camera;\n+\n+struct StreamConfiguration {\n+\tunsigned int width;\n+\tunsigned int height;\n+\tunsigned int pixelFormat;\n+\n+\tunsigned int bufferCount;\n+};\n+\n class Stream final\n {\n public:\n \tStream();\n \tBufferPool &bufferPool() { return bufferPool_; }\n+\tconst StreamConfiguration &configuration() const { return configuration_; }\n \n private:\n+\tfriend Camera;\n+\n \tBufferPool bufferPool_;\n+\tStreamConfiguration configuration_;\n };\n \n-struct StreamConfiguration {\n-\tunsigned int width;\n-\tunsigned int height;\n-\tunsigned int pixelFormat;\n \n-\tunsigned int bufferCount;\n-};\n \n } /* namespace libcamera */\n \ndiff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\nindex b6238946a8d5..c4943c91b2e6 100644\n--- a/src/libcamera/stream.cpp\n+++ b/src/libcamera/stream.cpp\n@@ -29,6 +29,37 @@\n \n namespace libcamera {\n \n+/**\n+ * \\struct StreamConfiguration\n+ * \\brief Configuration parameters for a stream\n+ *\n+ * The StreamConfiguration structure models all information which can be\n+ * configured for a single video stream.\n+ */\n+\n+/**\n+ * \\var StreamConfiguration::width\n+ * \\brief Stream width in pixels\n+ */\n+\n+/**\n+ * \\var StreamConfiguration::height\n+ * \\brief Stream height in pixels\n+ */\n+\n+/**\n+ * \\var StreamConfiguration::pixelFormat\n+ * \\brief Stream pixel format\n+ *\n+ * This is a little endian four character code representation of the pixel\n+ * format described in V4L2 using the V4L2_PIX_FMT_* definitions.\n+ */\n+\n+/**\n+ * \\var StreamConfiguration::bufferCount\n+ * \\brief Requested number of buffers to allocate for the stream\n+ */\n+\n /**\n  * \\class Stream\n  * \\brief Video stream for a camera\n@@ -66,34 +97,9 @@ Stream::Stream()\n  */\n \n /**\n- * \\struct StreamConfiguration\n- * \\brief Configuration parameters for a stream\n- *\n- * The StreamConfiguration structure models all information which can be\n- * configured for a single video stream.\n- */\n-\n-/**\n- * \\var StreamConfiguration::width\n- * \\brief Stream width in pixels\n- */\n-\n-/**\n- * \\var StreamConfiguration::height\n- * \\brief Stream height in pixels\n- */\n-\n-/**\n- * \\var StreamConfiguration::pixelFormat\n- * \\brief Stream pixel format\n- *\n- * This is a little endian four character code representation of the pixel\n- * format described in V4L2 using the V4L2_PIX_FMT_* definitions.\n- */\n-\n-/**\n- * \\var StreamConfiguration::bufferCount\n- * \\brief Requested number of buffers to allocate for the stream\n+ * \\fn Stream::configuration()\n+ * \\brief Retrieve the active configuration of the stream\n+ * \\return The active configuration of the stream\n  */\n \n } /* namespace libcamera */\n",
    "prefixes": [
        "libcamera-devel",
        "14/27"
    ]
}