struct v4l2_ctrl_handler — The control handler keeps track of all the
struct v4l2_ctrl_handler { struct mutex _lock; struct mutex * lock; struct list_head ctrls; struct list_head ctrl_refs; struct v4l2_ctrl_ref * cached; struct v4l2_ctrl_ref ** buckets; v4l2_ctrl_notify_fnc notify; void * notify_priv; u16 nr_of_buckets; int error; };
Default for “lock”.
Lock to control access to this handler and its controls. May be replaced by the user right after init.
The list of controls owned by this handler.
The list of control references.
The last found control reference. It is common that the same control is needed multiple times, so this is a simple optimization.
Buckets for the hashing. Allows for quick control lookup.
A notify callback that is called whenever the control changes value. Note that the handler's lock is held when the notify function is called!
Passed as argument to the v4l2_ctrl notify callback.
Total number of buckets in the array.
The error code of the first failed control addition.