[media] videodev2.h: add initial support for compound controls
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 27 Mar 2014 14:25:45 +0000 (11:25 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 17 Jul 2014 13:38:44 +0000 (10:38 -0300)
commit7e6a68210784dcea8e39fd9d4c9966f9c733ba09
tree0ed9fbef6e8f0bb0c67d9fda48f840e27e987d53
parent7eafbce91b50317ef92d43c61b30a46cebe49f03
[media] videodev2.h: add initial support for compound controls

Compound controls are controls that can be used for compound and array
types. This allows for more compound data structures to be used with the
control framework.

The existing V4L2_CTRL_FLAG_NEXT_CTRL flag will only enumerate non-compound
controls, so a new V4L2_CTRL_FLAG_NEXT_COMPOUND flag is added to enumerate
compound controls. Set both flags to enumerate any control (compound or not).

Compound control types will start at V4L2_CTRL_COMPOUND_TYPES. In addition, any
control that uses the new 'ptr' field or the existing 'string' field will have
flag V4L2_CTRL_FLAG_HAS_PAYLOAD set.

While not strictly necessary, adding that flag makes life for applications
a lot simpler. If the flag is not set, then the control value is set
through the value or value64 fields of struct v4l2_ext_control, otherwise
a pointer points to the value.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
include/uapi/linux/videodev2.h