[{"id":36682,"web_url":"https://patchwork.libcamera.org/comment/36682/","msgid":"<176227173395.567526.13899618237334440390@ping.linuxembedded.co.uk>","date":"2025-11-04T15:55:33","subject":"Re: [PATCH v6 1/2] libcamera: pipeline_handler: Add accessor for\n\tuseCount_","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Antoine Bouyer (2025-11-04 13:49:26)\n> Add an accessor for useCount_ parameter, so that PipelineHandler\n> child classes can access it to verify whether the media device\n> is already locked or not.\n> \n> Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  include/libcamera/internal/pipeline_handler.h | 1 +\n>  src/libcamera/pipeline_handler.cpp            | 6 ++++++\n>  2 files changed, 7 insertions(+)\n> \n> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\n> index e89d6a33e398..2ca210d0ae4f 100644\n> --- a/include/libcamera/internal/pipeline_handler.h\n> +++ b/include/libcamera/internal/pipeline_handler.h\n> @@ -73,6 +73,7 @@ public:\n>  protected:\n>         void registerCamera(std::shared_ptr<Camera> camera);\n>         void hotplugMediaDevice(MediaDevice *media);\n> +       unsigned int useCount() const { return useCount_; };\n\nThis is failing on CI here I'm afraid:\n\nIn file included from src/libcamera/proxy/vimc_ipa_proxy.cpp:25:\nIn file included from ../include/libcamera/internal/ipa_module.h:19:\n../include/libcamera/internal/pipeline_handler.h:76:53: error: extra ';' after member function definition [-Werror,-Wextra-semi]\n   76 |         unsigned int useCount() const { return useCount_; };\n\n\n>  \n>         virtual int queueRequestDevice(Camera *camera, Request *request) = 0;\n>         virtual void stopDevice(Camera *camera) = 0;\n> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> index e5f9e55c9783..15fb32566543 100644\n> --- a/src/libcamera/pipeline_handler.cpp\n> +++ b/src/libcamera/pipeline_handler.cpp\n> @@ -811,6 +811,12 @@ void PipelineHandler::disconnect()\n>   * \\return The pipeline handler name\n>   */\n>  \n> +/**\n> + * \\fn PipelineHandler::useCount()\n> + * \\brief Retrieve the pipeline handler's used camera count\n> + * \\return The number of acquired cameras of the pipeline handler\n> + */\n> +\n>  /**\n>   * \\fn PipelineHandler::cameraManager() const\n>   * \\brief Retrieve the CameraManager that this pipeline handler belongs to\n> -- \n> 2.34.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 D01DCBDE4C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  4 Nov 2025 15:55:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 29FDD60856;\n\tTue,  4 Nov 2025 16:55:39 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 70D236069A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  4 Nov 2025 16:55:37 +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 A2E3B1771;\n\tTue,  4 Nov 2025 16:53: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=\"jPtt2Ndc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1762271623;\n\tbh=Q3oTIsI1XFyleJvrHvzPVvdcvcaghsQI+eoMX2XAGlQ=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=jPtt2Ndcv3J1ZhDW7rQRQU/y60MdknwErKnok9VDn5pmUnmy56dK+dXHhpKVDwQJC\n\tPKQdx/3xi+XUQjHmf89fjSGcZOGzdUQiezxWGIsY5wYR+3eLFzvIPAUPCRIije8tpX\n\tDyAOCnVBxtnHOT7fNZrMFnBcNYcJhtqbyECJzHGk=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251104134927.318841-2-antoine.bouyer@nxp.com>","References":"<20251104134927.318841-1-antoine.bouyer@nxp.com>\n\t<20251104134927.318841-2-antoine.bouyer@nxp.com>","Subject":"Re: [PATCH v6 1/2] libcamera: pipeline_handler: Add accessor for\n\tuseCount_","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"julien.vuillaumier@nxp.com, Antoine Bouyer <antoine.bouyer@nxp.com>,\n\t=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","To":"Antoine Bouyer <antoine.bouyer@nxp.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 04 Nov 2025 15:55:33 +0000","Message-ID":"<176227173395.567526.13899618237334440390@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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":36684,"web_url":"https://patchwork.libcamera.org/comment/36684/","msgid":"<ea5bcae8-12af-4f76-9b36-8a40d4db5187@nxp.com>","date":"2025-11-04T16:18:40","subject":"Re: [PATCH v6 1/2] libcamera: pipeline_handler: Add accessor for\n\tuseCount_","submitter":{"id":218,"url":"https://patchwork.libcamera.org/api/people/218/","name":"Antoine Bouyer","email":"antoine.bouyer@nxp.com"},"content":"Hi Kieran\nThanks for your review\n\nOn 11/4/25 4:55 PM, Kieran Bingham wrote:\n> Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button\n> \n> \n> Quoting Antoine Bouyer (2025-11-04 13:49:26)\n>> Add an accessor for useCount_ parameter, so that PipelineHandler\n>> child classes can access it to verify whether the media device\n>> is already locked or not.\n>>\n>> Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>\n>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>> ---\n>>   include/libcamera/internal/pipeline_handler.h | 1 +\n>>   src/libcamera/pipeline_handler.cpp            | 6 ++++++\n>>   2 files changed, 7 insertions(+)\n>>\n>> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\n>> index e89d6a33e398..2ca210d0ae4f 100644\n>> --- a/include/libcamera/internal/pipeline_handler.h\n>> +++ b/include/libcamera/internal/pipeline_handler.h\n>> @@ -73,6 +73,7 @@ public:\n>>   protected:\n>>          void registerCamera(std::shared_ptr<Camera> camera);\n>>          void hotplugMediaDevice(MediaDevice *media);\n>> +       unsigned int useCount() const { return useCount_; };\n> \n> This is failing on CI here I'm afraid:\n> \n> In file included from src/libcamera/proxy/vimc_ipa_proxy.cpp:25:\n> In file included from ../include/libcamera/internal/ipa_module.h:19:\n> ../include/libcamera/internal/pipeline_handler.h:76:53: error: extra ';' after member function definition [-Werror,-Wextra-semi]\n>     76 |         unsigned int useCount() const { return useCount_; };\n> \n\nI really need to enable all these error flags to prevent such error in \nfuture :(\nShould I submit a v7 for it ? or can you handle it while applying the \npatch ?\n\nThanks\nAntoine\n\n> \n>>\n>>          virtual int queueRequestDevice(Camera *camera, Request *request) = 0;\n>>          virtual void stopDevice(Camera *camera) = 0;\n>> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n>> index e5f9e55c9783..15fb32566543 100644\n>> --- a/src/libcamera/pipeline_handler.cpp\n>> +++ b/src/libcamera/pipeline_handler.cpp\n>> @@ -811,6 +811,12 @@ void PipelineHandler::disconnect()\n>>    * \\return The pipeline handler name\n>>    */\n>>\n>> +/**\n>> + * \\fn PipelineHandler::useCount()\n>> + * \\brief Retrieve the pipeline handler's used camera count\n>> + * \\return The number of acquired cameras of the pipeline handler\n>> + */\n>> +\n>>   /**\n>>    * \\fn PipelineHandler::cameraManager() const\n>>    * \\brief Retrieve the CameraManager that this pipeline handler belongs to\n>> --\n>> 2.34.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 C1362BDE4C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  4 Nov 2025 16:18:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 09E1360A80;\n\tTue,  4 Nov 2025 17:18:45 +0100 (CET)","from GVXPR05CU001.outbound.protection.outlook.com\n\t(mail-swedencentralazlp170130007.outbound.protection.outlook.com\n\t[IPv6:2a01:111:f403:c202::7])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 775B06069A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  4 Nov 2025 17:18:43 +0100 (CET)","from GVXPR04MB9831.eurprd04.prod.outlook.com (2603:10a6:150:11c::8)\n\tby PAXPR04MB8333.eurprd04.prod.outlook.com (2603:10a6:102:1c0::21)\n\twith Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.16;\n\tTue, 4 Nov 2025 16:18:41 +0000","from GVXPR04MB9831.eurprd04.prod.outlook.com\n\t([fe80::4634:3d9c:c4a:641a]) by\n\tGVXPR04MB9831.eurprd04.prod.outlook.com\n\t([fe80::4634:3d9c:c4a:641a%6]) with mapi id 15.20.9298.006;\n\tTue, 4 Nov 2025 16:18:41 +0000"],"Authentication-Results":["lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=nxp.com header.i=@nxp.com header.b=\"bYNdAFaM\";\n\tdkim-atps=neutral","dkim=none (message not signed)\n\theader.d=none;dmarc=none action=none header.from=nxp.com;"],"ARC-Seal":"i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n\tb=dYGImaFBTY6CHXz8i7EOoUx4sXGRIJmKB/O0xhvxMk5kThKxzN5bXt82yhR4KX7SbONDO8lCA3lR2+9f0PGwX/GBoxGxmkogDSHcpiZzaK/ljcemGUgqeW7JoYqkLRcga5eD06fS58dowtlhO9n0DalNJppFRnVN1vppSMuy0rpyoaEjVVFOscXqnxKl8HkigpkFdvWc7UbgOujBlEc8NlTxKXzOlAaLYkJRnuxQO+qXMCMHuo+2Huxi8pm+5jBpJtsUC8HyW7WlPP9DkYLqRcKC19iDRQeQWKojQhA92PRmStc+0ENx3fr3nywOHBsRr4Lm8QdwZxdLS3OS4GMkLQ==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n\ts=arcselector10001;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n\tbh=LyvyvJAAWRXyCfYR+7txdeZFb0cS6seL8Qdh1z+KzHQ=;\n\tb=wmeZEbo4J+5KGJLN9p/vxgJ0aNEKqdBylfMBbrVmeB7MchCev6N0OCNLUGr/3pV6FAOUS02VqcWLVoNxhD0fhIAB4KVewAH8dAxujmYCXo6G+arAgQ2JSWQLkUi7fv8v3b/E8vR7XUbvRYJ0SnS6Y5Gc9WR02FfRoE6L8CRY6qJi88G1y2Rk67jgYr2eKnozhKZOujt6gV+cl+ujZFHjYffdbcL2+gODo/lKuNlWqU8veTyJRcsMgZbA4Pd0v3CU12sejVEHGn7/ALTO+irT8mYw4EA1yau5jalljBX+ua5aEOhDogpiDtGNj2d9ezIlFauTnCbGOqg1E4sukc3pKg==","ARC-Authentication-Results":"i=1; mx.microsoft.com 1; spf=pass\n\tsmtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com;\n\tdkim=pass header.d=nxp.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=LyvyvJAAWRXyCfYR+7txdeZFb0cS6seL8Qdh1z+KzHQ=;\n\tb=bYNdAFaMvKpmDDwAY7pTrgJ+4MxEbY6QWVIBr8KAVqSzTWQYPcElN96h+s3Zxn1S9/yPxQY9h/ANVkz7tbL08wFqFXAPafXABcpF8GraDnIW0GR1qOrBWOLjJ5DuJAwagvG+FNkam3JQn3DtGrkBt/hkPQgi7TfuDAItv07Wdvr/Mf+yHRpg2X+GtKTGie0cYzNH4IhQ1fpvZBkW6Z+nPS5GlFhVki+Teqqitytljw22OOwiSxEN1ArJiA7qNC4HMXu+928c/5jC6scCqyiOTVD2jJ9g7xX9l76Yrs1brBkXz2Lz+58y6vDlOAhZcm/kGHUzlqfdxGFPq0BHtKS7lw==","Message-ID":"<ea5bcae8-12af-4f76-9b36-8a40d4db5187@nxp.com>","Date":"Tue, 4 Nov 2025 17:18:40 +0100","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v6 1/2] libcamera: pipeline_handler: Add accessor for\n\tuseCount_","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"julien.vuillaumier@nxp.com, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>","References":"<20251104134927.318841-1-antoine.bouyer@nxp.com>\n\t<20251104134927.318841-2-antoine.bouyer@nxp.com>\n\t<176227173395.567526.13899618237334440390@ping.linuxembedded.co.uk>","Content-Language":"en-US","From":"Antoine Bouyer <antoine.bouyer@nxp.com>","In-Reply-To":"<176227173395.567526.13899618237334440390@ping.linuxembedded.co.uk>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-ClientProxiedBy":"AM4PR0302CA0003.eurprd03.prod.outlook.com\n\t(2603:10a6:205:2::16) To GVXPR04MB9831.eurprd04.prod.outlook.com\n\t(2603:10a6:150:11c::8)","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"GVXPR04MB9831:EE_|PAXPR04MB8333:EE_","X-MS-Office365-Filtering-Correlation-Id":"6d12d088-f2cb-4d3e-b4ca-08de1bbdd181","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"BCL:0;\n\tARA:13230040|19092799006|366016|376014|1800799024|7053199007; ","X-Microsoft-Antispam-Message-Info":"=?utf-8?q?GthdrbFrlTKdnlAM55VP+e45LBAo?=\n\t=?utf-8?q?zyIvDVyAhM1xIJypr8cZ1ELypHt8VaUX4KQ0DD9B9Y5dFZj3jEYaapaR?=\n\t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t=?utf-8?q?DvmlkumNCIUjyedKXuhiX/Nj8X406qZ1F4EEQuMPtVwTNitieXiEo+BN?=\n\t=?utf-8?q?5IDnBtUZnPWOJ5Wc6MtSsa7nB3IToA0FNYqpPThs7F1SWc7XUpPgpLP4?=\n\t=?utf-8?q?HVfKNwyh/N8edmLiTCXsUJHEsXZutHmM80lCejNuPadB230I+oJ/zpH3?=\n\t=?utf-8?q?0rdrwDtZRJCqGiPTWpqzBcusmdTCYNzoNuWmPtW/fuX4/AqEikulBdJ2?=\n\t=?utf-8?q?p0RtW9L0Khldb7NrDxO7ppI4/kM0kTPRaVJm0ZVCfn8hI0U/yPx2tBxD?=\n\t=?utf-8?q?lzVH69RinTRfELtFmW6pM7qTp9yubTxmZtFlVzLm1AOWQAdbQIeboEKd?=\n\t=?utf-8?q?4EnrLcjUQh82PcVfM/anztoQqusQpKIey2vH6B5ClyJJL5bNYzmTwY6C?=\n\t=?utf-8?q?sDsykeSazNzzm0J+STLYwftdf/ZGrR4cVfDZXNsHbTHApM8NScofLByN?=\n\t=?utf-8?q?fybu3598WpQYYntzCEI4UeUziuGwYrB6gcevoR2TlTonhXqsV03dZljA?=\n\t=?utf-8?q?m0sAkwGmlmK65hbs7h8Ht8jWqnfekQjPZqp4kh/wcKWu?=","X-Forefront-Antispam-Report":"CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n\tIPV:NLI; SFV:NSPM; H:GVXPR04MB9831.eurprd04.prod.outlook.com; PTR:;\n\tCAT:NONE; \n\tSFS:(13230040)(19092799006)(366016)(376014)(1800799024)(7053199007);\n\tDIR:OUT; SFP:1101; ","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?Cm6yyCjDKDEa/FzBBrolkY3Ms?=\n\t=?utf-8?q?0ieYz5dT7EiYHNkopTliq/02mzhcg35X4guiZCHeL+E8fOQ9sUrOfegc?=\n\t=?utf-8?q?7arw14244EUySsR7LOjG+4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uzgEZD72RhYnq5zNiqrFOmwPAys6MNURuG75B/pwXJSXt1?=\n\t=?utf-8?q?kSLSSROYL3YG+MpMHT2m+EhO8CTrAqEhXYupPt52kYi6lhg+udkEVbjZ?=\n\t=?utf-8?q?wav5k/2mWfvtinksObZugNTfa2H8rYBK1KifN/1C4s90BWhLXSxR1+MZ?=\n\t=?utf-8?q?K8Iza7RXEM4StGZ/wuMZfAU5rl9xaEGpNEtmn5Gf7rrOB2PAi9rJmsab?=\n\t=?utf-8?q?Mwd66SF3SUNlVyjq1SMaUMp7W8BWlyO06T0VhwthpoCJ6wmIqa1jCoX3?=\n\t=?utf-8?q?y1j4g/T+AWjiBPKiOfXzrc8A9s1Otn8o1nmuPOzc8pienlo7p1td8WBq?=\n\t=?utf-8?q?rBAE7Anhf4JGKX3Q0OKMp/rqJPd2rsizSKn0xFHqxCXSR0AyE6QMYcku?=\n\t=?utf-8?q?MjMD+YgTKAfDo9zB9/oMLg3RUXt2dFCzEItjHk5VAr+oKaqq/ZD0MN0e?=\n\t=?utf-8?q?2MfPBx7yvDjlRsKW2Cs0ZPswdxmaIGi81A/saetIfCb0WGv1EJDCkP22?=\n\t=?utf-8?q?NKkxFs28LFVZwbPUIXtdEIjMapOBHSXAfJ8Jdl7+AEJ5Cg3DR8aaL9eg?=\n\t=?utf-8?q?5ktiBGYmxAMn6NsUW7Byyw3bp75LkZl591KwK3UEhiJj1Cg75igvgmRr?=\n\t=?utf-8?q?tOqfzZAGvoqVXWljPY6xqARAuQH9yzS9OIdbOG+Zsv5+1YdrWQXhRC/4?=\n\t=?utf-8?q?vWeX37SM+xQsglFNc2wHoNtgv0Tug=3D=3D?=","X-OriginatorOrg":"nxp.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"6d12d088-f2cb-4d3e-b4ca-08de1bbdd181","X-MS-Exchange-CrossTenant-AuthSource":"GVXPR04MB9831.eurprd04.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"04 Nov 2025 16:18:41.4475\n\t(UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"686ea1d3-bc2b-4c6f-a92c-d99c5c301635","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"vQoGw6je7hl1+ddFv6U8YKHxEzBQIBEf0Iu1JAFgCUaywxisKL9yIfYttUwwWr9lPHHjt03T5C6xEp4yjRMy1w==","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"PAXPR04MB8333","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":36685,"web_url":"https://patchwork.libcamera.org/comment/36685/","msgid":"<176227354231.567526.18318366652297280152@ping.linuxembedded.co.uk>","date":"2025-11-04T16:25:42","subject":"Re: [PATCH v6 1/2] libcamera: pipeline_handler: Add accessor for\n\tuseCount_","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Antoine Bouyer (2025-11-04 16:18:40)\n> Hi Kieran\n> Thanks for your review\n> \n> On 11/4/25 4:55 PM, Kieran Bingham wrote:\n> > Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button\n> > \n> > \n> > Quoting Antoine Bouyer (2025-11-04 13:49:26)\n> >> Add an accessor for useCount_ parameter, so that PipelineHandler\n> >> child classes can access it to verify whether the media device\n> >> is already locked or not.\n> >>\n> >> Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>\n> >> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> >> ---\n> >>   include/libcamera/internal/pipeline_handler.h | 1 +\n> >>   src/libcamera/pipeline_handler.cpp            | 6 ++++++\n> >>   2 files changed, 7 insertions(+)\n> >>\n> >> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\n> >> index e89d6a33e398..2ca210d0ae4f 100644\n> >> --- a/include/libcamera/internal/pipeline_handler.h\n> >> +++ b/include/libcamera/internal/pipeline_handler.h\n> >> @@ -73,6 +73,7 @@ public:\n> >>   protected:\n> >>          void registerCamera(std::shared_ptr<Camera> camera);\n> >>          void hotplugMediaDevice(MediaDevice *media);\n> >> +       unsigned int useCount() const { return useCount_; };\n> > \n> > This is failing on CI here I'm afraid:\n> > \n> > In file included from src/libcamera/proxy/vimc_ipa_proxy.cpp:25:\n> > In file included from ../include/libcamera/internal/ipa_module.h:19:\n> > ../include/libcamera/internal/pipeline_handler.h:76:53: error: extra ';' after member function definition [-Werror,-Wextra-semi]\n> >     76 |         unsigned int useCount() const { return useCount_; };\n> > \n> \n> I really need to enable all these error flags to prevent such error in \n> future :(\n> Should I submit a v7 for it ? or can you handle it while applying the \n> patch ?\n\nI think if it's just that it can be fixed while applying.\n\n> \n> Thanks\n> Antoine\n> \n> > \n> >>\n> >>          virtual int queueRequestDevice(Camera *camera, Request *request) = 0;\n> >>          virtual void stopDevice(Camera *camera) = 0;\n> >> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> >> index e5f9e55c9783..15fb32566543 100644\n> >> --- a/src/libcamera/pipeline_handler.cpp\n> >> +++ b/src/libcamera/pipeline_handler.cpp\n> >> @@ -811,6 +811,12 @@ void PipelineHandler::disconnect()\n> >>    * \\return The pipeline handler name\n> >>    */\n> >>\n> >> +/**\n> >> + * \\fn PipelineHandler::useCount()\n> >> + * \\brief Retrieve the pipeline handler's used camera count\n> >> + * \\return The number of acquired cameras of the pipeline handler\n> >> + */\n> >> +\n> >>   /**\n> >>    * \\fn PipelineHandler::cameraManager() const\n> >>    * \\brief Retrieve the CameraManager that this pipeline handler belongs to\n> >> --\n> >> 2.34.1\n> >>\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 D2B3FC3241\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  4 Nov 2025 16:25:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 26D8060856;\n\tTue,  4 Nov 2025 17:25:47 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2EF956069A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  4 Nov 2025 17:25:45 +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 1D7351771;\n\tTue,  4 Nov 2025 17:23:51 +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=\"fvzTyBOE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1762273431;\n\tbh=YHlqoukeKH/aF0HlHDm/dyvqt1VxywHpxU4vplQsJy8=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=fvzTyBOEtPvHztu8Qh5DTqWYbOGrXArmbUzZuzgpGRVvsa7cRB3oGWVQLUvDkQEZt\n\t+6jCHLY6y4VC06bnizWgH7aqTiTLLseK6PGeHR3x8vInsOaEHsvCAkXZpR0FGYhbbw\n\tpZs+z0vQKOF8vbypTs4j694RO/Zy78pNrU8CQm7E=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<ea5bcae8-12af-4f76-9b36-8a40d4db5187@nxp.com>","References":"<20251104134927.318841-1-antoine.bouyer@nxp.com>\n\t<20251104134927.318841-2-antoine.bouyer@nxp.com>\n\t<176227173395.567526.13899618237334440390@ping.linuxembedded.co.uk>\n\t<ea5bcae8-12af-4f76-9b36-8a40d4db5187@nxp.com>","Subject":"Re: [PATCH v6 1/2] libcamera: pipeline_handler: Add accessor for\n\tuseCount_","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"julien.vuillaumier@nxp.com, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>","To":"Antoine Bouyer <antoine.bouyer@nxp.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 04 Nov 2025 16:25:42 +0000","Message-ID":"<176227354231.567526.18318366652297280152@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}}]