Reputation: 1793
I use arm mac m1. Photo booth shows me two devices - my external USB camera and a virtual camera from OBS v30.1.2
I'm trying to get a list of capture devices in Xcode (15 and 16 beta).
I run my app on "My Mac (Designed for IPhone)" and only get a microphone.
Do you know how to get obs virtual camera in xcode?
NSArray *devices = [AVCaptureDevice devices];
AVCaptureDevice *frontCamera;
AVCaptureDevice *backCamera;
for (AVCaptureDevice *device in devices) {
NSLog(@"Device name: %@", [device localizedName]);
if ([device hasMediaType:AVMediaTypeVideo]) {
if ([device position] == AVCaptureDevicePositionBack) {
NSLog(@"Device position : back");
backCamera = device;
}
else {
NSLog(@"Device position : front");
frontCamera = device;
}
}
}
Upvotes: 1
Views: 70