|
From: Luc S. <lu...@sa...> - 2006-02-23 10:21:55
|
On Thu, Feb 23, 2006 at 09:30:22AM +0100, Thomas Reifferscheid wrote:
> Sorry for the mime encoded patch.
>
> Here is it again.
>
> diff -Naur -x entries trunk/uvcvideo.c current/uvcvideo.c
> --- trunk/uvcvideo.c 2006-02-23 08:58:54.000000000 +0100
> +++ current/uvcvideo.c 2006-02-23 08:48:50.000000000 +0100
> @@ -320,6 +320,7 @@
>
> enum uvc_device_state {
> UVC_DEV_DISCONNECTED = 1,
> + UVC_DEV_IOERROR = 2,
> };
>
> struct uvc_device {
> @@ -889,8 +890,8 @@
> uvc_trace(UVC_TRACE_CAPTURE, "Dequeuing buffer %u.\n",
> v4l2_buf->index);
>
> - if (v4l2_buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
> - v4l2_buf->memory != V4L2_MEMORY_MMAP) {
> + if (v4l2_buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE
> +/* v4l2_buf->memory != V4L2_MEMORY_MMAP */ ) {
> uvc_trace(UVC_TRACE_CAPTURE, "[E] Invalid buffer type (%u) "
> "and/or memory (%u).\n", v4l2_buf->type,
> v4l2_buf->memory);
Sorry but this is problem with the application and not the driver. The pwc
driver enforces this value too (else it's a bug). Application need to be
modify to fix the bug in the application. Any ioctl values need to be
allocated or cleared before the system call. Valgrind detect this type of
bug.
> @@ -1342,6 +1343,31 @@
> return 0;
> }
>
> + case VIDIOC_G_STD:
> + {
> + v4l2_std_id *std = arg;
> + *std = V4L2_STD_NTSC;
> + return 0;
Why don't use V4L2_STD_UNKNOWN ? and Laurent have already say that mplayer
and other program need to be fixed ...
And please remove comment with // or /* that removes code and do not add
comments.
Luc
|