Skip to content
This repository was archived by the owner on Mar 15, 2021. It is now read-only.

Conversation

yetist
Copy link
Contributor

@yetist yetist commented Jul 6, 2020

Please review and test.

@yetist
Copy link
Contributor Author

yetist commented Jul 22, 2020

Before:

After:
2020-07-22 17-17-48 创建的截图

@colemickens
Copy link

Is it possible that this doesn't work with devices that have exclusive_caps=1 ?

@colemickens
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants