[{"id":33546,"web_url":"https://patchwork.libcamera.org/comment/33546/","msgid":"<174101238716.2914008.15274544472686722445@ping.linuxembedded.co.uk>","date":"2025-03-03T14:33:07","subject":"Re: [PATCH v2] libcamera: camera_manager: Log info message to report\n\tcamera creation","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2025-03-03 13:45:18)\n> Camera creation is one of the most important events generated by\n> libcamera, but we are completely silent about it. The lack of a log\n> message makes it more difficult to identify problems and provide\n> support. Fix it by adding an Info message that reports the camera id and\n> its pipeline handler when the camera is added.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nI think you could have kept tags...\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n> Changes since v1:\n> \n> - Move message to CameraManager class\n> ---\n>  src/libcamera/camera_manager.cpp | 4 ++++\n>  1 file changed, 4 insertions(+)\n> \n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index 87e6717ece91..942a72dcfc96 100644\n> --- a/src/libcamera/camera_manager.cpp\n> +++ b/src/libcamera/camera_manager.cpp\n> @@ -217,6 +217,10 @@ void CameraManager::Private::addCamera(std::shared_ptr<Camera> camera)\n> \n>         unsigned int index = cameras_.size() - 1;\n> \n> +       LOG(Camera, Info)\n> +               << \"Adding camera '\" << camera->id() << \"' for pipeline handler \"\n> +               << camera->_d()->pipe()->name();\n> +\n>         /* Report the addition to the public signal */\n>         CameraManager *const o = LIBCAMERA_O_PTR();\n>         o->cameraAdded.emit(cameras_[index]);\n> \n> base-commit: c0a58b97989f7d529f1469b2c2f8705ff55d3af4\n> --\n> Regards,\n> \n> Laurent Pinchart\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 1ED27C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Mar 2025 14:33:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CF4A768822;\n\tMon,  3 Mar 2025 15:33:11 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 616EA68772\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Mar 2025 15:33:10 +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 DFFB3346;\n\tMon,  3 Mar 2025 15:31:38 +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=\"NnQ2f0rd\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1741012299;\n\tbh=wx0xfeILbhfCWoWRcpUAx+hA0O0xQGddRTiegMyyDUU=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=NnQ2f0rdt5gRFSvQs/ddlsMozD+61ObUi8H7kGH/JVhplVtwFJSEo4KlKYJATJhMM\n\tbpZV2gKFeWBTR/O2jEewqxvN5PUBuPsgr7E4BAuF+aEtheOQD3kGAkdRYQgaEYFW5U\n\twgWC6Q+WuQECIqHGNWVc/FdeP/LgTREuD2SyrW9k=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250303134518.10441-1-laurent.pinchart@ideasonboard.com>","References":"<20250303134518.10441-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v2] libcamera: camera_manager: Log info message to report\n\tcamera creation","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 03 Mar 2025 14:33:07 +0000","Message-ID":"<174101238716.2914008.15274544472686722445@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>"}},{"id":33547,"web_url":"https://patchwork.libcamera.org/comment/33547/","msgid":"<d37390cf-82a1-43d8-9c5b-ab19a8950b5f@ideasonboard.com>","date":"2025-03-03T14:39:09","subject":"Re: [PATCH v2] libcamera: camera_manager: Log info message to report\n\tcamera creation","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n\n2025. 03. 03. 14:45 keltezéssel, Laurent Pinchart írta:\n> Camera creation is one of the most important events generated by\n> libcamera, but we are completely silent about it. The lack of a log\n> message makes it more difficult to identify problems and provide\n> support. Fix it by adding an Info message that reports the camera id and\n> its pipeline handler when the camera is added.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n> Changes since v1:\n> \n> - Move message to CameraManager class\n> ---\n>   src/libcamera/camera_manager.cpp | 4 ++++\n>   1 file changed, 4 insertions(+)\n> \n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index 87e6717ece91..942a72dcfc96 100644\n> --- a/src/libcamera/camera_manager.cpp\n> +++ b/src/libcamera/camera_manager.cpp\n> @@ -217,6 +217,10 @@ void CameraManager::Private::addCamera(std::shared_ptr<Camera> camera)\n> \n>   \tunsigned int index = cameras_.size() - 1;\n> \n> +\tLOG(Camera, Info)\n> +\t\t<< \"Adding camera '\" << camera->id() << \"' for pipeline handler \"\n> +\t\t<< camera->_d()->pipe()->name();\n\nI think the `camera` pointer is moved-from at this point, is it not nullptr?\nAm I missing something? If it is nullptr, then please see https://patchwork.libcamera.org/patch/22905/\napplying that first will remove the issue.\n\n\nRegards,\nBarnabás Pőcze\n\n\n> +\n>   \t/* Report the addition to the public signal */\n>   \tCameraManager *const o = LIBCAMERA_O_PTR();\n>   \to->cameraAdded.emit(cameras_[index]);\n> \n> base-commit: c0a58b97989f7d529f1469b2c2f8705ff55d3af4\n> --\n> Regards,\n> \n> Laurent Pinchart\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 848C5BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Mar 2025 14:39:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AA469687FA;\n\tMon,  3 Mar 2025 15:39:16 +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 0FB6368772\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Mar 2025 15:39:15 +0100 (CET)","from [192.168.33.24] (185.221.143.4.nat.pool.zt.hu [185.221.143.4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5EDA9346;\n\tMon,  3 Mar 2025 15:37:43 +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=\"ENowe2Wt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1741012663;\n\tbh=HbUzUJ071mc5oTYUx332nqOpjlr0hhCbDmyMzMV0RdI=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=ENowe2Wtc4ucPhFr5wp+r/AIKViw5XQzcrv9/lzSFNkWbxA0B0hPpbExaziOuz4JE\n\tOXkB8gnMVqwkZGQboPvD0sxewd1YdYSZaZCDq27MBR+0TtB9OIoIY1nWvIRVrbLg0s\n\ti+oWjFKEepwFP3sV/bUHdtDHDONHppBXhrSM7zcs=","Message-ID":"<d37390cf-82a1-43d8-9c5b-ab19a8950b5f@ideasonboard.com>","Date":"Mon, 3 Mar 2025 15:39:09 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2] libcamera: camera_manager: Log info message to report\n\tcamera creation","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20250303134518.10441-1-laurent.pinchart@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250303134518.10441-1-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}},{"id":33583,"web_url":"https://patchwork.libcamera.org/comment/33583/","msgid":"<20250305045235.GA30218@pendragon.ideasonboard.com>","date":"2025-03-05T04:52:35","subject":"Re: [PATCH v2] libcamera: camera_manager: Log info message to report\n\tcamera creation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Mar 03, 2025 at 03:39:09PM +0100, Barnabás Pőcze wrote:\n> 2025. 03. 03. 14:45 keltezéssel, Laurent Pinchart írta:\n> > Camera creation is one of the most important events generated by\n> > libcamera, but we are completely silent about it. The lack of a log\n> > message makes it more difficult to identify problems and provide\n> > support. Fix it by adding an Info message that reports the camera id and\n> > its pipeline handler when the camera is added.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> > Changes since v1:\n> > \n> > - Move message to CameraManager class\n> > ---\n> >   src/libcamera/camera_manager.cpp | 4 ++++\n> >   1 file changed, 4 insertions(+)\n> > \n> > diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> > index 87e6717ece91..942a72dcfc96 100644\n> > --- a/src/libcamera/camera_manager.cpp\n> > +++ b/src/libcamera/camera_manager.cpp\n> > @@ -217,6 +217,10 @@ void CameraManager::Private::addCamera(std::shared_ptr<Camera> camera)\n> > \n> >   \tunsigned int index = cameras_.size() - 1;\n> > \n> > +\tLOG(Camera, Info)\n> > +\t\t<< \"Adding camera '\" << camera->id() << \"' for pipeline handler \"\n> > +\t\t<< camera->_d()->pipe()->name();\n> \n> I think the `camera` pointer is moved-from at this point, is it not\n> nullptr?\n\nI completely messed up testing this patch due to a silly mistake in my\nenvironment :-/ You're absolutely right.\n\n> Am I missing something? If it is nullptr, then please see https://patchwork.libcamera.org/patch/22905/\n> applying that first will remove the issue.\n\nI've reviewed that patch. After you merge it, I'll send a v3 of this\none.\n\n> > +\n> >   \t/* Report the addition to the public signal */\n> >   \tCameraManager *const o = LIBCAMERA_O_PTR();\n> >   \to->cameraAdded.emit(cameras_[index]);\n> > \n> > base-commit: c0a58b97989f7d529f1469b2c2f8705ff55d3af4","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 78C91C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  5 Mar 2025 04:53:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2B13268779;\n\tWed,  5 Mar 2025 05:53:00 +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 4408168777\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Mar 2025 05:52:58 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A55B01047;\n\tWed,  5 Mar 2025 05:51:25 +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=\"IuiiQF2C\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1741150285;\n\tbh=x/vCnAZB3aO8bZZt2JcD+oFofz8CAs1wAr6CKKIdrUE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IuiiQF2CBn+6uKM4NKV6PXcaQrvSlzwxyLXZ80fakcRBUCmwKpkMZK8MLbceLnvf9\n\tArIqKg6EXh/0u+c2nnqfRVQHG8IMhwF6O5J34Aa9MIf9mk6LtcYQ0kF21h0+mMCJZO\n\t/q+YKq5X2wgWCPsp25m9RC1PRw+dPtSMqhzEBRM0=","Date":"Wed, 5 Mar 2025 06:52:35 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] libcamera: camera_manager: Log info message to report\n\tcamera creation","Message-ID":"<20250305045235.GA30218@pendragon.ideasonboard.com>","References":"<20250303134518.10441-1-laurent.pinchart@ideasonboard.com>\n\t<d37390cf-82a1-43d8-9c5b-ab19a8950b5f@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<d37390cf-82a1-43d8-9c5b-ab19a8950b5f@ideasonboard.com>","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>"}},{"id":34178,"web_url":"https://patchwork.libcamera.org/comment/34178/","msgid":"<8c0d7fce-c4fd-46ec-9149-5201c1b978fa@ideasonboard.com>","date":"2025-05-11T11:06:35","subject":"Re: [PATCH v2] libcamera: camera_manager: Log info message to report\n\tcamera creation","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n\n2025. 03. 05. 5:52 keltezéssel, Laurent Pinchart írta:\n> On Mon, Mar 03, 2025 at 03:39:09PM +0100, Barnabás Pőcze wrote:\n>> 2025. 03. 03. 14:45 keltezéssel, Laurent Pinchart írta:\n>>> Camera creation is one of the most important events generated by\n>>> libcamera, but we are completely silent about it. The lack of a log\n>>> message makes it more difficult to identify problems and provide\n>>> support. Fix it by adding an Info message that reports the camera id and\n>>> its pipeline handler when the camera is added.\n>>>\n>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>> ---\n>>> Changes since v1:\n>>>\n>>> - Move message to CameraManager class\n>>> ---\n>>>    src/libcamera/camera_manager.cpp | 4 ++++\n>>>    1 file changed, 4 insertions(+)\n>>>\n>>> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n>>> index 87e6717ece91..942a72dcfc96 100644\n>>> --- a/src/libcamera/camera_manager.cpp\n>>> +++ b/src/libcamera/camera_manager.cpp\n>>> @@ -217,6 +217,10 @@ void CameraManager::Private::addCamera(std::shared_ptr<Camera> camera)\n>>>\n>>>    \tunsigned int index = cameras_.size() - 1;\n>>>\n>>> +\tLOG(Camera, Info)\n>>> +\t\t<< \"Adding camera '\" << camera->id() << \"' for pipeline handler \"\n>>> +\t\t<< camera->_d()->pipe()->name();\n>>\n>> I think the `camera` pointer is moved-from at this point, is it not\n>> nullptr?\n> \n> I completely messed up testing this patch due to a silly mistake in my\n> environment :-/ You're absolutely right.\n> \n>> Am I missing something? If it is nullptr, then please see https://patchwork.libcamera.org/patch/22905/\n>> applying that first will remove the issue.\n> \n> I've reviewed that patch. After you merge it, I'll send a v3 of this\n> one.\n\nIs a v3 is still planned? I am also wondering if maybe it should just be\na \"Debug\" message instead of \"Info\"?\n\n\nRegards,\nBarnabás Pőcze\n\n\n> \n>>> +\n>>>    \t/* Report the addition to the public signal */\n>>>    \tCameraManager *const o = LIBCAMERA_O_PTR();\n>>>    \to->cameraAdded.emit(cameras_[index]);\n>>>\n>>> base-commit: c0a58b97989f7d529f1469b2c2f8705ff55d3af4\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 11CEFC3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 11 May 2025 11:06:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 205F368B62;\n\tSun, 11 May 2025 13:06:40 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B38E168B51\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 11 May 2025 13:06:38 +0200 (CEST)","from [192.168.33.16] (185.221.140.100.nat.pool.zt.hu\n\t[185.221.140.100])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6D920605;\n\tSun, 11 May 2025 13:06:24 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Gfd8kSl0\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1746961584;\n\tbh=HEwwz060pL1RNFqEgkMgXU2LPEGbCvmMhnW93B2alPw=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=Gfd8kSl0Gp1GBcX8Q6ujyQLTDmT8ikS4FcYoGXq2Cx1nJL5OaZZZR65WztnGQxztb\n\t1wwjMyfjdFBsomytA2OxJ5UrftGFM2C/l93z9FebH/TkqCbew7mCGFbIuE10RJoVfR\n\tNdQ+sRJrXYR7wyF1SbaafsAy+E3ajOokfeNk5z3w=","Message-ID":"<8c0d7fce-c4fd-46ec-9149-5201c1b978fa@ideasonboard.com>","Date":"Sun, 11 May 2025 13:06:35 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2] libcamera: camera_manager: Log info message to report\n\tcamera creation","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20250303134518.10441-1-laurent.pinchart@ideasonboard.com>\n\t<d37390cf-82a1-43d8-9c5b-ab19a8950b5f@ideasonboard.com>\n\t<20250305045235.GA30218@pendragon.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250305045235.GA30218@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}},{"id":34872,"web_url":"https://patchwork.libcamera.org/comment/34872/","msgid":"<20250713121756.GA10538@pendragon.ideasonboard.com>","date":"2025-07-13T12:17:56","subject":"Re: [PATCH v2] libcamera: camera_manager: Log info message to report\n\tcamera creation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sun, May 11, 2025 at 01:06:35PM +0200, Barnabás Pőcze wrote:\n> 2025. 03. 05. 5:52 keltezéssel, Laurent Pinchart írta:\n> > On Mon, Mar 03, 2025 at 03:39:09PM +0100, Barnabás Pőcze wrote:\n> >> 2025. 03. 03. 14:45 keltezéssel, Laurent Pinchart írta:\n> >>> Camera creation is one of the most important events generated by\n> >>> libcamera, but we are completely silent about it. The lack of a log\n> >>> message makes it more difficult to identify problems and provide\n> >>> support. Fix it by adding an Info message that reports the camera id and\n> >>> its pipeline handler when the camera is added.\n> >>>\n> >>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >>> ---\n> >>> Changes since v1:\n> >>>\n> >>> - Move message to CameraManager class\n> >>> ---\n> >>>    src/libcamera/camera_manager.cpp | 4 ++++\n> >>>    1 file changed, 4 insertions(+)\n> >>>\n> >>> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> >>> index 87e6717ece91..942a72dcfc96 100644\n> >>> --- a/src/libcamera/camera_manager.cpp\n> >>> +++ b/src/libcamera/camera_manager.cpp\n> >>> @@ -217,6 +217,10 @@ void CameraManager::Private::addCamera(std::shared_ptr<Camera> camera)\n> >>>\n> >>>    \tunsigned int index = cameras_.size() - 1;\n> >>>\n> >>> +\tLOG(Camera, Info)\n> >>> +\t\t<< \"Adding camera '\" << camera->id() << \"' for pipeline handler \"\n> >>> +\t\t<< camera->_d()->pipe()->name();\n> >>\n> >> I think the `camera` pointer is moved-from at this point, is it not\n> >> nullptr?\n> > \n> > I completely messed up testing this patch due to a silly mistake in my\n> > environment :-/ You're absolutely right.\n> > \n> >> Am I missing something? If it is nullptr, then please see https://patchwork.libcamera.org/patch/22905/\n> >> applying that first will remove the issue.\n> > \n> > I've reviewed that patch. After you merge it, I'll send a v3 of this\n> > one.\n> \n> Is a v3 is still planned? I am also wondering if maybe it should just be\n> a \"Debug\" message instead of \"Info\"?\n\nI've sent v3. I think this message qualifies for the Info level as\ncamera creation is a really important event. Feel free to disagree of\ncourse.\n\n> >>> +\n> >>>    \t/* Report the addition to the public signal */\n> >>>    \tCameraManager *const o = LIBCAMERA_O_PTR();\n> >>>    \to->cameraAdded.emit(cameras_[index]);\n> >>>\n> >>> base-commit: c0a58b97989f7d529f1469b2c2f8705ff55d3af4","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 15DDFBE175\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 13 Jul 2025 12:18:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BC26A68F27;\n\tSun, 13 Jul 2025 14:18:28 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6ED7A68EA8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 13 Jul 2025 14:18:27 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 3C3BC4A4;\n\tSun, 13 Jul 2025 14:17:56 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"KGKYvYPY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1752409076;\n\tbh=Owf9I17Y95kwnxtUXUDVm2FJsBj0KdBLdZNYqKU4K44=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=KGKYvYPY80XTG7PDeYB43b7fx18K9AtOROfd3MsXiQlHvW4SblprtqBcDv1/TI/o9\n\tXo5Vk8YsBDnzxixUSbb78Xm1t9EARU8mb0M+0qIyXwSVmYB9+j9xKYYTME+lwSHOSh\n\twmoNT5VFsJsXUSbxHjsf4tCdc6xMxJ5D9vEJv67k=","Date":"Sun, 13 Jul 2025 15:17:56 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] libcamera: camera_manager: Log info message to report\n\tcamera creation","Message-ID":"<20250713121756.GA10538@pendragon.ideasonboard.com>","References":"<20250303134518.10441-1-laurent.pinchart@ideasonboard.com>\n\t<d37390cf-82a1-43d8-9c5b-ab19a8950b5f@ideasonboard.com>\n\t<20250305045235.GA30218@pendragon.ideasonboard.com>\n\t<8c0d7fce-c4fd-46ec-9149-5201c1b978fa@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<8c0d7fce-c4fd-46ec-9149-5201c1b978fa@ideasonboard.com>","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>"}}]