V4L2 controls infrastructure
Some devices have controls that are settable by the user in order to modify some defined properties. Some of these controls may support a list of predefined values, a default value, an adjustment, and so on. The thing is, different devices may provide different controls with different values. Moreover, while some of these controls are standard, others may be vendor-specific. The main purpose of the control framework is to present controls to the user without assumptions relating to their purpose. In this section, we only address standard controls.
The control framework relies on two main objects, both defined in include/media/v4l2- ctrls.h
, like the rest of the data structures and APIs provided by this framework. The first is struct v4l2_ctrl
. This structure describes the control properties and keeps track of the control's value. The second and final one is struct v4l2_ctrl_handler
, which keeps track of all the controls. Their detailed definitions...