This revised code uses the behavior of a virtual camera capture object connected via CAP_DSHOW to identify it and remove it from the list of legitimate cameras.
In testing on my setup, a CAP_DSHOW virtual camera can be set to any resolution, so this Pull Request flags virtual cameras as those that will accept a resolution change to 599x599.
This is distinct from the behavior of a CAP_ANY virtual camera that can only be set to one resolution.
While the CAP_ANY backend allows quick determination of possible resolutions the CAP_DSHOW backend is more time intensive (~ 1 second per tested resolution). I have removed the resolution verification code from this PR for simplicity's sake.
The CAP_ANY behavior may be useful for performing camera/resolution validation on MacOS and linux, but I'm not currently set up to test this implementation so leave for a future time.
Tested on: Windows 10
Webcams tested: Logitech Webcam C930e, Logitech C310 HD WebCam, HD Webcam eMeet C960, Razer Kiyo Pro
This revised code uses the behavior of a virtual camera capture object connected via CAP_DSHOW to identify it and remove it from the list of legitimate cameras.
In testing on my setup, a CAP_DSHOW virtual camera can be set to any resolution, so this Pull Request flags virtual cameras as those that will accept a resolution change to 599x599.
This is distinct from the behavior of a CAP_ANY virtual camera that can only be set to one resolution.
While the CAP_ANY backend allows quick determination of possible resolutions the CAP_DSHOW backend is more time intensive (~ 1 second per tested resolution). I have removed the resolution verification code from this PR for simplicity's sake.
The CAP_ANY behavior may be useful for performing camera/resolution validation on MacOS and linux, but I'm not currently set up to test this implementation so leave for a future time.
Tested on: Windows 10
Webcams tested: Logitech Webcam C930e, Logitech C310 HD WebCam, HD Webcam eMeet C960, Razer Kiyo Pro
Virtual Camera: OBS