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:
@ -1545,6 +1545,9 @@ static void JavaRTCConfigurationToJsepRTCConfiguration(
|
|||||||
jobject j_continual_gathering_policy =
|
jobject j_continual_gathering_policy =
|
||||||
GetObjectField(jni, j_rtc_config, j_continual_gathering_policy_id);
|
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 =
|
rtc_config->type =
|
||||||
JavaIceTransportsTypeToNativeType(jni, j_ice_transports_type);
|
JavaIceTransportsTypeToNativeType(jni, j_ice_transports_type);
|
||||||
rtc_config->bundle_policy =
|
rtc_config->bundle_policy =
|
||||||
@ -1565,6 +1568,8 @@ static void JavaRTCConfigurationToJsepRTCConfiguration(
|
|||||||
rtc_config->continual_gathering_policy =
|
rtc_config->continual_gathering_policy =
|
||||||
JavaContinualGatheringPolicyToNativeType(
|
JavaContinualGatheringPolicyToNativeType(
|
||||||
jni, j_continual_gathering_policy);
|
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)(
|
JOW(jlong, PeerConnectionFactory_nativeCreatePeerConnection)(
|
||||||
|
|||||||
@ -139,6 +139,7 @@ public class PeerConnection {
|
|||||||
public int iceBackupCandidatePairPingInterval;
|
public int iceBackupCandidatePairPingInterval;
|
||||||
public KeyType keyType;
|
public KeyType keyType;
|
||||||
public ContinualGatheringPolicy continualGatheringPolicy;
|
public ContinualGatheringPolicy continualGatheringPolicy;
|
||||||
|
public int iceCandidatePoolSize;
|
||||||
|
|
||||||
public RTCConfiguration(List<IceServer> iceServers) {
|
public RTCConfiguration(List<IceServer> iceServers) {
|
||||||
iceTransportsType = IceTransportsType.ALL;
|
iceTransportsType = IceTransportsType.ALL;
|
||||||
@ -152,6 +153,7 @@ public class PeerConnection {
|
|||||||
iceBackupCandidatePairPingInterval = -1;
|
iceBackupCandidatePairPingInterval = -1;
|
||||||
keyType = KeyType.ECDSA;
|
keyType = KeyType.ECDSA;
|
||||||
continualGatheringPolicy = ContinualGatheringPolicy.GATHER_ONCE;
|
continualGatheringPolicy = ContinualGatheringPolicy.GATHER_ONCE;
|
||||||
|
iceCandidatePoolSize = 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
@synthesize iceBackupCandidatePairPingInterval =
|
@synthesize iceBackupCandidatePairPingInterval =
|
||||||
_iceBackupCandidatePairPingInterval;
|
_iceBackupCandidatePairPingInterval;
|
||||||
@synthesize keyType = _keyType;
|
@synthesize keyType = _keyType;
|
||||||
|
@synthesize iceCandidatePoolSize = _iceCandidatePoolSize;
|
||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
if (self = [super init]) {
|
if (self = [super init]) {
|
||||||
@ -54,13 +55,14 @@
|
|||||||
_iceBackupCandidatePairPingInterval =
|
_iceBackupCandidatePairPingInterval =
|
||||||
config.ice_backup_candidate_pair_ping_interval;
|
config.ice_backup_candidate_pair_ping_interval;
|
||||||
_keyType = RTCEncryptionKeyTypeECDSA;
|
_keyType = RTCEncryptionKeyTypeECDSA;
|
||||||
|
_iceCandidatePoolSize = config.ice_candidate_pool_size;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)description {
|
- (NSString *)description {
|
||||||
return [NSString stringWithFormat:
|
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,
|
_iceServers,
|
||||||
[[self class] stringForTransportPolicy:_iceTransportPolicy],
|
[[self class] stringForTransportPolicy:_iceTransportPolicy],
|
||||||
[[self class] stringForBundlePolicy:_bundlePolicy],
|
[[self class] stringForBundlePolicy:_bundlePolicy],
|
||||||
@ -70,7 +72,8 @@
|
|||||||
stringForContinualGatheringPolicy:_continualGatheringPolicy],
|
stringForContinualGatheringPolicy:_continualGatheringPolicy],
|
||||||
_audioJitterBufferMaxPackets,
|
_audioJitterBufferMaxPackets,
|
||||||
_iceConnectionReceivingTimeout,
|
_iceConnectionReceivingTimeout,
|
||||||
_iceBackupCandidatePairPingInterval];
|
_iceBackupCandidatePairPingInterval,
|
||||||
|
_iceCandidatePoolSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Private
|
#pragma mark - Private
|
||||||
@ -111,6 +114,7 @@
|
|||||||
}
|
}
|
||||||
nativeConfig->certificates.push_back(certificate);
|
nativeConfig->certificates.push_back(certificate);
|
||||||
}
|
}
|
||||||
|
nativeConfig->ice_candidate_pool_size = _iceCandidatePoolSize;
|
||||||
|
|
||||||
return nativeConfig.release();
|
return nativeConfig.release();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -83,6 +83,9 @@ RTC_EXPORT
|
|||||||
/** Key type used to generate SSL identity. Default is ECDSA. */
|
/** Key type used to generate SSL identity. Default is ECDSA. */
|
||||||
@property(nonatomic, assign) RTCEncryptionKeyType keyType;
|
@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;
|
- (instancetype)init NS_DESIGNATED_INITIALIZER;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user