diff options
| author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-01-27 07:26:23 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-17 10:57:28 -0400 |
| commit | 78ea611385f08da6e52ff2ea15f0a26e89acb3ab (patch) | |
| tree | ab3c723c31933c06086660c4bac4b16d19a60434 /include/uapi/linux | |
| parent | 407d3a87e314f813d1a12bcffb9d12d1eff83379 (diff) | |
[media] v4l2: add a motion detection event
Add a new MOTION_DET event to signal when motion is detected.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/videodev2.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 632de96b42d5..1477abebd35b 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h | |||
| @@ -1799,6 +1799,7 @@ struct v4l2_streamparm { | |||
| 1799 | #define V4L2_EVENT_CTRL 3 | 1799 | #define V4L2_EVENT_CTRL 3 |
| 1800 | #define V4L2_EVENT_FRAME_SYNC 4 | 1800 | #define V4L2_EVENT_FRAME_SYNC 4 |
| 1801 | #define V4L2_EVENT_SOURCE_CHANGE 5 | 1801 | #define V4L2_EVENT_SOURCE_CHANGE 5 |
| 1802 | #define V4L2_EVENT_MOTION_DET 6 | ||
| 1802 | #define V4L2_EVENT_PRIVATE_START 0x08000000 | 1803 | #define V4L2_EVENT_PRIVATE_START 0x08000000 |
| 1803 | 1804 | ||
| 1804 | /* Payload for V4L2_EVENT_VSYNC */ | 1805 | /* Payload for V4L2_EVENT_VSYNC */ |
| @@ -1836,6 +1837,21 @@ struct v4l2_event_src_change { | |||
| 1836 | __u32 changes; | 1837 | __u32 changes; |
| 1837 | }; | 1838 | }; |
| 1838 | 1839 | ||
| 1840 | #define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ (1 << 0) | ||
| 1841 | |||
| 1842 | /** | ||
| 1843 | * struct v4l2_event_motion_det - motion detection event | ||
| 1844 | * @flags: if V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ is set, then the | ||
| 1845 | * frame_sequence field is valid. | ||
| 1846 | * @frame_sequence: the frame sequence number associated with this event. | ||
| 1847 | * @region_mask: which regions detected motion. | ||
| 1848 | */ | ||
| 1849 | struct v4l2_event_motion_det { | ||
| 1850 | __u32 flags; | ||
| 1851 | __u32 frame_sequence; | ||
| 1852 | __u32 region_mask; | ||
| 1853 | }; | ||
| 1854 | |||
| 1839 | struct v4l2_event { | 1855 | struct v4l2_event { |
| 1840 | __u32 type; | 1856 | __u32 type; |
| 1841 | union { | 1857 | union { |
| @@ -1843,6 +1859,7 @@ struct v4l2_event { | |||
| 1843 | struct v4l2_event_ctrl ctrl; | 1859 | struct v4l2_event_ctrl ctrl; |
| 1844 | struct v4l2_event_frame_sync frame_sync; | 1860 | struct v4l2_event_frame_sync frame_sync; |
| 1845 | struct v4l2_event_src_change src_change; | 1861 | struct v4l2_event_src_change src_change; |
| 1862 | struct v4l2_event_motion_det motion_det; | ||
| 1846 | __u8 data[64]; | 1863 | __u8 data[64]; |
| 1847 | } u; | 1864 | } u; |
| 1848 | __u32 pending; | 1865 | __u32 pending; |
