Patch Detail
Show a patch.
GET /api/1.1/patches/2267/?format=api
{ "id": 2267, "url": "https://patchwork.libcamera.org/api/1.1/patches/2267/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2267/", "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": "<20191028022525.796995-8-niklas.soderlund@ragnatech.se>", "date": "2019-10-28T02:25:20", "name": "[libcamera-devel,RFC,07/12] libcamera: buffer: Add dedicated container for buffer information", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "8f784beab8d9b6bbad52f4dbac70bd917fdea0c1", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/1.1/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2267/mbox/", "series": [ { "id": 561, "url": "https://patchwork.libcamera.org/api/1.1/series/561/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=561", "date": "2019-10-28T02:25:13", "name": "libcamera: Rework buffer API", "version": 1, "mbox": "https://patchwork.libcamera.org/series/561/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2267/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2267/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net\n\t[195.74.38.228])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AE3AE61515\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Oct 2019 03:25:54 +0100 (CET)", "from localhost.localdomain (unknown [93.2.121.143])\n\tby bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid 4240a8b0-f92a-11e9-903a-005056917f90;\n\tMon, 28 Oct 2019 03:25:50 +0100 (CET)" ], "X-Halon-ID": "4240a8b0-f92a-11e9-903a-005056917f90", "Authorized-sender": "niklas@soderlund.pp.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 28 Oct 2019 03:25:20 +0100", "Message-Id": "<20191028022525.796995-8-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.23.0", "In-Reply-To": "<20191028022525.796995-1-niklas.soderlund@ragnatech.se>", "References": "<20191028022525.796995-1-niklas.soderlund@ragnatech.se>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC 07/12] libcamera: buffer: Add dedicated\n\tcontainer for buffer information", "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>", "X-List-Received-Date": "Mon, 28 Oct 2019 02:25:55 -0000" }, "content": "The Buffer object will be split in two, one containing the memory and\none containing the information recorded from when the buffer is\ndequeued. Add a container for the later in preparation for the split.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n include/libcamera/buffer.h | 34 ++++++++++++++++++++++++++++++++++\n 1 file changed, 34 insertions(+)", "diff": "diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\nindex 54c757ef7db8b5f6..c626f669040b3c04 100644\n--- a/include/libcamera/buffer.h\n+++ b/include/libcamera/buffer.h\n@@ -105,6 +105,40 @@ private:\n \tStream *stream_;\n };\n \n+class BufferInfo\n+{\n+public:\n+\tenum Status {\n+\t\tBufferSuccess,\n+\t\tBufferError,\n+\t\tBufferCancelled,\n+\t};\n+\n+\tstruct PlaneInfo {\n+\t\tunsigned int bytesused;\n+\t};\n+\n+\tBufferInfo(Status status, unsigned int sequence, uint64_t timestamp,\n+\t\t const std::vector<PlaneInfo> &planes)\n+\t\t: status_(status), sequence_(sequence), timestamp_(timestamp),\n+\t\t planes_(planes)\n+\t{\n+\t}\n+\n+\tStatus status() const { return status_; }\n+\tunsigned int sequence() const { return sequence_; }\n+\tunsigned int timestamp() const { return timestamp_; }\n+\n+\tunsigned int planes() const { return planes_.size(); }\n+\tconst PlaneInfo &plane(unsigned int plane) const { return planes_.at(plane); }\n+\n+private:\n+\tStatus status_;\n+\tunsigned int sequence_;\n+\tuint64_t timestamp_;\n+\tstd::vector<PlaneInfo> planes_;\n+};\n+\n } /* namespace libcamera */\n \n #endif /* __LIBCAMERA_BUFFER_H__ */\n", "prefixes": [ "libcamera-devel", "RFC", "07/12" ] }