From patchwork Wed Mar 26 08:47:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 23032 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 51F88C323E for ; Wed, 26 Mar 2025 08:48:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A84D668952; Wed, 26 Mar 2025 09:48:10 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="L63Fm0cw"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 749A968947 for ; Wed, 26 Mar 2025 09:48:09 +0100 (CET) Received: from neptunite.flets-east.jp (unknown [IPv6:2404:7a81:160:2100:7402:917d:ea0c:6d4c]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8A919475; Wed, 26 Mar 2025 09:46:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1742978781; bh=q4MiyLouXELwBO6eyMe1rS8/8IKNLqEGW/TxuixaXKg=; h=From:To:Cc:Subject:Date:From; b=L63Fm0cww9KyQwTzhYKqyM/JgSKLh5mjmtmLhJqznRx8lUt6Axd/TogzLQ7+MVzsU /i08qvYewMjKNLLlJM7bvHPeWmVzRs9i5m++y3ThKgsoYkWSvdO4Wq7+A24qqsHe21 omhB9u//MJpsfvFMH8rAjKyAVrchM6aJAsu8tDMQ= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder Subject: [PATCH v2 0/2] pipeline: simple: Fix matching with an empty media graph Date: Wed, 26 Mar 2025 17:47:57 +0900 Message-ID: <20250326084800.1880530-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The simple pipeline handler may encounter systems with multiple media devices that can be supported. If the first media graph it could support is invalid or empty and a subsequent media graph could handle it - the simple pipeline handler would not continue matching to complete the creation of cameras on those later devices. The second patch updates the pipeline handler to iterate attempts to acquire a supported MediaDevice until they are exhausted, ensureing that all supportable cameras in a system will be created. The first patch addresses a comment from v1, and adds a function to the base PipelineHandler class for clearing the list of acquired media devices, thus preventing a mix of invalid media devices from a previously failed match and valid media devices from the current succeeding match. Paul Elder (2): libcamera: pipeline: Add function to clear acquired media devices pipeline: simple: Fix matching with empty media graphs include/libcamera/internal/pipeline_handler.h | 2 + src/libcamera/pipeline/simple/simple.cpp | 52 +++++++++++++------ src/libcamera/pipeline_handler.cpp | 15 ++++++ 3 files changed, 52 insertions(+), 17 deletions(-)