tshino/softcam

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

wukongxuetang opened this issue · 3 comments

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

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.

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

Thank you!