From patchwork Tue Jan 22 23:29:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 330 Return-Path: Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E37E60C7D for ; Wed, 23 Jan 2019 00:30:43 +0100 (CET) X-Halon-ID: b744d671-1e9d-11e9-874f-005056917f90 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id b744d671-1e9d-11e9-874f-005056917f90; Wed, 23 Jan 2019 00:30:39 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Wed, 23 Jan 2019 00:29:52 +0100 Message-Id: <20190122232955.31783-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] libcamera: add association between Camera and PipelineHandlers X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2019 23:30:43 -0000 Hi, This series aim to create a association between a Camera object and the PipelineHandler which creates it. There is a need to for both objects to keep a reference to the other. The Camera needs to have a reference to the PipelineHandler as it needs to call into it to perform actions requested by the user. While the PipelineHandler need a reference to the Camera so it can inform it when it goes away. As even one a PipelineHandler is gone the Camera might be around, but once the hardware is gone (PipelineHandler) it should obviously not try to forward any requests to it. In this series both the ability to disconnect a camera and the actual disconnection of it upon PipelineHandler removal is implemented. What is not shown is how the Camera object should check that a PipelineHandler still exists before it forwards any requests to it. This will be demonstrated in a separate series which will be posted momentarily and which deals with handling the Streams of the Camera which will require interactions with the PipelineHandler. Niklas Söderlund (3): libcamera: camera: create a association with the responsible pipeline handler libcamera: pipelines: keep reference to cameras created libcamera: camera: add method to disconnect camera include/libcamera/camera.h | 10 +++++++-- src/libcamera/camera.cpp | 31 ++++++++++++++++++++++------ src/libcamera/pipeline/ipu3/ipu3.cpp | 13 ++++++++++-- src/libcamera/pipeline/uvcvideo.cpp | 12 ++++++++--- src/libcamera/pipeline/vimc.cpp | 19 ++++++++--------- 5 files changed, 62 insertions(+), 23 deletions(-)