[libcamera-devel] [PATCH 0/8] libcamera: add basic support for Streams and format configuration

Niklas Söderlund niklas.soderlund at ragnatech.se
Wed Jan 23 00:44:57 CET 2019


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

-- 
2.20.1



More information about the libcamera-devel mailing list