[libcamera-devel] [PATCH v5 0/6] Simple pipeline handler

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun May 10 13:58:04 CEST 2020


Hello,

This patch series builds on Martijn's work to implement a pipeline
handler for simple pipelines. Additional information about the pipeline
handler itself can be found in patch 3/6.

Compared to v4, this version incorporates the review comments and has
been rebased on top of master, without major changes.

Patch 1/6 adds a V4L2 API extension for the VIDIOC_ENUM_FMT ioctl,
required for pipeline auto-configuration. The kernel changes have been
merged in the linux-media master branch and is scheduled for kernel
v5.8. The patch description has been updated accordingly. Patch 2/6
extends the V4L2VideoDevice class to implement the extension.

Patch 3/6 adds the new simple pipeline handler, patch 4/6 the simple
converter, and patch 5/6 integrates converter support into the simple
pipeline handler. The converter API hasn't changed and should still be
improved, it's currently a proof of concept. Other options also exist,
such as making the simple pipeline handler a base class from which more
specialized pipeline handlers could derive from, and implement support
for converters in device-specific code.

Patch 6/6 extends the simple pipeline handler to support devices that
contain multiple video nodes. It could be squashed with 3/6, but keeping
it separate should ease review.

The code has been tested on an i.MX7 platform with a greyscale sensor
and the i.MX PXP as format converter to produce RGB. I've kept sun6i-csi
from Martijn's work in the list of supported drivers, but supporting
that platform will require extending the corresponding driver to support
the VIDIOC_ENUM_FMT extension. Once done, if all goes well, the platform
should work out of the box.

Laurent Pinchart (5):
  include: linux: Extend VIDIOC_ENUM_FMT to support MC-centric devices
  libcamera: v4l2_videodevice: Support filtering formats by media bus
    code
  libcamera: pipeline: simple: Add simple format converter
  libcamera: pipeline: simple: Integrate converter support
  libcamera: pipeline: simple: Support multiple capture video nodes

Martijn Braam (1):
  libcamera: pipeline: Add a simple pipeline handler

 include/linux/videodev2.h                   |   5 +-
 meson_options.txt                           |   2 +-
 src/libcamera/include/v4l2_videodevice.h    |   4 +-
 src/libcamera/pipeline/simple/converter.cpp | 217 +++++
 src/libcamera/pipeline/simple/converter.h   |  60 ++
 src/libcamera/pipeline/simple/meson.build   |   4 +
 src/libcamera/pipeline/simple/simple.cpp    | 894 ++++++++++++++++++++
 src/libcamera/v4l2_videodevice.cpp          |  16 +-
 8 files changed, 1195 insertions(+), 7 deletions(-)
 create mode 100644 src/libcamera/pipeline/simple/converter.cpp
 create mode 100644 src/libcamera/pipeline/simple/converter.h
 create mode 100644 src/libcamera/pipeline/simple/meson.build
 create mode 100644 src/libcamera/pipeline/simple/simple.cpp

-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list