本帖最后由 hceng 于 2019-12-23 14:34 编辑
我的扩展描述符如下
===>Video Control Extension Unit Descriptor<===
bLength: 0x1C
bDescriptorType: 0x24
bDescriptorSubtype: 0x06
bUnitID: 0x03
guidExtensionCode: {A22AD33D-DEBD-A540-A2DD-DE88D1B8725E}
bNumControls: 0x18
bNrInPins: 0x01
===>List of Connected Units and Terminal ID's
baSourceID[1]: 0x02
bControlSize: 0x03
bmControls : 0x01 0x00 0x00
D00 = 1 yes - Vendor-Specific (Optional)
D01 = 0 no - Vendor-Specific (Optional)
D02 = 0 no - Vendor-Specific (Optional)
D03 = 0 no - Vendor-Specific (Optional)
D04 = 0 no - Vendor-Specific (Optional)
D05 = 0 no - Vendor-Specific (Optional)
D06 = 0 no - Vendor-Specific (Optional)
D07 = 0 no - Vendor-Specific (Optional)
D08 = 0 no - Vendor-Specific (Optional)
D09 = 0 no - Vendor-Specific (Optional)
D10 = 0 no - Vendor-Specific (Optional)
D11 = 0 no - Vendor-Specific (Optional)
D12 = 0 no - Vendor-Specific (Optional)
D13 = 0 no - Vendor-Specific (Optional)
D14 = 0 no - Vendor-Specific (Optional)
D15 = 0 no - Vendor-Specific (Optional)
iExtension: 0x00
固件中跳转到扩展控件:
现在问题是用v4l2如何访问到自定义的扩展控件,如果用以下代码能访问到控件,下面的ec.id=多少??
struct v4l2_ext_controls ecs;
struct v4l2_ext_control ec;
memset(&ecs, 0, sizeof(ecs));
memset(&ec, 0, sizeof(ec));
ec.id = 多少??
ec.size = 2;
ec.value = 2;
ecs.controls = &ec;
ecs.count = 1;
ecs.ctrl_class = V4L2_CTRL_CLASS_FLASH;
int ret;
if( (ret = ioctl(vd->fd, VIDIOC_S_EXT_CTRLS, &ecs))<0)
{
trace("light set failed!\n");
}
|