[{"id":35930,"web_url":"https://patchwork.libcamera.org/comment/35930/","msgid":"<20250919172650.GC8038@pendragon.ideasonboard.com>","date":"2025-09-19T17:26:50","subject":"Re: [PATCH v18 06/12] camera_manager: Look up pipelines match list\n\tin configuration file","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Sep 12, 2025 at 04:29:07PM +0200, Milan Zamazal wrote:\n> Let's add a configuration file item for the pipelines match list.\n> \n> The configuration snippet:\n> \n>   configuration:\n>     pipelines_match_list: rkisp1,simple\n\nThere's a YAML native construct for lists. I'll fix that.\n\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  src/libcamera/camera_manager.cpp | 10 ++++++----\n>  1 file changed, 6 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index 64df62444..c203b08f7 100644\n> --- a/src/libcamera/camera_manager.cpp\n> +++ b/src/libcamera/camera_manager.cpp\n> @@ -111,14 +111,16 @@ void CameraManager::Private::createPipelineHandlers()\n>  \t * file and only fallback on environment variable or all handlers, if\n>  \t * there is no configuration file.\n>  \t */\n> -\tconst char *pipesList =\n> -\t\tutils::secure_getenv(\"LIBCAMERA_PIPELINES_MATCH_LIST\");\n> -\tif (pipesList) {\n> +\tconst auto pipesList =\n> +\t\tconfiguration().envListOption(\"LIBCAMERA_PIPELINES_MATCH_LIST\",\n> +\t\t\t\t\t      { \"pipelines_match_list\" },\n> +\t\t\t\t\t      \",\");\n> +\tif (pipesList.has_value()) {\n>  \t\t/*\n>  \t\t * When a list of preferred pipelines is defined, iterate\n>  \t\t * through the ordered list to match the enumerated devices.\n>  \t\t */\n> -\t\tfor (const auto &pipeName : utils::split(pipesList, \",\")) {\n> +\t\tfor (const auto &pipeName : pipesList.value()) {\n>  \t\t\tconst PipelineHandlerFactoryBase *factory;\n>  \t\t\tfactory = PipelineHandlerFactoryBase::getFactoryByName(pipeName);\n>  \t\t\tif (!factory)","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 EFC1CC328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 19 Sep 2025 17:27:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B90926B597;\n\tFri, 19 Sep 2025 19:27:22 +0200 (CEST)","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 E886B62C35\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Sep 2025 19:27:20 +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 49E5E446;\n\tFri, 19 Sep 2025 19:26:00 +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=\"gt4Uh1fj\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758302760;\n\tbh=7NmHR7J8fxEHuxh/5Cc6meua91FA+LARYSBSMiBhutg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=gt4Uh1fjQesiNF7ngSaNohydF8MLAR68/wMGubBxbHD+zoul0drVA/l2Cmggxim2F\n\t32KsIGlwihdRNB9dt6Q+W7F28arS9khzduda2FnnnA+9NmecoeTRWb12EU+ex5fwm/\n\tVZkcZmKjQQK3MML4k/eAECO0Mou3RjnwZf6BrmVY=","Date":"Fri, 19 Sep 2025 20:26:50 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>, Paul Elder\n\t<paul.elder@ideasonboard.com>","Subject":"Re: [PATCH v18 06/12] camera_manager: Look up pipelines match list\n\tin configuration file","Message-ID":"<20250919172650.GC8038@pendragon.ideasonboard.com>","References":"<20250912142915.53949-1-mzamazal@redhat.com>\n\t<20250912142915.53949-7-mzamazal@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250912142915.53949-7-mzamazal@redhat.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>"}}]