obs-v4l2sink icon indicating copy to clipboard operation
obs-v4l2sink copied to clipboard

use combobox to select v4l2loopback video device

Open yetist opened this issue 4 years ago • 3 comments

Please review and test.

yetist avatar Jul 06 '20 07:07 yetist

Before:

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

yetist avatar Jul 22 '20 09:07 yetist

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

colemickens avatar Sep 06 '20 10:09 colemickens

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.

colemickens avatar Sep 06 '20 10:09 colemickens