diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-02-26 22:22:05 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-17 23:30:13 +0200 |
commit | e34c4db8fe5c8d47753057b2409f9b8388f1896e (patch) | |
tree | 644a3199f968f24b315ae9face51823e5e5ff5b0 /include | |
parent | [media] v4l2-dev: streamon/off is only a valid ioctl for video, vbi and sdr (diff) | |
download | linux-e34c4db8fe5c8d47753057b2409f9b8388f1896e.tar.xz linux-e34c4db8fe5c8d47753057b2409f9b8388f1896e.zip |
[media] videodev2.h: add V4L2_FIELD_HAS_T_OR_B macro
Add a macro to test if the field consists of a single top
or bottom field. Anyone who needs to work with fields as opposed to
frame will need this.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/videodev2.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index b73e8cda7192..1f1a65c1fe8e 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -124,6 +124,10 @@ enum v4l2_field { (field) == V4L2_FIELD_INTERLACED_BT ||\ (field) == V4L2_FIELD_SEQ_TB ||\ (field) == V4L2_FIELD_SEQ_BT) +#define V4L2_FIELD_HAS_T_OR_B(field) \ + ((field) == V4L2_FIELD_BOTTOM ||\ + (field) == V4L2_FIELD_TOP ||\ + (field) == V4L2_FIELD_ALTERNATE) enum v4l2_buf_type { V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, |