summaryrefslogtreecommitdiff
path: root/src/libcamera/buffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/buffer.cpp')
-rw-r--r--src/libcamera/buffer.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp
index ecbf2524..99358633 100644
--- a/src/libcamera/buffer.cpp
+++ b/src/libcamera/buffer.cpp
@@ -269,7 +269,8 @@ void BufferPool::destroyBuffers()
* for a stream with Stream::createBuffer().
*/
Buffer::Buffer(unsigned int index, const Buffer *metadata)
- : index_(index), status_(Buffer::BufferSuccess), request_(nullptr),
+ : index_(index), dmabuf_({ -1, -1, -1 }),
+ status_(Buffer::BufferSuccess), request_(nullptr),
stream_(nullptr)
{
if (metadata) {
@@ -290,6 +291,16 @@ Buffer::Buffer(unsigned int index, const Buffer *metadata)
*/
/**
+ * \fn Buffer::dmabufs()
+ * \brief Retrieve the dmabuf file descriptors for all buffer planes
+ *
+ * The dmabufs array contains one dmabuf file descriptor per plane. Unused
+ * entries are set to -1.
+ *
+ * \return The dmabuf file descriptors
+ */
+
+/**
* \fn Buffer::bytesused()
* \brief Retrieve the number of bytes occupied by the data in the buffer
* \return Number of bytes occupied in the buffer