Skip to content

Commit 05387b3

Browse files
committed
Merge pull request opencv#8271 from ziggy90127:avfoundation-bugfix1
2 parents 986d57c + d69b3e3 commit 05387b3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

modules/videoio/src/cap_avfoundation.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@ - (IplImage*)getOutput;
317317
capture = [[CaptureDelegate alloc] init];
318318

319319
AVCaptureDevice *device;
320-
NSArray* devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
320+
NSArray* devices = [[AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]
321+
arrayByAddingObjectsFromArray:[AVCaptureDevice devicesWithMediaType:AVMediaTypeMuxed]];
321322
if ([devices count] == 0) {
322323
std::cout << "AV Foundation didn't find any attached Video Input Devices!" << std::endl;
323324
[localpool drain];

modules/videoio/src/cap_avfoundation_mac.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ - (IplImage*)getOutput;
305305
NSAutoreleasePool *localpool = [[NSAutoreleasePool alloc] init];
306306

307307
// get capture device
308-
NSArray *devices = [AVCaptureDevice devicesWithMediaType: AVMediaTypeVideo];
308+
NSArray *devices = [[AVCaptureDevice devicesWithMediaType: AVMediaTypeVideo]
309+
arrayByAddingObjectsFromArray:[AVCaptureDevice devicesWithMediaType:AVMediaTypeMuxed]];
309310

310311
if ( devices.count == 0 ) {
311312
fprintf(stderr, "OpenCV: AVFoundation didn't find any attached Video Input Devices!\n");

0 commit comments

Comments
 (0)