mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Use AVCaptureDeviceDiscoverySession on all platforms
Bug: b/288827308 Change-Id: I345d62bb44f947412a0a448f0feadca8b0dc9d2d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310621 Commit-Queue: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40383}
This commit is contained in:
parent
079b36bd4f
commit
9948623027
3 changed files with 2 additions and 8 deletions
1
.gn
1
.gn
|
@ -50,7 +50,6 @@ default_args = {
|
|||
mac_sdk_min = "10.12"
|
||||
|
||||
ios_deployment_target = "12.0"
|
||||
mac_deployment_target = "10.13"
|
||||
|
||||
# The SDK API level, in contrast, is set by build/android/AndroidManifest.xml.
|
||||
android32_ndk_api_level = 21
|
||||
|
|
|
@ -238,7 +238,7 @@ static NSUInteger const kBottomViewHeight = 200;
|
|||
_connectButton = [[NSButton alloc] initWithFrame:NSZeroRect];
|
||||
[_connectButton setTranslatesAutoresizingMaskIntoConstraints:NO];
|
||||
_connectButton.title = @"Start call";
|
||||
_connectButton.bezelStyle = NSRoundedBezelStyle;
|
||||
_connectButton.bezelStyle = NSBezelStyleSmallSquare;
|
||||
_connectButton.target = self;
|
||||
_connectButton.action = @selector(startCall:);
|
||||
[_actionItemsView addSubview:_connectButton];
|
||||
|
@ -246,7 +246,7 @@ static NSUInteger const kBottomViewHeight = 200;
|
|||
_loopbackButton = [[NSButton alloc] initWithFrame:NSZeroRect];
|
||||
[_loopbackButton setTranslatesAutoresizingMaskIntoConstraints:NO];
|
||||
_loopbackButton.title = @"Loopback";
|
||||
[_loopbackButton setButtonType:NSSwitchButton];
|
||||
[_loopbackButton setButtonType:NSButtonTypeSwitch];
|
||||
[_actionItemsView addSubview:_loopbackButton];
|
||||
}
|
||||
|
||||
|
|
|
@ -118,16 +118,11 @@ const int64_t kNanosecondsPerSecond = 1000000000;
|
|||
}
|
||||
|
||||
+ (NSArray<AVCaptureDevice *> *)captureDevices {
|
||||
#if defined(WEBRTC_IOS) && defined(__IPHONE_10_0) && \
|
||||
__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_10_0
|
||||
AVCaptureDeviceDiscoverySession *session = [AVCaptureDeviceDiscoverySession
|
||||
discoverySessionWithDeviceTypes:@[ AVCaptureDeviceTypeBuiltInWideAngleCamera ]
|
||||
mediaType:AVMediaTypeVideo
|
||||
position:AVCaptureDevicePositionUnspecified];
|
||||
return session.devices;
|
||||
#else
|
||||
return [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
|
||||
#endif
|
||||
}
|
||||
|
||||
+ (NSArray<AVCaptureDeviceFormat *> *)supportedFormatsForDevice:(AVCaptureDevice *)device {
|
||||
|
|
Loading…
Reference in a new issue