Commit eab00a0d authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

[media] v4l: events: Define V4L2_EVENT_FRAME_SYNC

Define a frame sync event to tell user space when the reception of a frame
starts.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c9f88aa9
...@@ -86,6 +86,12 @@ ...@@ -86,6 +86,12 @@
<entry>Event data for event V4L2_EVENT_CTRL. <entry>Event data for event V4L2_EVENT_CTRL.
</entry> </entry>
</row> </row>
<row>
<entry></entry>
<entry>&v4l2-event-frame-sync;</entry>
<entry><structfield>frame</structfield></entry>
<entry>Event data for event V4L2_EVENT_FRAME_SYNC.</entry>
</row>
<row> <row>
<entry></entry> <entry></entry>
<entry>__u8</entry> <entry>__u8</entry>
...@@ -220,6 +226,22 @@ ...@@ -220,6 +226,22 @@
</tgroup> </tgroup>
</table> </table>
<table frame="none" pgwide="1" id="v4l2-event-frame-sync">
<title>struct <structname>v4l2_event_frame_sync</structname></title>
<tgroup cols="3">
&cs-str;
<tbody valign="top">
<row>
<entry>__u32</entry>
<entry><structfield>frame_sequence</structfield></entry>
<entry>
The sequence number of the frame being received.
</entry>
</row>
</tbody>
</tgroup>
</table>
<table pgwide="1" frame="none" id="changes-flags"> <table pgwide="1" frame="none" id="changes-flags">
<title>Changes</title> <title>Changes</title>
<tgroup cols="3"> <tgroup cols="3">
......
...@@ -138,6 +138,22 @@ ...@@ -138,6 +138,22 @@
field of the oldest event.</para> field of the oldest event.</para>
</entry> </entry>
</row> </row>
<row>
<entry><constant>V4L2_EVENT_FRAME_SYNC</constant></entry>
<entry>4</entry>
<entry>
<para>Triggered immediately when the reception of a
frame has begun. This event has a
&v4l2-event-frame-sync; associated with it.</para>
<para>If the hardware needs to be stopped in the case of a
buffer underrun it might not be able to generate this event.
In such cases the <structfield>frame_sequence</structfield>
field in &v4l2-event-frame-sync; will not be incremented. This
causes two consecutive frame sequence numbers to have n times
frame interval in between them.</para>
</entry>
</row>
<row> <row>
<entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry>
<entry>0x08000000</entry> <entry>0x08000000</entry>
......
...@@ -2006,6 +2006,7 @@ struct v4l2_streamparm { ...@@ -2006,6 +2006,7 @@ struct v4l2_streamparm {
#define V4L2_EVENT_VSYNC 1 #define V4L2_EVENT_VSYNC 1
#define V4L2_EVENT_EOS 2 #define V4L2_EVENT_EOS 2
#define V4L2_EVENT_CTRL 3 #define V4L2_EVENT_CTRL 3
#define V4L2_EVENT_FRAME_SYNC 4
#define V4L2_EVENT_PRIVATE_START 0x08000000 #define V4L2_EVENT_PRIVATE_START 0x08000000
/* Payload for V4L2_EVENT_VSYNC */ /* Payload for V4L2_EVENT_VSYNC */
...@@ -2032,11 +2033,16 @@ struct v4l2_event_ctrl { ...@@ -2032,11 +2033,16 @@ struct v4l2_event_ctrl {
__s32 default_value; __s32 default_value;
}; };
struct v4l2_event_frame_sync {
__u32 frame_sequence;
};
struct v4l2_event { struct v4l2_event {
__u32 type; __u32 type;
union { union {
struct v4l2_event_vsync vsync; struct v4l2_event_vsync vsync;
struct v4l2_event_ctrl ctrl; struct v4l2_event_ctrl ctrl;
struct v4l2_event_frame_sync frame_sync;
__u8 data[64]; __u8 data[64];
} u; } u;
__u32 pending; __u32 pending;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment