From a62abeb1ef059eef73c99b2bad538e0456be541d Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Mon, 18 Jul 2011 08:40:03 -0300 Subject: [PATCH] --- yaml --- r: 271679 b: refs/heads/master c: eab00a0da292fa7118aaf20da78e834866de00ae h: refs/heads/master i: 271677: 70682c2522a21fed1be307d2bee10e927df5a2c4 271675: 8739d4d480eced5e436cad7784fecc5019c97b43 271671: 5adff507dcce887a7ef8161b732f1d544a24a90d 271663: be78fc58b80bf26285c344b5be77f0b8c08667f8 271647: f4c749c1775404dceef78780f4b804d1c7d97dd0 271615: e36eb74819f0294a59e678c506f840b3199616c2 v: v3 --- [refs] | 2 +- .../DocBook/media/v4l/vidioc-dqevent.xml | 22 +++++++++++++++++++ .../media/v4l/vidioc-subscribe-event.xml | 16 ++++++++++++++ trunk/include/linux/videodev2.h | 12 +++++++--- 4 files changed, 48 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 49ca652922ba..8f8f38108662 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c9f88aa976b79a26561fb7754a1e0e00ff7626fe +refs/heads/master: eab00a0da292fa7118aaf20da78e834866de00ae diff --git a/trunk/Documentation/DocBook/media/v4l/vidioc-dqevent.xml b/trunk/Documentation/DocBook/media/v4l/vidioc-dqevent.xml index 5200b6874654..e8714aa16433 100644 --- a/trunk/Documentation/DocBook/media/v4l/vidioc-dqevent.xml +++ b/trunk/Documentation/DocBook/media/v4l/vidioc-dqevent.xml @@ -86,6 +86,12 @@ Event data for event V4L2_EVENT_CTRL. + + + &v4l2-event-frame-sync; + frame + Event data for event V4L2_EVENT_FRAME_SYNC. + __u8 @@ -220,6 +226,22 @@ + + struct <structname>v4l2_event_frame_sync</structname> + + &cs-str; + + + __u32 + frame_sequence + + The sequence number of the frame being received. + + + + +
+ Changes diff --git a/trunk/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml b/trunk/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml index 275be9689d88..5c70b616d818 100644 --- a/trunk/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml +++ b/trunk/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml @@ -138,6 +138,22 @@ field of the oldest event. + + V4L2_EVENT_FRAME_SYNC + 4 + + Triggered immediately when the reception of a + frame has begun. This event has a + &v4l2-event-frame-sync; associated with it. + + 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 frame_sequence + 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. + + V4L2_EVENT_PRIVATE_START 0x08000000 diff --git a/trunk/include/linux/videodev2.h b/trunk/include/linux/videodev2.h index fca24cc50436..a5359c6e7577 100644 --- a/trunk/include/linux/videodev2.h +++ b/trunk/include/linux/videodev2.h @@ -2006,6 +2006,7 @@ struct v4l2_streamparm { #define V4L2_EVENT_VSYNC 1 #define V4L2_EVENT_EOS 2 #define V4L2_EVENT_CTRL 3 +#define V4L2_EVENT_FRAME_SYNC 4 #define V4L2_EVENT_PRIVATE_START 0x08000000 /* Payload for V4L2_EVENT_VSYNC */ @@ -2032,12 +2033,17 @@ struct v4l2_event_ctrl { __s32 default_value; }; +struct v4l2_event_frame_sync { + __u32 frame_sequence; +}; + struct v4l2_event { __u32 type; union { - struct v4l2_event_vsync vsync; - struct v4l2_event_ctrl ctrl; - __u8 data[64]; + struct v4l2_event_vsync vsync; + struct v4l2_event_ctrl ctrl; + struct v4l2_event_frame_sync frame_sync; + __u8 data[64]; } u; __u32 pending; __u32 sequence;