From patchwork Thu May 11 22:58:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18621 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 EF982BD16B for ; Thu, 11 May 2023 22:58:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 68E68633B7; Fri, 12 May 2023 00:58:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1683845919; 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=nh3Bi1/CD7igz1rFv/bq9CQc91Z4HdD2I9pIm+OJ0Xr7AXRbUWLeAlvL9d50IVYlL B0sTJep6sowjhSi7djqPj/qXqZKptrwYgap06ixyzg0FpA2m54HEPZYLipIObnhu4d 2M68mpqFlqb/U5eDGjQLWw0NHgXhF86crDv+1Z8lXlR2ch9rB0VAWDJ5tmCSsnh1N3 z5u3LLYqdlGfxmpXwFBFQCjJgy9F1hR6d/pRH/6UDPd3gVkd5J22rlY0GVLhy1XBPx imR/naJ99j230O9Le8X1yTpqXisnFQzhDgT9eIQC+UPE8NcyhT+MKB1YtxXNYltVpD BsIpreBOG4IKA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A45746039E for ; Fri, 12 May 2023 00:58:38 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MlQCDDbq"; 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 059117CE; Fri, 12 May 2023 00:58:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1683845910; bh=IaPMehSUYqEyxMmK1CslhyaR+MRQ3Kt36N9P56QCEmE=; h=From:To:Cc:Subject:Date:From; b=MlQCDDbqdio+F5TshH2kA5+UsFBshzt0aw8a9v6dKCE6OkYZO6vbWgQaxvJyd5nd3 Njt8hXwa0TZYzLGdVx86rnojQ5lH2Rbybi2Kv0gHv29QcD/mXf/DbxXD3XfiGc987m YMuwhqNm8W+P50O4NqOM8+U3gWF0kT7OHCN9WEik= To: libcamera devel Date: Thu, 11 May 2023 23:58:29 +0100 Message-Id: <20230511225833.361699-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/4] 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