21, 01, 1, 0x600, 0x400, buf, 0x7, 1000
21 - CLASS
01 - DIRECTION
0x600 - ?
0x400 - ?
buf - buf
0x7 - sizeof(buf)
1000 - timeout
it's dump via usbmon.
For example setting brightness
# v4l2-ctl -c brightness=1
in dump look like a
s 21 01 0200 0001 001a 26 =
01000101 15160500 00000000 00000000 52890060 0900000c 0000
. . . . . . . . . . . . . . . . R . . ` . . . . . .
503f1000 3992.234728 S Co:1:021:0 s 21 01 0200 0300 0002 2 =
0200
or in libusb
#define BRIGHT "\x02\x00"
memcpy(buf, BRIGHT, 0x2);
usb_control_msg(devh, USB_TYPE_CLASS + USB_RECIP_INTERFACE, 1, 0x200, 0x300,
buf, 0x2, 1000);
or via ioctl()
struct v4l2_ext_control xctrl;
ctrl.id = V4L2_CID_BRIGHTNESS;
ctrl.value = 0x2;
fd = open("/dev/video0", O_RDWR);
ioctl(fd, VIDIOC_S_EXT_CTRLS, &xctrl);
---
What do you think, what me need insert into struct v4l2_ext_control,
that have turned out 0x600 and 0x400 in USB control message?
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel