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>
This commit is contained in:
Laurent Pinchart 2019-10-13 02:26:49 +03:00
parent 6a1ff2615b
commit b44cb6b5f8
2 changed files with 7 additions and 0 deletions

View file

@ -40,6 +40,7 @@ private:
class BufferMemory final class BufferMemory final
{ {
public: public:
const std::vector<Plane> &planes() const { return planes_; }
std::vector<Plane> &planes() { return planes_; } std::vector<Plane> &planes() { return planes_; }
private: private:

View file

@ -181,6 +181,12 @@ void *Plane::mem()
* image format is multi-planar. * 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() * \fn BufferMemory::planes()
* \brief Retrieve the planes within the buffer * \brief Retrieve the planes within the buffer