Add ice_candidate_pool_size to Obj-C and Java RTCConfiguration.

Review-Url: https://codereview.webrtc.org/1986073004
Cr-Commit-Position: refs/heads/master@{#12801}
This commit is contained in:
deadbeef
2016-05-18 16:20:14 -07:00
committed by Commit bot
parent b711f10d96
commit be0c96fd00
4 changed files with 16 additions and 2 deletions

View File

@ -1545,6 +1545,9 @@ static void JavaRTCConfigurationToJsepRTCConfiguration(
jobject j_continual_gathering_policy =
GetObjectField(jni, j_rtc_config, j_continual_gathering_policy_id);
jfieldID j_ice_candidate_pool_size_id =
GetFieldID(jni, j_rtc_config_class, "iceCandidatePoolSize", "I");
rtc_config->type =
JavaIceTransportsTypeToNativeType(jni, j_ice_transports_type);
rtc_config->bundle_policy =
@ -1565,6 +1568,8 @@ static void JavaRTCConfigurationToJsepRTCConfiguration(
rtc_config->continual_gathering_policy =
JavaContinualGatheringPolicyToNativeType(
jni, j_continual_gathering_policy);
rtc_config->ice_candidate_pool_size =
GetIntField(jni, j_rtc_config, j_ice_candidate_pool_size_id);
}
JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)(

View File

@ -139,6 +139,7 @@ public class PeerConnection {
public int iceBackupCandidatePairPingInterval;
public KeyType keyType;
public ContinualGatheringPolicy continualGatheringPolicy;
public int iceCandidatePoolSize;
public RTCConfiguration(List<IceServer> iceServers) {
iceTransportsType = IceTransportsType.ALL;
@ -152,6 +153,7 @@ public class PeerConnection {
iceBackupCandidatePairPingInterval = -1;
keyType = KeyType.ECDSA;
continualGatheringPolicy = ContinualGatheringPolicy.GATHER_ONCE;
iceCandidatePoolSize = 0;
}
};

View File

@ -31,6 +31,7 @@
@synthesize iceBackupCandidatePairPingInterval =
_iceBackupCandidatePairPingInterval;
@synthesize keyType = _keyType;
@synthesize iceCandidatePoolSize = _iceCandidatePoolSize;
- (instancetype)init {
if (self = [super init]) {
@ -54,13 +55,14 @@
_iceBackupCandidatePairPingInterval =
config.ice_backup_candidate_pair_ping_interval;
_keyType = RTCEncryptionKeyTypeECDSA;
_iceCandidatePoolSize = config.ice_candidate_pool_size;
}
return self;
}
- (NSString *)description {
return [NSString stringWithFormat:
@"RTCConfiguration: {\n%@\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n}\n",
@"RTCConfiguration: {\n%@\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n%d\n}\n",
_iceServers,
[[self class] stringForTransportPolicy:_iceTransportPolicy],
[[self class] stringForBundlePolicy:_bundlePolicy],
@ -70,7 +72,8 @@
stringForContinualGatheringPolicy:_continualGatheringPolicy],
_audioJitterBufferMaxPackets,
_iceConnectionReceivingTimeout,
_iceBackupCandidatePairPingInterval];
_iceBackupCandidatePairPingInterval,
_iceCandidatePoolSize];
}
#pragma mark - Private
@ -111,6 +114,7 @@
}
nativeConfig->certificates.push_back(certificate);
}
nativeConfig->ice_candidate_pool_size = _iceCandidatePoolSize;
return nativeConfig.release();
}

View File

@ -83,6 +83,9 @@ RTC_EXPORT
/** Key type used to generate SSL identity. Default is ECDSA. */
@property(nonatomic, assign) RTCEncryptionKeyType keyType;
/** ICE candidate pool size as defined in JSEP. Default is 0. */
@property(nonatomic, assign) int iceCandidatePoolSize;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
@end