I have three c920 Logitech cameras attached to a brand new M2 Mac mini with macOS 13.
I am using the simple videoGrabberExample and added options to close the grabber and init with a different deviceID.
I noticed that there is inconsistent behaviour on which camera gets connected. When I init with the same deviceID different camera video streams appear on the screen.
I am not sure why.
if(key == '0'){
if(vidGrabber.isInitialized()) vidGrabber.close();
}
if(key == '1'){
vidGrabber.setDeviceID(0);
vidGrabber.setDesiredFrameRate(30);
vidGrabber.setup(camWidth, camHeight);
}
if(key == '2'){
vidGrabber.setDeviceID(1);
vidGrabber.setDesiredFrameRate(30);
vidGrabber.setup(camWidth, camHeight);
}
if(key == '3'){
vidGrabber.setDeviceID(2);
vidGrabber.setDesiredFrameRate(30);
vidGrabber.setup(camWidth, camHeight);
}