Hi,

 

I have a webcam with two pixel formats:

 

$ v4l2-ctl --list-formats-ext

ioctl: VIDIOC_ENUM_FMT

                Index       : 0

                Type        : Video Capture

                Pixel Format: 'YUYV'

                Name        : YUV 4:2:2 (YUYV)

                               Size: Discrete 640x480

                                               Interval: Discrete 0.040
s (25.000 fps)

                                               Interval: Discrete 0.100
s (10.000 fps)

                                               Interval: Discrete 0.200
s (5.000 fps)

 

                Index       : 1

                Type        : Video Capture

                Pixel Format: ''

                Name        : 20363159-0000-0010-8000-00aa003

                               Size: Discrete 640x480

                                               Interval: Discrete 0.040
s (25.000 fps)

                                               Interval: Discrete 0.100
s (10.000 fps)

                                               Interval: Discrete 0.200
s (5.000 fps)

 

The first is 8bit YUYV and the second is 14bit Y6 (FOURCC 0x20363159)
compliant...

 

But when I try to initiate the device with the following code... fails
(VIDIOC_S_FMT error 22, Invalid argument):

 

struct v4l2_format fmt;  

fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;  

fmt.fmt.pix.width = width;  

fmt.fmt.pix.height = height;  

fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_Y16 /* that is, FOURCC 0x20363159
pixel_format; */

fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;  

if (-1 == xioctl(fd, VIDIOC_S_FMT, &fmt))  

  errno_exit("VIDIOC_S_FMT");   

 

There is another way to initiate the device indicating the index of the
pixel format I'm interested in (Y16 FOURCC 0x20363159)?

 

 

Thanks.

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

Reply via email to