mirror of
https://github.com/opencv/opencv.git
synced 2025-07-25 22:57:53 +08:00
Add AVMediaTypeMuxed capture devices to AVFoundation, just as QTKit does.
This commit is contained in:
parent
dcbed8d676
commit
0aadab0941
@ -305,7 +305,8 @@ int CvCaptureCAM::startCaptureDevice(int cameraNum) {
|
|||||||
NSAutoreleasePool *localpool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool *localpool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
// get capture device
|
// get capture device
|
||||||
NSArray *devices = [AVCaptureDevice devicesWithMediaType: AVMediaTypeVideo];
|
NSArray *devices = [[AVCaptureDevice devicesWithMediaType: AVMediaTypeVideo]
|
||||||
|
arrayByAddingObjectsFromArray:[AVCaptureDevice devicesWithMediaType:AVMediaTypeMuxed]];
|
||||||
|
|
||||||
if ( devices.count == 0 ) {
|
if ( devices.count == 0 ) {
|
||||||
fprintf(stderr, "OpenCV: AVFoundation didn't find any attached Video Input Devices!\n");
|
fprintf(stderr, "OpenCV: AVFoundation didn't find any attached Video Input Devices!\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user