{"id":22262,"url":"https://patchwork.libcamera.org/api/patches/22262/?format=json","web_url":"https://patchwork.libcamera.org/patch/22262/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20241209174806.283905-1-barnabas.pocze@ideasonboard.com>","date":"2024-12-09T17:48:01","name":"[v1,1/6] Documentation: guides: pipeline-handler: Fix camera creation","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"c75d684d9d5ebe1f0b46b79121f1f0a3e741fadd","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/?format=json","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/22262/mbox/","series":[{"id":4869,"url":"https://patchwork.libcamera.org/api/series/4869/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4869","date":"2024-12-09T17:48:01","name":"[v1,1/6] Documentation: guides: pipeline-handler: Fix camera creation","version":1,"mbox":"https://patchwork.libcamera.org/series/4869/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/22262/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/22262/checks/","tags":{},"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 2EFCFBD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Dec 2024 17:48:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 77B9467E74;\n\tMon,  9 Dec 2024 18:48:13 +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 D207966132\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Dec 2024 18:48:11 +0100 (CET)","from pb-laptop.local (185.221.143.90.nat.pool.zt.hu\n\t[185.221.143.90])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 053B1502\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Dec 2024 18:47:39 +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=\"SsihS3I5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1733766460;\n\tbh=UQIX/9EeIYX+XoqtMfPYpX56t3PKVaz3iwpJ+1qMiXY=;\n\th=From:To:Subject:Date:From;\n\tb=SsihS3I52LcL7GE5exFrYcnzWFbNHuIxW/GEft16bY3kdSmdgINIvXnbbnBnZymLS\n\tpzYn75MJCYnjHypyo75x/DR4xR0F1dWfQMbwLNZAqDQ9eETVeb1x7We10dAGX/se4q\n\tNt3wv6MvFqiTwcbvkWX4Uvh5J23a6ahO7NZwo+KE=","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[PATCH v1 1/6] Documentation: guides: pipeline-handler: Fix camera\n\tcreation","Date":"Mon,  9 Dec 2024 18:48:01 +0100","Message-ID":"<20241209174806.283905-1-barnabas.pocze@ideasonboard.com>","X-Mailer":"git-send-email 2.47.1","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","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>"},"content":"1. The unique_ptr containing the private data must be passed to\n`Camera::create()`.\n\n2. `registerCamera()` needs only the pointer to the `Camera`\n\nSigned-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(-)","diff":"diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst\nindex 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    \t/* Create and register the camera. */\n    \tstd::set<Stream *> streams{ &data->stream_ };\n-   \tconst std::string &id = data->video_->deviceName();\n-   \tstd::shared_ptr<Camera> camera = Camera::create(data.release(), id, streams);\n+   \tstd::shared_ptr<Camera> camera = Camera::create(std::move(data), data->video_->deviceName(), streams);\n    \tregisterCamera(std::move(camera));\n \n    \treturn true;\n","prefixes":["v1","1/6"]}