Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use unique device path per registered camera #17

Open
letmaik opened this issue Apr 19, 2021 · 1 comment · May be fixed by #36
Open

Use unique device path per registered camera #17

letmaik opened this issue Apr 19, 2021 · 1 comment · May be fixed by #36

Comments

@letmaik
Copy link

letmaik commented Apr 19, 2021

RegSetValueExA(hKey, "DevicePath", 0, REG_SZ, (LPBYTE)"foo:bar", (DWORD)sizeof("foo:bar"));

Applications which use the device path to differentiate cameras stumble since every registered Unity Video Capture instance uses the same device id. OBS has no problems with it, but for example Zoom shows all cameras but only allows to select the first one. Skype only shows the first one.

Quoting from the Microsoft docs:

The "DevicePath" property is not a human-readable string, but is guaranteed to be unique for each video capture device on the system. You can use this property to distinguish between two or more instances of the same model of device.

To be honest though, I'm not sure if this hack is needed anymore. The virtual camera from OBS doesn't have a device path and works in all apps incl Skype. Maybe it got fixed at some point in Windows? The forum thread referenced in the code is 9 years old.

@mirh
Copy link

mirh commented Jan 11, 2022

Skype was indeed bugged/regressed when it started to require it, and it was fixed soon as you can read in the comments of the blog linked in the thread.
But unity still requires it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants