Clean up iOS API audio settings

This removes the routing for the deprecated audio control setting

Change-Id: Id83ff548625279d5b34c9e3cadc097c25a00ef05
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/58900
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22279}
This commit is contained in:
Sam Zackrisson 2018-02-28 16:20:58 +01:00 committed by Commit Bot
parent 4ff5443e4e
commit 9e981f0e43
8 changed files with 2 additions and 53 deletions

View File

@ -754,10 +754,7 @@ static int const kKbpsMultiplier = 1000;
#pragma mark - Defaults
- (RTCMediaConstraints *)defaultMediaAudioConstraints {
NSString *valueLevelControl = [_settings currentUseLevelControllerSettingFromStore] ?
kRTCMediaConstraintsValueTrue :
kRTCMediaConstraintsValueFalse;
NSDictionary *mandatoryConstraints = @{ kRTCMediaConstraintsLevelControl : valueLevelControl };
NSDictionary *mandatoryConstraints = @{};
RTCMediaConstraints *constraints =
[[RTCMediaConstraints alloc] initWithMandatoryConstraints:mandatoryConstraints
optionalConstraints:nil];

View File

@ -106,19 +106,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)storeCreateAecDumpSetting:(BOOL)createAecDump;
/**
* Returns current setting whether to use level controller from store if present or default (NO)
* otherwise.
*/
- (BOOL)currentUseLevelControllerSettingFromStore;
/**
* Stores the provided use level controller setting into the store.
*
* @param setting the boolean value to be stored.
*/
- (void)storeUseLevelControllerSetting:(BOOL)useLevelController;
/**
* Returns current setting whether to use manual audio config from store if present or default (YES)
* otherwise.

View File

@ -109,14 +109,6 @@ NS_ASSUME_NONNULL_BEGIN
[[self settingsStore] setCreateAecDump:createAecDump];
}
- (BOOL)currentUseLevelControllerSettingFromStore {
return [[self settingsStore] useLevelController];
}
- (void)storeUseLevelControllerSetting:(BOOL)useLevelController {
[[self settingsStore] setUseLevelController:useLevelController];
}
- (BOOL)currentUseManualAudioConfigSettingFromStore {
return [[self settingsStore] useManualAudioConfig];
}
@ -174,7 +166,6 @@ NS_ASSUME_NONNULL_BEGIN
bitrate:nil
audioOnly:NO
createAecDump:NO
useLevelController:NO
useManualAudioConfig:YES];
}

View File

@ -28,7 +28,6 @@ NS_ASSUME_NONNULL_BEGIN
bitrate:(nullable NSNumber *)bitrate
audioOnly:(BOOL)audioOnly
createAecDump:(BOOL)createAecDump
useLevelController:(BOOL)useLevelController
useManualAudioConfig:(BOOL)useManualAudioConfig;
@property(nonatomic) NSString *videoResolution;
@ -47,7 +46,6 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic) BOOL audioOnly;
@property(nonatomic) BOOL createAecDump;
@property(nonatomic) BOOL useLevelController;
@property(nonatomic) BOOL useManualAudioConfig;
@end

View File

@ -15,7 +15,6 @@ static NSString *const kVideoCodecKey = @"rtc_video_codec_info_key";
static NSString *const kBitrateKey = @"rtc_max_bitrate_key";
static NSString *const kAudioOnlyKey = @"rtc_audio_only_key";
static NSString *const kCreateAecDumpKey = @"rtc_create_aec_dump_key";
static NSString *const kUseLevelControllerKey = @"rtc_use_level_controller_key";
static NSString *const kUseManualAudioConfigKey = @"rtc_use_manual_audio_config_key";
NS_ASSUME_NONNULL_BEGIN
@ -32,12 +31,10 @@ NS_ASSUME_NONNULL_BEGIN
bitrate:(nullable NSNumber *)bitrate
audioOnly:(BOOL)audioOnly
createAecDump:(BOOL)createAecDump
useLevelController:(BOOL)useLevelController
useManualAudioConfig:(BOOL)useManualAudioConfig {
NSMutableDictionary<NSString *, id> *defaultsDictionary = [@{
kAudioOnlyKey : @(audioOnly),
kCreateAecDumpKey : @(createAecDump),
kUseLevelControllerKey : @(useLevelController),
kUseManualAudioConfigKey : @(useManualAudioConfig)
} mutableCopy];
@ -105,15 +102,6 @@ NS_ASSUME_NONNULL_BEGIN
[self.storage synchronize];
}
- (BOOL)useLevelController {
return [self.storage boolForKey:kUseLevelControllerKey];
}
- (void)setUseLevelController:(BOOL)useLevelController {
[self.storage setBool:useLevelController forKey:kUseLevelControllerKey];
[self.storage synchronize];
}
- (BOOL)useManualAudioConfig {
return [self.storage boolForKey:kUseManualAudioConfigKey];
}

View File

@ -24,7 +24,6 @@ typedef NS_ENUM(int, ARDSettingsSections) {
typedef NS_ENUM(int, ARDAudioSettingsOptions) {
ARDAudioSettingsAudioOnly = 0,
ARDAudioSettingsCreateAecDump,
ARDAudioSettingsUseLevelController,
ARDAudioSettingsUseManualAudioConfig,
};
@ -92,7 +91,7 @@ typedef NS_ENUM(int, ARDAudioSettingsOptions) {
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
switch (section) {
case ARDSettingsSectionAudioSettings:
return 4;
return 3;
case ARDSettingsSectionVideoResolution:
return self.videoResolutionArray.count;
case ARDSettingsSectionVideoCodec:
@ -319,8 +318,6 @@ updateListSelectionAtIndexPath:(NSIndexPath *)indexPath
return @"Audio only";
case ARDAudioSettingsCreateAecDump:
return @"Create AecDump";
case ARDAudioSettingsUseLevelController:
return @"Use level controller";
case ARDAudioSettingsUseManualAudioConfig:
return @"Use manual audio config";
default:
@ -334,8 +331,6 @@ updateListSelectionAtIndexPath:(NSIndexPath *)indexPath
return [_settingsModel currentAudioOnlySettingFromStore];
case ARDAudioSettingsCreateAecDump:
return [_settingsModel currentCreateAecDumpSettingFromStore];
case ARDAudioSettingsUseLevelController:
return [_settingsModel currentUseLevelControllerSettingFromStore];
case ARDAudioSettingsUseManualAudioConfig:
return [_settingsModel currentUseManualAudioConfigSettingFromStore];
default:
@ -353,10 +348,6 @@ updateListSelectionAtIndexPath:(NSIndexPath *)indexPath
[_settingsModel storeCreateAecDumpSetting:sender.isOn];
break;
}
case ARDAudioSettingsUseLevelController: {
[_settingsModel storeUseLevelControllerSetting:sender.isOn];
break;
}
case ARDAudioSettingsUseManualAudioConfig: {
[_settingsModel storeUseManualAudioConfigSetting:sender.isOn];
break;

View File

@ -30,8 +30,6 @@ NSString * const kRTCMediaConstraintsMinFrameRate =
@(webrtc::MediaConstraintsInterface::kMinFrameRate);
NSString * const kRTCMediaConstraintsMaxFrameRate =
@(webrtc::MediaConstraintsInterface::kMaxFrameRate);
NSString * const kRTCMediaConstraintsLevelControl =
@(webrtc::MediaConstraintsInterface::kLevelControl);
NSString * const kRTCMediaConstraintsAudioNetworkAdaptorConfig =
@(webrtc::MediaConstraintsInterface::kAudioNetworkAdaptorConfig);

View File

@ -23,7 +23,6 @@ RTC_EXTERN NSString * const kRTCMediaConstraintsMaxHeight;
RTC_EXTERN NSString * const kRTCMediaConstraintsMinHeight;
RTC_EXTERN NSString * const kRTCMediaConstraintsMaxFrameRate;
RTC_EXTERN NSString * const kRTCMediaConstraintsMinFrameRate;
RTC_EXTERN NSString * const kRTCMediaConstraintsLevelControl;
/** The value for this key should be a base64 encoded string containing
* the data from the serialized configuration proto.
*/