summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/raspberrypi/rpi_stream.h
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2020-09-18 10:42:33 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-09-21 13:10:49 +0200
commit39798e8777b553ed9ae9863da02e16e417d8307e (patch)
treee2915e2dd0b0bc015227077851f4095cad59c7d4 /src/libcamera/pipeline/raspberrypi/rpi_stream.h
parentdd0df6d73965bc8566ad97d0e005545a71b7b409 (diff)
pipeline: ipa: raspberrypi: Handle any externally allocated FrameBuffer
Handle the case where a FrameBuffer that has been externally allocated (i.e. not through the v4l2 video device) is passed into a Request. We must store the buffer pointer in the stream internal buffer list to identify when used. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/pipeline/raspberrypi/rpi_stream.h')
-rw-r--r--src/libcamera/pipeline/raspberrypi/rpi_stream.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h
index df986367..a2c21bcd 100644
--- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h
+++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h
@@ -31,13 +31,13 @@ class RPiStream : public Stream
{
public:
RPiStream()
- : id_(RPiIpaMask::ID)
+ : id_(RPiBufferMask::ID)
{
}
RPiStream(const char *name, MediaEntity *dev, bool importOnly = false)
: external_(false), importOnly_(importOnly), name_(name),
- dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(RPiIpaMask::ID)
+ dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(RPiBufferMask::ID)
{
}
@@ -53,6 +53,9 @@ public:
const BufferMap &getBuffers() const;
int getBufferId(FrameBuffer *buffer) const;
+ void setExternalBuffer(FrameBuffer *buffer);
+ void removeExternalBuffer(FrameBuffer *buffer);
+
int prepareBuffers(unsigned int count);
int queueBuffer(FrameBuffer *buffer);
void returnBuffer(FrameBuffer *buffer);