diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-13 02:26:49 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-11-20 21:47:43 +0200 |
commit | b44cb6b5f89b7f0c7b8124a689026918116bb03c (patch) | |
tree | 9dcba1d4548bc2b4dcee352f805c71b5450c8c07 | |
parent | 6a1ff2615ba14eb70bec501270aacb531cb4c210 (diff) |
libcamera: buffer: Add const accessor to Buffer planes
In order to inspect planes of a const Buffer, add a const accessor.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
-rw-r--r-- | include/libcamera/buffer.h | 1 | ||||
-rw-r--r-- | src/libcamera/buffer.cpp | 6 |
2 files changed, 7 insertions, 0 deletions
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<Plane> &planes() const { return planes_; } std::vector<Plane> &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 @@ -182,6 +182,12 @@ void *Plane::mem() */ /** + * \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 * \return A reference to a vector holding all Planes within the buffer |