diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2022-03-25 09:08:59 +0000 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-03-28 02:16:38 +0300 |
commit | ec173ef5d31b98890bacf3e9f3d912c8a8748ec7 (patch) | |
tree | e6319d98e5e405cdeee0c0204b3a52aaf080572e /src/libcamera/pipeline/raspberrypi/rpi_stream.h | |
parent | 6ab7d87ff2e63b6eb70a006944cd5096f9f4a6f0 (diff) |
pipeline: raspberrypi: Repurpose RPi::Stream::reset()
The original use of RPi::Stream::reset() was to clear the external flag state
and free/clear out the framebuffers for the stream. However, the latter is now
done through PipelineHandlerRPi::configure(). Rework
PipelineHandlerRPi::configure() to call RPi::Stream::setExternal() instead of
RPi::Stream::reset() to achieve the same thing.
Repurpose RPi::Stream::reset() to instead reset the state of the buffer handling
logic, where all internally allocated buffers are put back into the queue of
available buffers. As such, rename the function to RPi::Stream::resetbuffers().
This resetbuffers() is now called from PipelineHandlerRPi::start(), allowing the
pipeline handler to correctly deal with start()/stop()/start() sequences and
reusing the buffers allocated on the first start().
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Tested-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/raspberrypi/rpi_stream.h')
-rw-r--r-- | src/libcamera/pipeline/raspberrypi/rpi_stream.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h index d6f49d34..c37f7e82 100644 --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h @@ -45,7 +45,7 @@ public: V4L2VideoDevice *dev() const; std::string name() const; bool isImporter() const; - void reset(); + void resetBuffers(); void setExternal(bool external); bool isExternal() const; |