diff options
Diffstat (limited to 'test/ioctl-test.c')
-rw-r--r-- | test/ioctl-test.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/test/ioctl-test.c b/test/ioctl-test.c index 3f2fefc44..4b47cd9e7 100644 --- a/test/ioctl-test.c +++ b/test/ioctl-test.c @@ -6,7 +6,7 @@ and v4l_decoder.h. These messages shouldn't be handled by video driver itself, but for internal video and/or audio decoders. - Copyright (C) 2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> + Copyright (C) 2005 Mauro Carvalho Chehab <mchehab@infradead.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,7 +23,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define INTERNAL 1 /* meant for testing ioctl debug msgs */ +/* + * Internal ioctl doesn't work anymore, due to the changes at + * v4l2-dev.h. + */ +//#define INTERNAL 1 /* meant for testing ioctl debug msgs */ #include <stdio.h> #include <unistd.h> @@ -32,8 +36,7 @@ #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h> -#define __user -#include <linux/videodev.h> +#include "../linux/include/linux/videodev.h" #ifdef INTERNAL typedef __u8 u8; @@ -41,6 +44,8 @@ typedef __u32 u32; #include <linux/version.h> #include "../linux/include/media/v4l2-common.h" #include <linux/video_decoder.h> +#else +typedef u_int32_t u32; #endif /* All possible parameters used on v4l ioctls */ @@ -143,8 +148,8 @@ int ioctls[] = { VIDIOC_ENUMINPUT,/* struct v4l2_input */ VIDIOC_ENUMOUTPUT,/* struct v4l2_output */ VIDIOC_ENUMSTD,/* struct v4l2_standard */ - VIDIOC_G_AUDIO_OLD,/* struct v4l2_audio */ - VIDIOC_G_AUDOUT_OLD,/* struct v4l2_audioout */ +// VIDIOC_G_AUDIO_OLD,/* struct v4l2_audio */ +// VIDIOC_G_AUDOUT_OLD,/* struct v4l2_audioout */ VIDIOC_G_CROP,/* struct v4l2_crop */ VIDIOC_G_CTRL,/* struct v4l2_control */ VIDIOC_G_FMT,/* struct v4l2_format */ @@ -152,7 +157,7 @@ int ioctls[] = { VIDIOC_G_MODULATOR,/* struct v4l2_modulator */ VIDIOC_G_PARM,/* struct v4l2_streamparm */ VIDIOC_G_TUNER,/* struct v4l2_tuner */ - VIDIOC_OVERLAY_OLD,/* int */ +// VIDIOC_OVERLAY_OLD,/* int */ VIDIOC_QBUF,/* struct v4l2_buffer */ VIDIOC_QUERYBUF,/* struct v4l2_buffer */ VIDIOC_QUERYCTRL,/* struct v4l2_queryctrl */ @@ -200,7 +205,7 @@ int main (void) char *device="/dev/video0"; union v4l_parms p; - if ((fd = open(device, O_RDONLY)) < 0) { + if ((fd = open(device, O_RDONLY)) < 0) { perror("Couldn't open video0"); return(-1); } |