Add AVMediaTypeMuxed capture devices to AVFoundation, just as QTKit does.

This commit is contained in:
ziggy90127 2017-02-25 15:48:09 -07:00
parent dcbed8d676
commit 0aadab0941

View File

@ -305,7 +305,8 @@ int CvCaptureCAM::startCaptureDevice(int cameraNum) {
NSAutoreleasePool *localpool = [[NSAutoreleasePool alloc] init];
// get capture device
NSArray *devices = [AVCaptureDevice devicesWithMediaType: AVMediaTypeVideo];
NSArray *devices = [[AVCaptureDevice devicesWithMediaType: AVMediaTypeVideo]
arrayByAddingObjectsFromArray:[AVCaptureDevice devicesWithMediaType:AVMediaTypeMuxed]];
if ( devices.count == 0 ) {
fprintf(stderr, "OpenCV: AVFoundation didn't find any attached Video Input Devices!\n");