We’re using ofVideoGrabber to get webcam streams. The intent is to use GUI elements to switch between connected cams. In switching, we close the initialized one, set the ID, then initialize the new one:
Yes, that’s what I want to do in the futur too !
I know this block the camera for the other apps. I did try with Photobooth to use a camera that was initialized in my app but not updated, and this wasn’t possible.
So what ended up working was creating a pointer for the active cam, and a vector of ofVideoGrabbers.
Initialize one available device on each grabber.
Switching is just changing which index of the vector we’re pointing to.
That means all cameras are held by the software. This seems to only be a problem in Windows - no other software will be able to use the cameras. In OSX we were able to have multiple programs using cameras simultaneously, so maybe it’s a driver limitation.