On Thu, March 19, 2009 14:30, Laurent Pinchart wrote:
> Hi Cédric,
>
>
> On Thursday 19 March 2009 09:27:07 lesc...@esiee.fr 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


I set the trace parameters  like you said.
First, I had a request for 176x144 format.
Then, I commented out those 2 lines:

(-1 == xioctl (fd,VIDIOC_G_FMT, &fmt))
   errno_exit ("VIDIOC_G_FMT");

And I got:

uvcvideo: Trying format 0x56595559 (YUYV): 640x480.
uvcvideo: Using default frame interval 66666.6 us (15.0 fps).
uvcvideo: Setting frame interval to 1/30 (333333).


Now, I have got the good request but it still does not work. The buffers'
size is still 506888, meaning the format is still 176x144 :(

Should I check anything else? I will try luvcview and give some more
feedback.

Best regards,


Cédric Lescop


_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to