diff options
Diffstat (limited to 'src/libcamera/buffer.cpp')
-rw-r--r-- | src/libcamera/buffer.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp index e2d1cf04..21abdcce 100644 --- a/src/libcamera/buffer.cpp +++ b/src/libcamera/buffer.cpp @@ -196,7 +196,7 @@ void *Plane::mem() */ Buffer::Buffer() - : index_(-1) + : index_(-1), request_(nullptr) { } @@ -249,6 +249,22 @@ Buffer::Buffer() */ /** + * \fn Buffer::request() + * \brief Retrieve the request this buffer belongs to + * + * The intended callers of this method are buffer completion handlers that + * need to associate a buffer to the request it belongs to. + * + * A Buffer is associated to a request by Request::prepare() and the + * association is valid until the buffer completes. The returned request + * pointer is valid only during that interval. + * + * \return The Request the Buffer belongs to, or nullptr if the buffer is + * either completed or not associated with a request + * \sa Buffer::setRequest() + */ + +/** * \brief Mark a buffer as cancel by setting its status to BufferCancelled */ void Buffer::cancel() @@ -260,6 +276,13 @@ void Buffer::cancel() } /** + * \fn Buffer::setRequest() + * \brief Set the request this buffer belongs to + * + * The intended callers are Request::prepare() and Request::completeBuffer(). + */ + +/** * \class BufferPool * \brief A pool of buffers * |