From patchwork Tue Jan 22 23:44:57 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: 334 Return-Path: Received: from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net [195.74.38.228]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 44DDA60C7D for ; Wed, 23 Jan 2019 00:46:37 +0100 (CET) X-Halon-ID: dca1ec54-1e9f-11e9-911a-0050569116f7 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA id dca1ec54-1e9f-11e9-911a-0050569116f7; Wed, 23 Jan 2019 00:46:15 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Wed, 23 Jan 2019 00:44:57 +0100 Message-Id: <20190122234505.32634-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/8] libcamera: add basic support for Streams and format configuration 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:46:37 -0000 Hi, This series aims to add support of Streams to the Camera object. A Stream is a single video stream origination from a video source, multiple video streams might form the same Camera is possible as long as they all originate from the same video source. This series depends on the association between Camera and PipleineHandlers series [1]. For obvious reasons patch 8/8 is not meant for upstream consumption but a proof of concept for how a application could interact with the API. As this is the first draft of this series I expect a few things to change. While working and discussing this series potential topics for change are. - Provide a convenience Camera::configure() implementation which takes a single StreamConfiguration object. Rational is that there might a lot of applications which will be designed to only work with one Stream at a time so to make life a little easier for them might be a good ting. - Have the Stream objects registered with the camera device at the same time it's created by the PipelineHandler::match() and not propagate the Camera::streams() call to the PipelineHandler. This is an appealing thought. - Have the base class PipelineHandler deal with disconnecting all cameras belonging to the specific implementations. This if possible to do in a neat way would reduce a lot of boiler plate code. - Over all if possible move more validation to the Camera and base class PipelineHandler where possible to reduce boiler plate code from the specific implementations. Suggestions on where this would be neat or really meaningful are appreciated. 1. [PATCH 0/3] libcamera: add association between Camera and PipelineHandlers Laurent Pinchart (1): libcamera: camera: Add acquire() and release() Niklas Söderlund (7): libcamera: stream: add basic Stream class libcamera: stream: add basic StreamConfiguration class libcamera: pipelines: add log category for each pipeline libcamera: pipelines: add method to retrieve streams libcamera: pipelines: add method to configure streams libcamera: camera: integrate streams and configuration [POC] cam: add hack option to staticly configure a pipeline include/libcamera/camera.h | 12 +++ include/libcamera/libcamera.h | 1 + include/libcamera/meson.build | 1 + include/libcamera/stream.h | 45 ++++++++ src/cam/main.cpp | 38 +++++++ src/libcamera/camera.cpp | 83 ++++++++++++++- src/libcamera/include/pipeline_handler.h | 6 ++ src/libcamera/meson.build | 1 + src/libcamera/pipeline/ipu3/ipu3.cpp | 51 +++++++++ src/libcamera/pipeline/uvcvideo.cpp | 40 +++++++ src/libcamera/pipeline/vimc.cpp | 40 +++++++ src/libcamera/pipeline_handler.cpp | 30 ++++++ src/libcamera/stream.cpp | 130 +++++++++++++++++++++++ 13 files changed, 477 insertions(+), 1 deletion(-) create mode 100644 include/libcamera/stream.h create mode 100644 src/libcamera/stream.cpp