32 | | /***** v4l2 vbi-api *****/ |
33 | | |
34 | | /* #include "/usr/src/linux/include/linux/videodev2.h" */ |
35 | | |
36 | | enum v4l2_buf_type { |
37 | | V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, |
38 | | V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, |
39 | | V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, |
40 | | V4L2_BUF_TYPE_VBI_CAPTURE = 4, |
41 | | V4L2_BUF_TYPE_VBI_OUTPUT = 5, |
42 | | V4L2_BUF_TYPE_PRIVATE = 0x80, |
43 | | }; |
44 | | |
45 | | struct v4l2_vbi_format |
46 | | { |
47 | | unsigned int sampling_rate; /* in 1 Hz */ |
48 | | unsigned int offset; /* sampling starts # samples after rising hs */ |
49 | | unsigned int samples_per_line; |
50 | | unsigned int sample_format; /* V4L2_VBI_SF_* */ |
51 | | signed int start[2]; |
52 | | unsigned int count[2]; |
53 | | unsigned int flags; /* V4L2_VBI_* */ |
54 | | unsigned int reserved2; /* must be zero */ |
55 | | }; |
56 | | |
57 | | struct v4l2_format |
58 | | { |
59 | | enum v4l2_buf_type type; /* V4L2_BUF_TYPE_* */ |
60 | | union |
61 | | { |
62 | | struct v4l2_vbi_format vbi; /* VBI data */ |
63 | | unsigned char raw_data[200]; /* user-defined */ |
64 | | } fmt; |
65 | | }; |
66 | | |
67 | | #define V4L2_PIX_FMT_GREY 0x59455247 /* v4l2_fourcc('G','R','E','Y') *//* 8 Greyscale */ |
68 | | #define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format) |
69 | | |