v4l2_controls.h File Reference

Support for V4L2 Controls using the V4L2 Extended Controls APIs. More...

`#include <linux/videodev2.h>`
`#include <libcamera/controls.h>`

Go to the source code of this file.

## Classes

class | libcamera::V4L2ControlId
| V4L2 control static metadata. More...
class | libcamera::V4L2ControlInfo
| Convenience specialisation of ControlInfo for V4L2 controls. More...

## Detailed Description

Support for V4L2 Controls using the V4L2 Extended Controls APIs.

The V4L2 Control API allows application to inspect and modify sets of configurable parameters on a video device or subdevice. The nature of the parameters an application can modify using the control framework depends on what the driver implements support for, and on the characteristics of the underlying hardware platform. Generally controls are used to modify user visible settings, such as the image brightness and exposure time, or non-standard parameters which cannot be controlled through the V4L2 format negotiation API.

Controls are identified by a numerical ID, defined by the V4L2 kernel headers and have an associated type. Each control has a value, which is the data that can be modified with V4L2Device::setControls() or retrieved with V4L2Device::getControls().

The control's type along with the control's flags define the type of the control's value content. Controls can transport a single data value stored in variable inside the control, or they might as well deal with more complex data types, such as arrays of matrices, stored in a contiguous memory locations associated with the control and called 'the payload'. Such controls are called 'compound controls' and are currently not supported by the libcamera V4L2 control framework.

libcamera implements support for controls using the V4L2 Extended Control API, which allows future handling of controls with payloads of arbitrary sizes.

The libcamera V4L2 Controls framework operates on lists of controls, wrapped by the ControlList class, to match the V4L2 extended controls API. The interface to set and get control is implemented by the V4L2Device class, and this file only provides the data type definitions.

Todo:
  Add support for compound controls