summaryrefslogtreecommitdiff
path: root/test/sliced-vbi-test.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-05-13 08:04:53 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-05-13 08:04:53 -0300
commit6d1687f3c08ec5c408b776e3e291bc8a383091e4 (patch)
tree4618753f972a1d343f0c62333ddc04a392005bcf /test/sliced-vbi-test.c
parent348451c7a70fd16d28358881e282612275e19dd2 (diff)
downloadmediapointer-dvb-s2-6d1687f3c08ec5c408b776e3e291bc8a383091e4.tar.gz
mediapointer-dvb-s2-6d1687f3c08ec5c408b776e3e291bc8a383091e4.tar.bz2
Added a v4l vbi small test application.
From: Mauro Carvalho Chehab <mchehab@infradead.org> Also removed whitespaces from test environment Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'test/sliced-vbi-test.c')
-rw-r--r--test/sliced-vbi-test.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/sliced-vbi-test.c b/test/sliced-vbi-test.c
index a44f75565..ae4e1b27d 100644
--- a/test/sliced-vbi-test.c
+++ b/test/sliced-vbi-test.c
@@ -397,24 +397,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 +427,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 +440,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 +461,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]);
}