From b44cb6b5f89b7f0c7b8124a689026918116bb03c Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 13 Oct 2019 02:26:49 +0300 Subject: libcamera: buffer: Add const accessor to Buffer planes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to inspect planes of a const Buffer, add a const accessor. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- 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 c349b995..80602124 100644 --- a/include/libcamera/buffer.h +++ b/include/libcamera/buffer.h @@ -40,6 +40,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 4407201b..960eeb8f 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 -- cgit v1.2.1