summaryrefslogtreecommitdiff
path: root/include/libcamera/stream.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-07-10 12:07:19 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-07-14 16:01:03 +0300
commitf1199a1011a22f00e863473ae241c781f4bd999d (patch)
tree1201339db3d65fcd5d8ad9718c063b3abea5910e /include/libcamera/stream.h
parent99e1e786b475f3d6f4f8d9f5cd21db6c524ba60f (diff)
libcamera: buffer: Add dmabuf file descriptors
In addition to referencing buffer memory by index, add support to referencing it using dmabuf file descriptors. This will be used to reference buffer memory allocated outside of libcamera and import it. The dmabuf file descriptors are stored in an array in the Buffer class, and a new Stream::createBuffer() overload is added to construct a buffer from dmabuf file descriptor. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include/libcamera/stream.h')
-rw-r--r--include/libcamera/stream.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
index 08eb8cc7..1883d9e9 100644
--- a/include/libcamera/stream.h
+++ b/include/libcamera/stream.h
@@ -75,6 +75,7 @@ public:
Stream();
std::unique_ptr<Buffer> createBuffer(unsigned int index);
+ std::unique_ptr<Buffer> createBuffer(const std::array<int, 3> &fds);
BufferPool &bufferPool() { return bufferPool_; }
std::vector<BufferMemory> &buffers() { return bufferPool_.buffers(); }