libcamera: MappedFrameBuffer: Latch a pointer to the framebuffer

Take a pointer to the given framebuffer as a private member for further use
in later patches.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
This commit is contained in:
Bryan O'Donoghue 2024-09-21 12:41:42 +01:00
parent d4bc61f716
commit 1142f89aae
2 changed files with 5 additions and 0 deletions

View file

@ -55,6 +55,9 @@ public:
using MapFlags = Flags<MapFlag>; using MapFlags = Flags<MapFlag>;
MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags); MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags);
private:
const FrameBuffer *buffer_;
}; };
LIBCAMERA_FLAGS_ENABLE_OPERATORS(MappedFrameBuffer::MapFlag) LIBCAMERA_FLAGS_ENABLE_OPERATORS(MappedFrameBuffer::MapFlag)

View file

@ -238,6 +238,8 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags)
planes_.emplace_back(info.address + plane.offset, plane.length); planes_.emplace_back(info.address + plane.offset, plane.length);
} }
buffer_ = buffer;
} }
} /* namespace libcamera */ } /* namespace libcamera */