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

use combobox to select v4l2loopback video device - #59

Open
yetist wants to merge 1 commit into
CatxFish:masterfrom
yetist:select-video-device
Open

use combobox to select v4l2loopback video device#59
yetist wants to merge 1 commit into
CatxFish:masterfrom
yetist:select-video-device

Conversation

@yetist

@yetist yetist commented Jul 6, 2020

Copy link
Copy Markdown
Contributor

Please review and test.

@yetist

yetist commented Jul 22, 2020

Copy link
Copy Markdown
Contributor Author

Before:

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

@colemickens

Copy link
Copy Markdown

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

@colemickens

Copy link
Copy Markdown

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