[libcamera-devel] [PATCH 08/13] libcamera: buffer: Re-work setRequest() documentation

Jacopo Mondi jacopo at jmondi.org
Mon Apr 19 15:14:28 CEST 2021


I got fooled by the documentation of setRequest() implying that the
function is meant to be called by pipeline handlers only, which it is
used in the Request class at Request::addBuffer() and Request::reuse()
time.

Expand the documentation to report that.

Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
 src/libcamera/buffer.cpp | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp
index 75b2693281a7..d8036ebec63e 100644
--- a/src/libcamera/buffer.cpp
+++ b/src/libcamera/buffer.cpp
@@ -191,8 +191,15 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
  * \brief Set the request this buffer belongs to
  * \param[in] request Request to set
  *
- * The intended callers of this method are pipeline handlers and only for
- * buffers that are internal to the pipeline.
+ * This method is also used to associate a buffer with the Request it belongs
+ * to, so that it can be retrieved through FrameBuffer::request().
+ *
+ * This method is used by Request::addBuffer(), when an application facing
+ * buffer is first added to the Request, and when the Request is reused with
+ * Request::reuse().
+ *
+ * For buffers that are internal to the pipeline the intended callers of this
+ * method are pipeline handlers.
  *
  * \todo Shall be hidden from applications with a d-pointer design.
  */
-- 
2.31.1



More information about the libcamera-devel mailing list