Open yetist opened 4 years ago
Before:
After:
Is it possible that this doesn't work with devices that have exclusive_caps=1
?
I can confirm, if I remove these lines, then I still get a dropdown, and I get all v4l2 devices in the dropdown:
if (video_cap.capabilities & V4L2_CAP_DEVICE_CAPS) {
caps = video_cap.device_caps;
} else {
caps = video_cap.capabilities;
}
if (!(caps & V4L2_CAP_VIDEO_CAPTURE)) {
::close(fd);
continue;
}
if (strcmp((char*) video_cap.driver, "v4l2 loopback") != 0) {
::close(fd);
continue;
}
One of those checks doesn't hold when exclusive_caps=1
is used.
Please review and test.