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

How to use this library to make two or more virtual webcams on Windows? #11

Closed
wukongxuetang opened this issue Sep 7, 2022 · 3 comments

Comments

@wukongxuetang
Copy link

It gave an error when running sender example while I add other virtual webcam.
first is active and second failed.

Ok, Softcam1 is now active.
failed to create camera2

1662542580483

@tshino
Copy link
Owner

tshino commented Sep 7, 2022

Thank you for your interest!
Unfortunately, this library can create only one virtual webcam.
Attempts to create a virtual webcam when another one already exists will fail.

It is not so easy thing to change this design because of the design of Windows.
In order to create multiple virtual webcams, we need to register multiple GUIDs (IDs for each webcam) to the system at installation.
And here we do only one:

const wchar_t FILTER_NAME[] = L"DirectShow Softcam";
const GUID &FILTER_CLASSID = CLSID_DShowSoftcam;

But if we register multiple GUIDs, that is just a starting point of whole things we need to complete changing the design of this library.
Instead, I chose the simplest design for this library.

@wukongxuetang
Copy link
Author

Thank you for your reply. It's very good to create only one virtual webcam. I hope this library has more functions.

@tshino
Copy link
Owner

tshino commented Sep 8, 2022

Thank you!

@tshino tshino closed this as completed Sep 8, 2022
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

No branches or pull requests

2 participants