From patchwork Mon Apr 19 13:14:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 11990 X-Patchwork-Delegate: jacopo@jmondi.org Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0C721BD814 for ; Mon, 19 Apr 2021 13:14:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B11B468831; Mon, 19 Apr 2021 15:14:28 +0200 (CEST) Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4932D6883F for ; Mon, 19 Apr 2021 15:14:22 +0200 (CEST) Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id DFFA910001E; Mon, 19 Apr 2021 13:14:21 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Mon, 19 Apr 2021 15:14:28 +0200 Message-Id: <20210419131433.22920-9-jacopo@jmondi.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419131433.22920-1-jacopo@jmondi.org> References: <20210419131433.22920-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 08/13] libcamera: buffer: Re-work setRequest() documentation X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Reviewed-by: Laurent Pinchart --- 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 &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. */