From patchwork Thu Aug 8 17:39:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 20847 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 4E44AC323E for ; Thu, 8 Aug 2024 17:39:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 29C4D63382; Thu, 8 Aug 2024 19:39:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="DJEPpicI"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 825FC61955 for ; Thu, 8 Aug 2024 19:39:24 +0200 (CEST) Received: from Monstersaurus.tail69b4.ts.net (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AA5708D0; Thu, 8 Aug 2024 19:38:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1723138710; bh=DQhWhdQfP8iNv4R8lqtT6vLm1QB1Z3TjIYTKlurt7iM=; h=From:To:Cc:Subject:Date:From; b=DJEPpicIkk+vTTqz7p+mGL+UcpgpY11HqZOPbsve8pjz2WK9fOcgMN29RoNQdTUye +i1tJIEDowaWJjvCpCRCA1cgIwnCGrweOT+3QGmGWr+qEaHy01L87tdOrjsZJW9tbe xexrreZNsUIj0ieCAIyh08bpBEpuZ9Adw1TydWbg= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham Subject: [PATCH 0/2] pipeline: simple: Fix matching with an empty media graph Date: Thu, 8 Aug 2024 18:39:19 +0100 Message-Id: <20240808173921.2519957-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 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 first patch in this series removes the media variable from the pipeline handler private data as it is not used after the match completes. This could be later stored in the camera data if it is required on a per camera basis. The subsequent 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. Paul Elder (2): pipeline: simple: Remove media member variable pipeline: simple: Fix matching with empty media graphs src/libcamera/pipeline/simple/simple.cpp | 63 +++++++++++++++--------- 1 file changed, 40 insertions(+), 23 deletions(-)