Hi Cédric,

On Thursday 19 March 2009 09:27:07 [email protected] wrote:
> Hi,
>
> This is my problem, I don't have any errors. V4L2 API says that when you
> ask for a Width and Heigth, the driver will give you the max ones below
> the values you asked for. Meaning if you ask for 817x616, it will set
> 800x600 without returning any errors.
>
> My DMESG (no pb, I have got my "/dev/video0"):
>
> usb 1-2: new full speed USB device using ohci_hcd and address 3
> usb 1-2: configuration #1 chosen from 1 choice
> uvcvideo: Found UVC 1.00 device <unnamed> (046d:0991)
> input: UVC Camera (046d:0991) as
> /devices/pci0000:00/0000:00:02.2/usb1/1-2/1-2:1.0/input/input9
>
>
> An extract of my code, taken from the web (Capture.c):
>
> CLEAR (fmt);
>
> fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
> if (-1 == xioctl (fd, VIDIOC_G_FMT, &fmt))
>         errno_exit ("VIDIOC_G_FMT");
>
> fmt.fmt.pix.width       = WB_FRAME_WIDTH;   // 800
> fmt.fmt.pix.height      = WB_FRAME_HEIGHT;  // 600
> fmt.fmt.pix.pixelformat = WB_COLOR_FORMAT;  // YUYV which is perfect for me
> fmt.fmt.pix.field       = V4L2_FIELD_INTERLACED;
>
> // Note VIDIOC_S_FMT may change width and height
> // So I check the *new* values
>
> fprintf (stderr,
>         "width: %d\n"
>         "height: %d\n",
>         fmt.fmt.pix.width,
>         fmt.fmt.pix.height);
>
> It prints 176 by 144! What am I doing wrong?
> (later, I check the buffer size allocated via MMAP: 50688 => 176 x 144 x 2)
>
> Any ideas? Where could be the problem?

Try to set the trace parameter to UVC_TRACE_FORMAT (8). The driver will print 
debug messages to the kernel log with the format requested by the application.

echo 8 > /sys/modules/uvcvideo/parameters/trace

Best regards,

Laurent Pinchart

_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to