diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-02 08:56:35 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-02 08:56:35 -0300 |
commit | b2f8e95b7447058a7d2911c4adefeccd19daa036 (patch) | |
tree | 6aee52907389fa6243df72133e47ed0bc7ac7c70 /v4l2-apps/test | |
parent | 22cae52e1c559233a22ba0d3c26b72678563e0cf (diff) | |
parent | 8f0e83410026fe17e678322dae788d75fb6cc03d (diff) | |
download | mediapointer-dvb-s2-b2f8e95b7447058a7d2911c4adefeccd19daa036.tar.gz mediapointer-dvb-s2-b2f8e95b7447058a7d2911c4adefeccd19daa036.tar.bz2 |
merge: http://linuxtv.org/hg/~tap/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l2-apps/test')
-rw-r--r-- | v4l2-apps/test/ioctl-test.c | 6 | ||||
-rw-r--r-- | v4l2-apps/test/v4lgrab.c | 4 | ||||
-rw-r--r-- | v4l2-apps/test/vbi-test.c | 6 |
3 files changed, 14 insertions, 2 deletions
diff --git a/v4l2-apps/test/ioctl-test.c b/v4l2-apps/test/ioctl-test.c index 61659dc78..6d78ad0f8 100644 --- a/v4l2-apps/test/ioctl-test.c +++ b/v4l2-apps/test/ioctl-test.c @@ -54,6 +54,7 @@ union v4l_parms { unsigned long l; u32 u_32; +#ifdef CONFIG_VIDEO_V4L1_COMPAT /* V4L1 structs */ struct vbi_format p_vbi_format; struct video_audio p_video_audio; @@ -71,6 +72,7 @@ union v4l_parms { struct video_tuner p_video_tuner; struct video_unit p_video_unit; struct video_window p_video_window; +#endif /* V4L2 structs */ struct v4l2_audioout p_v4l2_audioout; @@ -106,8 +108,8 @@ union v4l_parms { /* All defined ioctls */ int ioctls[] = { +#ifdef CONFIG_VIDEO_V4L1_COMPAT /* V4L ioctls */ - VIDIOCCAPTURE,/* int */ VIDIOCGAUDIO,/* struct video_audio */ VIDIOCGCAP,/* struct video_capability */ @@ -137,7 +139,7 @@ int ioctls[] = { VIDIOCSWIN,/* struct video_window */ VIDIOCSWRITEMODE,/* int */ VIDIOCSYNC,/* int */ - +#endif /* V4L2 ioctls */ VIDIOC_CROPCAP,/* struct v4l2_cropcap */ diff --git a/v4l2-apps/test/v4lgrab.c b/v4l2-apps/test/v4lgrab.c index c8d433c1d..07c50ef89 100644 --- a/v4l2-apps/test/v4lgrab.c +++ b/v4l2-apps/test/v4lgrab.c @@ -91,6 +91,7 @@ int get_brightness_adj(unsigned char *image, long size, int *brightness) int main(int argc, char **argv) { +#ifdef CONFIG_VIDEO_V4L1_COMPAT int fd = open(FILE, O_RDONLY), f; struct video_capability cap; struct video_window win; @@ -190,5 +191,8 @@ int main(int argc, char **argv) } close(fd); +#else + fprintf(stderr, "V4L1 API is not configured!\n"); +#endif return 0; } diff --git a/v4l2-apps/test/vbi-test.c b/v4l2-apps/test/vbi-test.c index c1a141bff..febd86d43 100644 --- a/v4l2-apps/test/vbi-test.c +++ b/v4l2-apps/test/vbi-test.c @@ -29,8 +29,10 @@ /* All possible parameters used on v4l ioctls */ union v4l_parms { +#ifdef CONFIG_VIDEO_V4L1_COMPAT /* V4L1 structs */ struct vbi_format v1; +#endif /* V4L2 structs */ struct v4l2_format v2; @@ -38,9 +40,11 @@ union v4l_parms { /* All defined ioctls */ int ioctls[] = { +#ifdef CONFIG_VIDEO_V4L1_COMPAT /* V4L ioctls */ VIDIOCGVBIFMT,/* struct vbi_format */ +#endif /* V4L2 ioctls */ @@ -61,6 +65,7 @@ int main (void) } +#ifdef CONFIG_VIDEO_V4L1_COMPAT /* V4L1 call */ memset(&p,0,sizeof(p)); ret=ioctl(fd,VIDIOCGVBIFMT, (void *) &p); @@ -69,6 +74,7 @@ int main (void) "sample_format=%d, start=%d/%d, count=%d/%d, flags=%d\n", ret, p.v1.sampling_rate,p.v1.samples_per_line, p.v1.sample_format, p.v1.start[0],p.v1.start[1],p.v1.count[0],p.v1.count[1],p.v1.flags); +#endif /* V4L2 call */ |