From patchwork Sun Oct 13 00:13:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2177 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 318EA60BE5 for ; Sun, 13 Oct 2019 02:13:49 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B099C71D for ; Sun, 13 Oct 2019 02:13:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1570925628; bh=iGAXYSGQz/pHbqbijFxRC3fjxxbT3TQFthgEcNAJP9o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AvwUT6jekB1yTE0ntviHMVsLXJs8D/GU6J3STaGuOHISHgKzJyL0TvYzY9cT3ym0U zOKngzYaQLz73Esg8NZGwkQXq6Ut7x4EAwfkpCpc85VwTP81omQVJyGl5q2sgmU7b+ 1XaO71jiVqMPGt2m82hZLkMcmlnBazsS3bvksndo= From: Laurent Pinchart 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 Subject: [libcamera-devel] [PATCH/RFC v2 1/4] libcamera: buffer: Add const accessor to Buffer planes X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2019 00:13:49 -0000 In order to inspect planes of a const Buffer, add a const accessor. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- include/libcamera/buffer.h | 1 + src/libcamera/buffer.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h index 7b657509ab5f..7a070205f0b5 100644 --- a/include/libcamera/buffer.h +++ b/include/libcamera/buffer.h @@ -43,6 +43,7 @@ private: class BufferMemory final { public: + const std::vector &planes() const { return planes_; } std::vector &planes() { return planes_; } private: diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp index 4407201bd81c..960eeb8f7d19 100644 --- a/src/libcamera/buffer.cpp +++ b/src/libcamera/buffer.cpp @@ -181,6 +181,12 @@ void *Plane::mem() * image format is multi-planar. */ +/** + * \fn BufferMemory::planes() const + * \brief Retrieve the planes within the buffer + * \return A const reference to a vector holding all Planes within the buffer + */ + /** * \fn BufferMemory::planes() * \brief Retrieve the planes within the buffer