mirror of
https://github.com/pion/mediadevices.git
synced 2025-09-26 20:41:46 +08:00
Removed 'unreachable' else initialization and replaced with error indicating a wtf
This commit is contained in:
@@ -46,6 +46,8 @@
|
|||||||
} \
|
} \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
static NSString *const UnrecognizedMacOSVersionException = @"UnrecognizedMacOSVersionException";
|
||||||
|
|
||||||
@interface VideoDataDelegate : NSObject<AVCaptureVideoDataOutputSampleBufferDelegate>
|
@interface VideoDataDelegate : NSObject<AVCaptureVideoDataOutputSampleBufferDelegate>
|
||||||
|
|
||||||
@property (readonly) AVBindDataCallback mCallback;
|
@property (readonly) AVBindDataCallback mCallback;
|
||||||
@@ -191,13 +193,10 @@ STATUS AVBindDevices(AVBindMediaType mediaType, PAVBindDevice *ppDevices, int *p
|
|||||||
AVCaptureDeviceTypeMicrophone,
|
AVCaptureDeviceTypeMicrophone,
|
||||||
AVCaptureDeviceTypeExternal,
|
AVCaptureDeviceTypeExternal,
|
||||||
];
|
];
|
||||||
}
|
} else {
|
||||||
else {
|
@throw [NSException exceptionWithName:UnrecognizedMacOSVersionException
|
||||||
refAllTypes = @[
|
reason:@"Unrecognized or unsupported macOS version detected."
|
||||||
AVCaptureDeviceTypeBuiltInWideAngleCamera,
|
userInfo:nil];
|
||||||
AVCaptureDeviceTypeBuiltInMicrophone,
|
|
||||||
AVCaptureDeviceTypeExternalUnknown,
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
refAllTypes = @[
|
refAllTypes = @[
|
||||||
|
Reference in New Issue
Block a user