[{"id":16409,"web_url":"https://patchwork.libcamera.org/comment/16409/","msgid":"<YH9NW8Dbwak69qoE@pendragon.ideasonboard.com>","date":"2021-04-20T21:53:31","subject":"Re: [libcamera-devel] [PATCH 08/13] libcamera: buffer: Re-work\n\tsetRequest() documentation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Mon, Apr 19, 2021 at 03:14:28PM +0200, Jacopo Mondi wrote:\n> I got fooled by the documentation of setRequest() implying that the\n> function is meant to be called by pipeline handlers only, which it is\n> used in the Request class at Request::addBuffer() and Request::reuse()\n> time.\n\nI think it used to be called by pipeline handlers only. A Fixes: tag\ncould be useful.\n\n> Expand the documentation to report that.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/buffer.cpp | 11 +++++++++--\n>  1 file changed, 9 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp\n> index 75b2693281a7..d8036ebec63e 100644\n> --- a/src/libcamera/buffer.cpp\n> +++ b/src/libcamera/buffer.cpp\n> @@ -191,8 +191,15 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)\n>   * \\brief Set the request this buffer belongs to\n>   * \\param[in] request Request to set\n>   *\n> - * The intended callers of this method are pipeline handlers and only for\n> - * buffers that are internal to the pipeline.\n> + * This method is also used to associate a buffer with the Request it belongs\n> + * to, so that it can be retrieved through FrameBuffer::request().\n\nStarting the documentation with \"also\" is strange. s/also // should be\nenough.\n\n> + *\n> + * This method is used by Request::addBuffer(), when an application facing\n> + * buffer is first added to the Request, and when the Request is reused with\n> + * Request::reuse().\n> + *\n> + * For buffers that are internal to the pipeline the intended callers of this\n> + * method are pipeline handlers.\n\n * For buffers added to requests by applications, this method is called by\n * Request::addBuffer() or Request::reuse(). For buffers internal to pipeline\n * handlers, it is called by the pipeline handlers themselves.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>   *\n>   * \\todo Shall be hidden from applications with a d-pointer design.\n>   */","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7F1A7BDB16\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Apr 2021 21:53:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EAD6C68845;\n\tTue, 20 Apr 2021 23:53:37 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5D98A60516\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Apr 2021 23:53:36 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C4316411;\n\tTue, 20 Apr 2021 23:53:35 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"NSyxp53W\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1618955616;\n\tbh=szuh8OFtu+9ygTKMbsGrt/FwrjKUeaXEhEvQv4Br3eQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=NSyxp53W76oLuZkn/4tBYsU4AawRQI5labSi4hj/g+T1bBhYs3k4Hm/s1qu+QtQ5W\n\tZygnkNs3TVCAUEvXMXQEmpUkrjoRjkoD1pusuDHmFkYQK1COlHmnnsh5J9Iv8NaKBV\n\tOcqGi+iZt+z8S6h407EcmplHLb+OnTpGXw18ymmU=","Date":"Wed, 21 Apr 2021 00:53:31 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YH9NW8Dbwak69qoE@pendragon.ideasonboard.com>","References":"<20210419131433.22920-1-jacopo@jmondi.org>\n\t<20210419131433.22920-9-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210419131433.22920-9-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH 08/13] libcamera: buffer: Re-work\n\tsetRequest() documentation","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]