From patchwork Fri Nov 8 20:53:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2308 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 D265F61518 for ; Fri, 8 Nov 2019 21:54:26 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 74CAC2D1 for ; Fri, 8 Nov 2019 21:54:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1573246466; bh=mUz2y97UlVf1Vpah379AqeKhS/xrm72J/EvsCEVFago=; h=From:To:Subject:Date:In-Reply-To:References:From; b=edUMUSywx2ZLFDn9x7c5+AGXKZ9mfENlqQgPaFpKkGXj9bswE5loeLauUPJVnMmI7 Pwf+16K674z0qdRU+dunHTk5NhrcInrUK/jDHEHl9WOIctZRfpbyYDKVDOj9FFv3VE MNMefzwaweiHfVvC1CO29vKdYZHU9aB17erdSRfM= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 8 Nov 2019 22:53:57 +0200 Message-Id: <20191108205409.18845-13-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108205409.18845-1-laurent.pinchart@ideasonboard.com> References: <20191108205409.18845-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 12/24] 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: Fri, 08 Nov 2019 20:54:27 -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