{"id":2177,"url":"https://patchwork.libcamera.org/api/1.1/patches/2177/?format=json","web_url":"https://patchwork.libcamera.org/patch/2177/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20191013001340.14266-2-laurent.pinchart@ideasonboard.com>","date":"2019-10-13T00:13:37","name":"[libcamera-devel,PATCH/RFC,v2,1/4] libcamera: buffer: Add const accessor to Buffer planes","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"7958ebd827f40fe8ad1b930407f7d7292490e1c6","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/2177/mbox/","series":[{"id":532,"url":"https://patchwork.libcamera.org/api/1.1/series/532/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=532","date":"2019-10-13T00:13:36","name":"Convert IPA API to plain C","version":2,"mbox":"https://patchwork.libcamera.org/series/532/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/2177/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/2177/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 318EA60BE5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 13 Oct 2019 02:13:49 +0200 (CEST)","from pendragon.bb.dnainternet.fi\n\t(dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B099C71D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 13 Oct 2019 02:13:48 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1570925628;\n\tbh=iGAXYSGQz/pHbqbijFxRC3fjxxbT3TQFthgEcNAJP9o=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=AvwUT6jekB1yTE0ntviHMVsLXJs8D/GU6J3STaGuOHISHgKzJyL0TvYzY9cT3ym0U\n\tzOKngzYaQLz73Esg8NZGwkQXq6Ut7x4EAwfkpCpc85VwTP81omQVJyGl5q2sgmU7b+\n\t1XaO71jiVqMPGt2m82hZLkMcmlnBazsS3bvksndo=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Sun, 13 Oct 2019 03:13:37 +0300","Message-Id":"<20191013001340.14266-2-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.21.0","In-Reply-To":"<20191013001340.14266-1-laurent.pinchart@ideasonboard.com>","References":"<20191013001340.14266-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH/RFC v2 1/4] libcamera: buffer: Add const\n\taccessor to Buffer planes","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":"Sun, 13 Oct 2019 00:13:49 -0000"},"content":"In order to inspect planes of a const Buffer, add a const accessor.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/buffer.h | 1 +\n src/libcamera/buffer.cpp   | 6 ++++++\n 2 files changed, 7 insertions(+)","diff":"diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\nindex 7b657509ab5f..7a070205f0b5 100644\n--- a/include/libcamera/buffer.h\n+++ b/include/libcamera/buffer.h\n@@ -43,6 +43,7 @@ private:\n class BufferMemory final\n {\n public:\n+\tconst std::vector<Plane> &planes() const { return planes_; }\n \tstd::vector<Plane> &planes() { return planes_; }\n \n private:\ndiff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp\nindex 4407201bd81c..960eeb8f7d19 100644\n--- a/src/libcamera/buffer.cpp\n+++ b/src/libcamera/buffer.cpp\n@@ -181,6 +181,12 @@ void *Plane::mem()\n  * image format is multi-planar.\n  */\n \n+/**\n+ * \\fn BufferMemory::planes() const\n+ * \\brief Retrieve the planes within the buffer\n+ * \\return A const reference to a vector holding all Planes within the buffer\n+ */\n+\n /**\n  * \\fn BufferMemory::planes()\n  * \\brief Retrieve the planes within the buffer\n","prefixes":["libcamera-devel","PATCH/RFC","v2","1/4"]}