libcamera: mapped_framebuffer: Return plane begin address by MappedBuffer::maps()

MappedBuffer::maps() returns std::vector<MappedBuffer::Plane>.
Plane has the address, but the address points the beginning of the
buffer containing the plane.
This makes the Plane point the beginning of the plane. So
MappedBuffer::maps()[i].data() returns the address of i-th plane.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Hirokazu Honda
2021-08-26 20:25:32 +09:00
committed by Laurent Pinchart
parent 86a47fdcd9
commit 8708904fad
4 changed files with 68 additions and 13 deletions
@@ -30,12 +30,14 @@ public:
bool isValid() const { return error_ == 0; }
int error() const { return error_; }
const std::vector<Plane> &maps() const { return maps_; }
/* \todo rename to planes(). */
const std::vector<Plane> &maps() const { return planes_; }
protected:
MappedBuffer();
int error_;
std::vector<Plane> planes_;
std::vector<Plane> maps_;
private: