From patchwork Thu May 11 22:48:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18613 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 20CF4BD16B for ; Thu, 11 May 2023 22:48:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 00F9F633B9; Fri, 12 May 2023 00:48:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1683845317; bh=IaPMehSUYqEyxMmK1CslhyaR+MRQ3Kt36N9P56QCEmE=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=hq3HzN6IDnwcAGhYHNkQSN/S60XqghfJaQqCLpCIN1AarOpqb6T3691CarCKa/MT9 xTBy7s/qEvoaPOMYgz0duuB/BXXjlW79TDuh4lQBnBbisyqZU6zCu3UEcabNGKlWES qh6NEAczpF0PZjPXCRRN5XhSt7oPsmLCjVzFmHqm2qwK3qRdqnRXxfOdsVd/YuhkK0 mFx9f1ZoBlw+FtnAwOzym82g2epwu9I1b4GwHf1R9vC6aA7k+xx4qoQJ4nkD/yxxzq K/+JRWNSEt9njXITWBnemx8fqbsbQPwSWkiuNsDAoLPoRqeU1x0OMW7AKV/MM8GGRX ob8ji8jrFG5gg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id ECB5A6039E for ; Fri, 12 May 2023 00:48:34 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="c4GdVSqA"; dkim-atps=neutral Received: from Monstersaurus.local (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3B8EFDDA; Fri, 12 May 2023 00:48:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1683845306; bh=IaPMehSUYqEyxMmK1CslhyaR+MRQ3Kt36N9P56QCEmE=; h=From:To:Cc:Subject:Date:From; b=c4GdVSqAZO27al08Mmq5ld6dDKFB15SYww8Tm/zz8Z00TNk8qjSX25W5LKaHXyKRn M+5uZ7O2tNQTpPUD/6ciphVEijqAypXQgbv7iQQsDFJYYJsvuT23NWXbJjcE768NSs atce28Agp/WVLUBHhSDAO66Rs3LFTPzw8SYbuvx4= To: libcamera devel Date: Thu, 11 May 2023 23:48:23 +0100 Message-Id: <20230511224830.356416-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] libcamera: Add new Camera devices property 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: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Cc: George Kiagiadakis , Robert Mader , Wim Taymans Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" It can be beneficial to allow reporting the devices used by a camera to facilitate de-duplication of resources when handling cameras from a centralised infrastructure such as PipeWire. Expose a new property on all cameras which reports a list of dev_t values representing devices used by the camera. Pipelines supported by media-controller will automatically register an entry for any video node present in the media graphs registered with the Pipeline Handler.. As part of supporting this, we move the addCamera and removeCamera public API calls from the CameraManager class away into an internal implementation of the CameraManager with the use of the Extensible class. Kieran Bingham (4): libcamera: camera_manager: Move private implementation to internal libcamera: camera_manager: Move {add,remove}Camera to internal libcamera: properties: Provide a Devices camera property libcamera: pipeline: Register device numbers with camera include/libcamera/camera_manager.h | 4 - include/libcamera/internal/camera_manager.h | 65 +++++++++ include/libcamera/internal/meson.build | 1 + src/libcamera/camera_manager.cpp | 143 +++++++------------- src/libcamera/pipeline_handler.cpp | 16 ++- src/libcamera/property_ids.yaml | 8 ++ 6 files changed, 134 insertions(+), 103 deletions(-) create mode 100644 include/libcamera/internal/camera_manager.h