summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2023-10-13 08:48:22 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-10-18 11:01:21 +0100
commitf4839fb3a397243f1d41ceefa337dedf9bafd7e5 (patch)
tree1c9ace80d2365a3a9923abf2b9567d5b51d4344d /src/libcamera/pipeline/rpi/common/pipeline_base.cpp
parentc258302863da5fe36aba1caa82b27e9154b6c0a2 (diff)
pipeline: rpi: Add RequiresMmap flag to RPi::Stream
Add a new RequiresMmap flag to the RPi::Stream class indicating that buffers handled by the stream must be mmapped after allocation and cached internally. Add a new member function getBuffer(id) which can be used to obtain the mapped buffers for a given buffer id. Add a new member function acquireBuffer() which can be used to obtain any mapped buffer that has not already been acquired by the caller. As a drive-by, add the <algorithm> header to rpi_stream.cpp as it is needed for the std::find_if() function. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/rpi/common/pipeline_base.cpp')
-rw-r--r--src/libcamera/pipeline/rpi/common/pipeline_base.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
index fad710a6..825eae80 100644
--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
@@ -888,7 +888,7 @@ void PipelineHandlerBase::mapBuffers(Camera *camera, const BufferMap &buffers, u
*/
for (auto const &it : buffers) {
bufferIds.push_back(IPABuffer(mask | it.first,
- it.second->planes()));
+ it.second.buffer->planes()));
data->bufferIds_.insert(mask | it.first);
}