[{"id":1109,"web_url":"https://patchwork.libcamera.org/comment/1109/","msgid":"<20190323133153.GF4587@pendragon.ideasonboard.com>","date":"2019-03-23T13:31:53","subject":"Re: [libcamera-devel] [PATCH v4 17/31] libcamera: request: Add\n\tcamera() getter method","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 Wed, Mar 20, 2019 at 05:30:41PM +0100, Jacopo Mondi wrote:\n> Add a \"camera()\" getter method to the Request class to retrieve the\n> Camera instance the request has been sent to.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThe implementation looks fine. I haven't reviewed the patch(es) that\nmake use of this yet, so\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nonly if this is actually needed :-)\n\n> ---\n>  include/libcamera/request.h | 1 +\n>  src/libcamera/request.cpp   | 7 +++++++\n>  2 files changed, 8 insertions(+)\n> \n> diff --git a/include/libcamera/request.h b/include/libcamera/request.h\n> index 1bf90de2c6f9..56d179e5f2f5 100644\n> --- a/include/libcamera/request.h\n> +++ b/include/libcamera/request.h\n> @@ -35,6 +35,7 @@ public:\n>  \tint setBuffers(const std::map<Stream *, Buffer *> &streamMap);\n>  \tBuffer *findBuffer(Stream *stream) const;\n>  \tconst std::set<Stream *> &streams() const { return streams_; }\n> +\tCamera *camera() const { return camera_; }\n>  \n>  \tStatus status() const { return status_; }\n>  \n> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\n> index 22c516208ede..51ab6c4e71b2 100644\n> --- a/src/libcamera/request.cpp\n> +++ b/src/libcamera/request.cpp\n> @@ -58,6 +58,13 @@ Request::Request(Camera *camera)\n>   * \\return The set of streams contained in the request\n>   */\n>  \n> +/**\n> + * \\fn Request::camera()\n> + * \\brief Retrieve the camera the request has been sent to\n> + *\n> + * \\return Pointer to the camera instance the request has been sent to\n> + */\n> +\n>  /**\n>   * \\brief Set the streams to capture with associated buffers\n>   * \\param[in] streamMap The map of streams to buffers","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6E64B610B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 23 Mar 2019 14:32:07 +0100 (CET)","from pendragon.ideasonboard.com\n\t(p5269001-ipngn11702marunouchi.tokyo.ocn.ne.jp [114.158.195.1])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AD61E49;\n\tSat, 23 Mar 2019 14:32:05 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1553347926;\n\tbh=x/838pvzsgRoQnEMxTdtGScDAlHU67NImJOnooE3Gss=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=u0noo41Fh0DkM+e0ExaoaaqTetBKd8WYeND5KVSlKyRvveXyVEPwcEldB6N9L27F3\n\tJQDT7XR9OiGA2RmQyHhwq3OPrZ8C+of+h1FCnoLJpzNVf55bo8OWW13TrDQdixiwqz\n\tdnezUkE7g80G7/yqixpMDytxXdFz2yxoOMi2zTMw=","Date":"Sat, 23 Mar 2019 15:31:53 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190323133153.GF4587@pendragon.ideasonboard.com>","References":"<20190320163055.22056-1-jacopo@jmondi.org>\n\t<20190320163055.22056-18-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190320163055.22056-18-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v4 17/31] libcamera: request: Add\n\tcamera() getter method","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Sat, 23 Mar 2019 13:32:07 -0000"}}]