{"id":2364,"url":"https://patchwork.libcamera.org/api/patches/2364/?format=json","web_url":"https://patchwork.libcamera.org/patch/2364/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20191126233620.1695316-17-niklas.soderlund@ragnatech.se>","date":"2019-11-26T23:36:06","name":"[libcamera-devel,16/30] libcamera: buffer: Buffer remove metadata information","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"f7ecf57181d9554337f93a3a17b9659a2d503318","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/?format=json","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/2364/mbox/","series":[{"id":579,"url":"https://patchwork.libcamera.org/api/series/579/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=579","date":"2019-11-26T23:35:50","name":"libcamera: Rework buffer API","version":1,"mbox":"https://patchwork.libcamera.org/series/579/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/2364/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/2364/checks/","tags":{},"headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7421C61C95\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Nov 2019 00:39:36 +0100 (CET)","from bismarck.berto.se (p54ac5865.dip0.t-ipconnect.de\n\t[84.172.88.101]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid 0072a09f-10a6-11ea-a0b9-005056917f90;\n\tWed, 27 Nov 2019 00:39:34 +0100 (CET)"],"X-Halon-ID":"0072a09f-10a6-11ea-a0b9-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":"Wed, 27 Nov 2019 00:36:06 +0100","Message-Id":"<20191126233620.1695316-17-niklas.soderlund@ragnatech.se>","X-Mailer":"git-send-email 2.24.0","In-Reply-To":"<20191126233620.1695316-1-niklas.soderlund@ragnatech.se>","References":"<20191126233620.1695316-1-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 16/30] libcamera: buffer: Buffer remove\n\tmetadata 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":"Tue, 26 Nov 2019 23:39:37 -0000"},"content":"All metadata information is now stored in the associated BufferInfo\nobject, remove all metadata information from the Buffer object.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n include/libcamera/buffer.h | 14 ----------\n src/libcamera/buffer.cpp   | 53 +-------------------------------------\n 2 files changed, 1 insertion(+), 66 deletions(-)","diff":"diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\nindex 2e5376fb8b53a4c5..acc876eec7d93873 100644\n--- a/include/libcamera/buffer.h\n+++ b/include/libcamera/buffer.h\n@@ -105,12 +105,6 @@ private:\n class Buffer final\n {\n public:\n-\tenum Status {\n-\t\tBufferSuccess,\n-\t\tBufferError,\n-\t\tBufferCancelled,\n-\t};\n-\n \tBuffer(unsigned int index = -1, const Buffer *metadata = nullptr);\n \tBuffer(const Buffer &) = delete;\n \tBuffer &operator=(const Buffer &) = delete;\n@@ -119,12 +113,8 @@ public:\n \tconst std::array<int, 3> &dmabufs() const { return dmabuf_; }\n \tBufferMemory *mem() { return mem_; }\n \n-\tunsigned int bytesused() const { return bytesused_; }\n-\tuint64_t timestamp() const { return timestamp_; }\n-\tunsigned int sequence() const { return sequence_; }\n \tconst BufferInfo &info() const { return info_; };\n \n-\tStatus status() const { return status_; }\n \tRequest *request() const { return request_; }\n \tStream *stream() const { return stream_; }\n \n@@ -140,12 +130,8 @@ private:\n \tstd::array<int, 3> dmabuf_;\n \tBufferMemory *mem_;\n \n-\tunsigned int bytesused_;\n-\tuint64_t timestamp_;\n-\tunsigned int sequence_;\n \tBufferInfo info_;\n \n-\tStatus status_;\n \tRequest *request_;\n \tStream *stream_;\n };\ndiff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp\nindex d5a4815a0bb8c528..ab28e0d76b8c40f7 100644\n--- a/src/libcamera/buffer.cpp\n+++ b/src/libcamera/buffer.cpp\n@@ -349,20 +349,6 @@ void BufferPool::destroyBuffers()\n  * deleted automatically after the request complete handler returns.\n  */\n \n-/**\n- * \\enum Buffer::Status\n- * Buffer completion status\n- * \\var Buffer::BufferSuccess\n- * The buffer has completed with success and contains valid data. All its other\n- * metadata (such as bytesused(), timestamp() or sequence() number) are valid.\n- * \\var Buffer::BufferError\n- * The buffer has completed with an error and doesn't contain valid data. Its\n- * other metadata are valid.\n- * \\var Buffer::BufferCancelled\n- * The buffer has been cancelled due to capture stop. Its other metadata are\n- * invalid and shall not be used.\n- */\n-\n /**\n  * \\brief Construct a buffer not associated with any stream\n  *\n@@ -371,8 +357,7 @@ void BufferPool::destroyBuffers()\n  * for a stream with Stream::createBuffer().\n  */\n Buffer::Buffer(unsigned int index, const Buffer *metadata)\n-\t: index_(index), dmabuf_({ -1, -1, -1 }),\n-\t  status_(Buffer::BufferSuccess), request_(nullptr),\n+\t: index_(index), dmabuf_({ -1, -1, -1 }), request_(nullptr),\n \t  stream_(nullptr)\n {\n \tunsigned int sequence;\n@@ -420,32 +405,6 @@ Buffer::Buffer(unsigned int index, const Buffer *metadata)\n  * \\return The BufferMemory this buffer is associated with\n  */\n \n-/**\n- * \\fn Buffer::bytesused()\n- * \\brief Retrieve the number of bytes occupied by the data in the buffer\n- * \\return Number of bytes occupied in the buffer\n- */\n-\n-/**\n- * \\fn Buffer::timestamp()\n- * \\brief Retrieve the time when the buffer was processed\n- *\n- * The timestamp is expressed as a number of nanoseconds since the epoch.\n- *\n- * \\return Timestamp when the buffer was processed\n- */\n-\n-/**\n- * \\fn Buffer::sequence()\n- * \\brief Retrieve the buffer sequence number\n- *\n- * The sequence number is a monotonically increasing number assigned to the\n- * buffer processed by the stream. Gaps in the sequence numbers indicate\n- * dropped frames.\n- *\n- * \\return Sequence number of the buffer\n- */\n-\n /**\n  * \\fn Buffer::info()\n  * \\brief Retrieve the buffer metadata information\n@@ -456,16 +415,6 @@ Buffer::Buffer(unsigned int index, const Buffer *metadata)\n  * \\return Metadata of the buffer\n  */\n \n-/**\n- * \\fn Buffer::status()\n- * \\brief Retrieve the buffer status\n- *\n- * The buffer status reports whether the buffer has completed successfully\n- * (BufferSuccess) or if an error occurred (BufferError).\n- *\n- * \\return The buffer status\n- */\n-\n /**\n  * \\fn Buffer::request()\n  * \\brief Retrieve the request this buffer belongs to\n","prefixes":["libcamera-devel","16/30"]}