[libcamera-devel] [PATCH v3 0/4] ImageFormat rework

Jacopo Mondi jacopo at jmondi.org
Mon Jun 29 12:50:33 CEST 2020


The main concern raised in v2 was about exposing part of the std::map APIs.
In this version I have removed all of them, and users should access the
data_ map if the want to iterate on it.

Final goal is to get rid of custom maps in pipeline handlers to hold
<V4L2PixelFormat, SizeRange>. Once this gets in we can start building on top
helpers to create StreamFormats from V4L2VideoDevice::Formats maps.

Thanks
  j

Jacopo Mondi (4):
  libcamera: formats: Make ImageFormats a templated class
  libcamera: v4l2_subdevice: Provide Formats type alias
  libcamera: formats: Add ImageFormats::contains()
  libcamera: v4l2_videodevice: Use ImageFormats

 include/libcamera/internal/camera_sensor.h    |  6 +--
 include/libcamera/internal/formats.h          | 12 +++---
 include/libcamera/internal/v4l2_subdevice.h   |  4 +-
 include/libcamera/internal/v4l2_videodevice.h |  4 +-
 src/libcamera/formats.cpp                     | 39 ++++++++++++++-----
 .../pipeline/raspberrypi/raspberrypi.cpp      | 21 +++++-----
 src/libcamera/pipeline/simple/converter.cpp   |  2 +-
 src/libcamera/pipeline/simple/simple.cpp      |  7 ++--
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |  7 ++--
 src/libcamera/v4l2_subdevice.cpp              | 12 ++++--
 src/libcamera/v4l2_videodevice.cpp            | 14 +++++--
 test/v4l2_subdevice/list_formats.cpp          |  2 +-
 12 files changed, 81 insertions(+), 49 deletions(-)

--
2.27.0



More information about the libcamera-devel mailing list