[libcamera-devel,v5,0/6] Add support for V4L2 controls
mbox series

Message ID 20190620153144.5394-1-jacopo@jmondi.org
Headers show
Series
  • Add support for V4L2 controls
Related show

Message

Jacopo Mondi June 20, 2019, 3:31 p.m. UTC
Hello,
   quite a few changes compared to v4, mostly on the V4L2Control and
V4L2Controls side to work around the badly performing get() and set()
methods implemented in v4.

- Remove V4L2Controls::get() and set() as they iterated on the controls
  vector unecessarly
- By removing 'set()' now control cannot be updated and reused
- Make the operations to set and get a V4L2Control value public, to avoid
  having to access them through the V4L2Controls class
- Change return of V4L2Device::s/getControls() to signal which control failed
- Documentation improvements as suggested by Laurent.

I have not taken in changes to the vector of controls in V4L2Controls after
the discussion in mailing list.

I would also like to provide a test, but VIMC has no control.
VIVID has many, but iirc we deprecated VIVID in favour of VIMC everywhere we
could.

An example of the new API is provided in 6/6.

Thanks
  j

Jacopo Mondi (6):
  libcamera: Add V4L2Controls
  libcamera: v4l2_device: List valid controls at open
  libcamera: v4l2_device: Implement get and set controls
  libcamera: camera_sensor: Add V4L2 control operations
  libcamera: ipu3: Set pipe_mode based on stream configuration
  [HACK] ipu3: Set and get a few sensor controls

 src/libcamera/camera_sensor.cpp       |  65 ++++++
 src/libcamera/include/camera_sensor.h |   6 +
 src/libcamera/include/v4l2_controls.h |  86 ++++++++
 src/libcamera/include/v4l2_device.h   |  12 ++
 src/libcamera/meson.build             |   1 +
 src/libcamera/pipeline/ipu3/ipu3.cpp  |  59 ++++++
 src/libcamera/v4l2_controls.cpp       | 282 ++++++++++++++++++++++++++
 src/libcamera/v4l2_device.cpp         | 265 ++++++++++++++++++++++++
 8 files changed, 776 insertions(+)
 create mode 100644 src/libcamera/include/v4l2_controls.h
 create mode 100644 src/libcamera/v4l2_controls.cpp

--
2.21.0