diff options
Diffstat (limited to 'test/sliced-vbi-test.c')
-rw-r--r-- | test/sliced-vbi-test.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/test/sliced-vbi-test.c b/test/sliced-vbi-test.c index a44f75565..3b4a7fc8f 100644 --- a/test/sliced-vbi-test.c +++ b/test/sliced-vbi-test.c @@ -37,9 +37,7 @@ #include <sys/ioctl.h> #include <sys/time.h> #include <math.h> -#include <linux/types.h> -#define __user #include <linux/videodev2.h> #define printable(c) ((((c) & 0x7F) < 0x20 || ((c) & 0x7F) > 0x7E) ? '.' : ((c) & 0x7F)) @@ -397,24 +395,24 @@ void process(struct v4l2_sliced_vbi_data *s) if (s->id == 0) return; - //printf("%04d: line %02u field %d type %x\n", frames, s->line, s->field, s->id); + //printf("%04d: line %02u field %d type %x\n", frames, s->line, s->field, s->id); switch (s->id) { case V4L2_SLICED_TELETEXT_B: printf("teletext\n"); break; case V4L2_SLICED_VPS: - if (s->line != 16 || s->field) - break; + if (s->line != 16 || s->field) + break; decode_vps(s); break; case V4L2_SLICED_WSS_625: - if (s->line != 23 || s->field) - break; + if (s->line != 23 || s->field) + break; decode_wss(s); break; case V4L2_SLICED_CAPTION_525: - if (s->line != 21) - break; + if (s->line != 21) + break; decode_cc(s); break; default: @@ -427,7 +425,7 @@ int main(int argc, char **argv) { char *device = "/dev/vbi0"; struct v4l2_format fmt; - v4l2_std_id std; + v4l2_std_id std; struct v4l2_sliced_vbi_data *buf; int fh; @@ -440,10 +438,10 @@ int main(int argc, char **argv) return 1; } - setbuf(stdout, NULL); + setbuf(stdout, NULL); ioctl(fh, VIDIOC_G_STD, &std); - fmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE; + fmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE; fmt.fmt.sliced.service_set = (std & V4L2_STD_NTSC) ? V4L2_SLICED_VBI_525 : V4L2_SLICED_VBI_625; fmt.fmt.sliced.reserved[0] = 0; fmt.fmt.sliced.reserved[1] = 0; @@ -461,7 +459,7 @@ int main(int argc, char **argv) if (size <= 0) break; - frames++; + frames++; for (i = 0; i < size / sizeof(struct v4l2_sliced_vbi_data); i++) { process(&buf[i]); } |