summaryrefslogtreecommitdiff
path: root/include/libcamera/stream.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-06-28 10:03:02 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-07-14 16:00:58 +0300
commitbe3e3ebc92d8ffba8a03483f05e7956e33726c4e (patch)
tree57a9b71ab3033d242da11449117d9100c499f2fc /include/libcamera/stream.h
parent5085bc03bc14234bced8b194f4ed61f221d81852 (diff)
libcamera: stream: Shorten access to the bufferPool
All interactions with the Stream's buffers currently go through the BufferPool. In order to shorten accessing the buffers array, and eventually restrict access to the Stream's internal buffer pool, provide operations to access, create and destroy buffers. It is still possible to access the pool for pipeline handlers to populate it by exporting buffers from a video device to Stream's pool. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include/libcamera/stream.h')
-rw-r--r--include/libcamera/stream.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
index f595a630..bc14fb60 100644
--- a/include/libcamera/stream.h
+++ b/include/libcamera/stream.h
@@ -71,11 +71,15 @@ public:
std::unique_ptr<Buffer> createBuffer(unsigned int index);
BufferPool &bufferPool() { return bufferPool_; }
+ std::vector<BufferMemory> &buffers() { return bufferPool_.buffers(); }
const StreamConfiguration &configuration() const { return configuration_; }
protected:
friend class Camera;
+ void createBuffers(unsigned int count);
+ void destroyBuffers();
+
BufferPool bufferPool_;
StreamConfiguration configuration_;
};