V4L/DVB (5402): Add vsync_field to the union in video_event for VIDEO_EVENT_VSYNC
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 10 Mar 2007 09:24:30 +0000 (06:24 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 27 Apr 2007 18:44:23 +0000 (15:44 -0300)
VIDEO_EVENT_VSYNC needs to tell the application which field it was that
received a VSYNC (odd/even/progressive). The vsync_field was added to the
union in video_event for this purpose.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
include/linux/dvb/video.h

index a96da40c50f51834f269f11fc9bebc64ef2585c1..0c2a1c7c50a60c921cbd8c8c76740ff8f53bc568 100644 (file)
@@ -120,6 +120,13 @@ struct video_command {
        };
 };
 
+/* FIELD_UNKNOWN can be used if the hardware does not know whether
+   the Vsync is for an odd, even or progressive (i.e. non-interlaced)
+   field. */
+#define VIDEO_VSYNC_FIELD_UNKNOWN      (0)
+#define VIDEO_VSYNC_FIELD_ODD          (1)
+#define VIDEO_VSYNC_FIELD_EVEN         (2)
+#define VIDEO_VSYNC_FIELD_PROGRESSIVE  (3)
 
 struct video_event {
        int32_t type;
@@ -131,6 +138,7 @@ struct video_event {
        union {
                video_size_t size;
                unsigned int frame_rate;        /* in frames per 1000sec */
+               unsigned char vsync_field;      /* unknown/odd/even/progressive */
        } u;
 };