[{"id":32653,"web_url":"https://patchwork.libcamera.org/comment/32653/","msgid":"<173383775690.3135963.10195011949769734134@ping.linuxembedded.co.uk>","date":"2024-12-10T13:35:56","subject":"Re: [PATCH v1 1/6] Documentation: guides: pipeline-handler: Fix\n\tcamera creation","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2024-12-09 17:48:01)\n> 1. The unique_ptr containing the private data must be passed to\n> `Camera::create()`.\n> \n> 2. `registerCamera()` needs only the pointer to the `Camera`\n> \n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  Documentation/guides/pipeline-handler.rst | 7 +++----\n>  1 file changed, 3 insertions(+), 4 deletions(-)\n> \n> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst\n> index 69e832a55..94527c401 100644\n> --- a/Documentation/guides/pipeline-handler.rst\n> +++ b/Documentation/guides/pipeline-handler.rst\n> @@ -527,8 +527,8 @@ PipelineHandler successfully matched and constructed a device.\n>  .. code-block:: cpp\n>  \n>     std::set<Stream *> streams{ &data->stream_ };\n> -   std::shared_ptr<Camera> camera = Camera::create(this, data->video_->deviceName(), streams);\n> -   registerCamera(std::move(camera), std::move(data));\n> +   std::shared_ptr<Camera> camera = Camera::create(std::move(data), data->video_->deviceName(), streams);\n> +   registerCamera(std::move(camera));\n>  \n>     return true;\n>  \n> @@ -554,8 +554,7 @@ Our match function should now look like the following:\n>  \n>         /* Create and register the camera. */\n>         std::set<Stream *> streams{ &data->stream_ };\n> -       const std::string &id = data->video_->deviceName();\n> -       std::shared_ptr<Camera> camera = Camera::create(data.release(), id, streams);\n> +       std::shared_ptr<Camera> camera = Camera::create(std::move(data), data->video_->deviceName(), streams);\n>         registerCamera(std::move(camera));\n>  \n>         return true;\n> -- \n> 2.47.1\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 6E633BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 Dec 2024 13:36:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2CF5967E81;\n\tTue, 10 Dec 2024 14:36:01 +0100 (CET)","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 C3CA8618AF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 Dec 2024 14:35:59 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6A2A6752;\n\tTue, 10 Dec 2024 14:35:27 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"XX2iXO3/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1733837727;\n\tbh=1vXSngxGN4Deeu4mKst1aPWYcbWcrBtZfgrCGuTONTs=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=XX2iXO3/lzdTzIiT9hsizGL2/SNbcd/Ne700F60AJBCbTrI8jAQc6j9iHLAFRJJ0y\n\tw/IqCPuFeFK0YEH8dHBae9bdQ5tAFvNDeMumZqGCF8odJ2P5YhF1h1TPXSd3edDQtm\n\tH5g8vYGo3jB9jMD14v+Rq+2zkpQt7VBW9d9txWsU=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20241209174806.283905-1-barnabas.pocze@ideasonboard.com>","References":"<20241209174806.283905-1-barnabas.pocze@ideasonboard.com>","Subject":"Re: [PATCH v1 1/6] Documentation: guides: pipeline-handler: Fix\n\tcamera creation","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 10 Dec 2024 13:35:56 +0000","Message-ID":"<173383775690.3135963.10195011949769734134@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]