Increase iOS deployment target from 10 to 12.

TBR=kthelgason@webrtc.org

Bug: webrtc:12928
Change-Id: I50de09972bf012e78a9bc9f1d98d8d07aab4e180
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224543
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34409}
This commit is contained in:
Björn Terelius 2021-07-02 16:19:32 +02:00 committed by WebRTC LUCI CQ
parent 94f2ef2e84
commit 02768ae4f8
5 changed files with 35 additions and 15 deletions
.gn
examples/objc/AppRTCMobile
sdk
tools_webrtc/ios

2
.gn
View file

@ -44,7 +44,7 @@ default_args = {
mac_sdk_min = "10.12" mac_sdk_min = "10.12"
ios_deployment_target = "10.0" ios_deployment_target = "12.0"
# The SDK API level, in contrast, is set by build/android/AndroidManifest.xml. # The SDK API level, in contrast, is set by build/android/AndroidManifest.xml.
android32_ndk_api_level = 16 android32_ndk_api_level = 16

View file

@ -77,16 +77,30 @@ NS_ASSUME_NONNULL_BEGIN
- (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)currentVideoCodecSettingFromStore { - (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)currentVideoCodecSettingFromStore {
[self registerStoreDefaults]; [self registerStoreDefaults];
NSData *codecData = [[self settingsStore] videoCodec]; NSData *codecData = [[self settingsStore] videoCodec];
return [NSKeyedUnarchiver unarchiveObjectWithData:codecData]; Class expectedClass = [RTC_OBJC_TYPE(RTCVideoCodecInfo) class];
NSError *error;
RTC_OBJC_TYPE(RTCVideoCodecInfo) *videoCodecSetting =
[NSKeyedUnarchiver unarchivedObjectOfClass:expectedClass fromData:codecData error:&error];
if (!error) {
return videoCodecSetting;
}
return nil;
} }
- (BOOL)storeVideoCodecSetting:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)videoCodec { - (BOOL)storeVideoCodecSetting:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)videoCodec {
if (![[self availableVideoCodecs] containsObject:videoCodec]) { if (![[self availableVideoCodecs] containsObject:videoCodec]) {
return NO; return NO;
} }
NSData *codecData = [NSKeyedArchiver archivedDataWithRootObject:videoCodec];
[[self settingsStore] setVideoCodec:codecData]; NSError *error;
return YES; NSData *codecData = [NSKeyedArchiver archivedDataWithRootObject:videoCodec
requiringSecureCoding:NO
error:&error];
if (!error) {
[[self settingsStore] setVideoCodec:codecData];
return YES;
}
return NO;
} }
- (nullable NSNumber *)currentMaxBitrateSettingFromStore { - (nullable NSNumber *)currentMaxBitrateSettingFromStore {
@ -165,14 +179,18 @@ NS_ASSUME_NONNULL_BEGIN
} }
- (void)registerStoreDefaults { - (void)registerStoreDefaults {
NSData *codecData = [NSKeyedArchiver archivedDataWithRootObject:[self defaultVideoCodecSetting]]; NSError *error;
[ARDSettingsStore setDefaultsForVideoResolution:[self defaultVideoResolutionSetting] NSData *codecData = [NSKeyedArchiver archivedDataWithRootObject:[self defaultVideoCodecSetting]
videoCodec:codecData requiringSecureCoding:NO
bitrate:nil error:&error];
audioOnly:NO if (!error) {
createAecDump:NO [ARDSettingsStore setDefaultsForVideoResolution:[self defaultVideoResolutionSetting]
useManualAudioConfig:YES]; videoCodec:codecData
bitrate:nil
audioOnly:NO
createAecDump:NO
useManualAudioConfig:YES];
}
} }
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View file

@ -462,6 +462,7 @@ if (is_ios || is_mac) {
"OpenGL.framework", "OpenGL.framework",
] ]
} }
defines = [ "GLES_SILENCE_DEPRECATION" ]
deps = [ deps = [
":base_objc", ":base_objc",
@ -499,6 +500,7 @@ if (is_ios || is_mac) {
"objc/components/renderer/opengl/RTCEAGLVideoView.h", "objc/components/renderer/opengl/RTCEAGLVideoView.h",
"objc/components/renderer/opengl/RTCEAGLVideoView.m", "objc/components/renderer/opengl/RTCEAGLVideoView.m",
] ]
defines = [ "GLES_SILENCE_DEPRECATION" ]
} }
if (is_mac) { if (is_mac) {
sources = [ sources = [

View file

@ -230,7 +230,7 @@ OCMLocation *OCMMakeLocation(id testCase, const char *fileCString, int line){
__autoreleasing NSError **retError; __autoreleasing NSError **retError;
[invocation getArgument:&retError atIndex:4]; [invocation getArgument:&retError atIndex:4];
*retError = [NSError errorWithDomain:@"AVAudioSession" *retError = [NSError errorWithDomain:@"AVAudioSession"
code:AVAudioSessionErrorInsufficientPriority code:AVAudioSessionErrorCodeCannotInterruptOthers
userInfo:nil]; userInfo:nil];
BOOL failure = NO; BOOL failure = NO;
[invocation setReturnValue:&failure]; [invocation setReturnValue:&failure];

View file

@ -31,7 +31,7 @@ SDK_OUTPUT_DIR = os.path.join(SRC_DIR, 'out_ios_libs')
SDK_FRAMEWORK_NAME = 'WebRTC.framework' SDK_FRAMEWORK_NAME = 'WebRTC.framework'
DEFAULT_ARCHS = ENABLED_ARCHS = ['arm64', 'arm', 'x64', 'x86'] DEFAULT_ARCHS = ENABLED_ARCHS = ['arm64', 'arm', 'x64', 'x86']
IOS_DEPLOYMENT_TARGET = '10.0' IOS_DEPLOYMENT_TARGET = '12.0'
LIBVPX_BUILD_VP9 = False LIBVPX_BUILD_VP9 = False
sys.path.append(os.path.join(SCRIPT_DIR, '..', 'libs')) sys.path.append(os.path.join(SCRIPT_DIR, '..', 'libs'))