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

pull/8271/head
ziggy90127 8 years ago
parent dcbed8d676
commit 0aadab0941
  1. 3
      modules/videoio/src/cap_avfoundation_mac.mm

@ -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");

Loading…
Cancel
Save