Remove iceRegatherIntervalRange
This was an ICE configuration experiment added a couple years ago that did not end up being used. Bug: webrtc:11316 Change-Id: Iafb7e1c4f7b4598815f045808dbf6e470172f119 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167680 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Qingsi Wang <qingsi@webrtc.org> Commit-Queue: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30395}
This commit is contained in:
@ -840,9 +840,6 @@ if (is_ios || is_mac) {
|
||||
"objc/api/peerconnection/RTCIceServer+Private.h",
|
||||
"objc/api/peerconnection/RTCIceServer.h",
|
||||
"objc/api/peerconnection/RTCIceServer.mm",
|
||||
"objc/api/peerconnection/RTCIntervalRange+Private.h",
|
||||
"objc/api/peerconnection/RTCIntervalRange.h",
|
||||
"objc/api/peerconnection/RTCIntervalRange.mm",
|
||||
"objc/api/peerconnection/RTCLegacyStatsReport+Private.h",
|
||||
"objc/api/peerconnection/RTCLegacyStatsReport.h",
|
||||
"objc/api/peerconnection/RTCLegacyStatsReport.mm",
|
||||
@ -1005,7 +1002,6 @@ if (is_ios || is_mac) {
|
||||
"objc/Framework/Headers/WebRTC/RTCH264ProfileLevelId.h",
|
||||
"objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
|
||||
"objc/Framework/Headers/WebRTC/RTCIceServer.h",
|
||||
"objc/Framework/Headers/WebRTC/RTCIntervalRange.h",
|
||||
"objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h",
|
||||
"objc/Framework/Headers/WebRTC/RTCLogging.h",
|
||||
"objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h",
|
||||
@ -1183,7 +1179,6 @@ if (is_ios || is_mac) {
|
||||
"objc/unittests/RTCDataChannelConfigurationTest.mm",
|
||||
"objc/unittests/RTCIceCandidateTest.mm",
|
||||
"objc/unittests/RTCIceServerTest.mm",
|
||||
"objc/unittests/RTCIntervalRangeTests.mm",
|
||||
"objc/unittests/RTCMediaConstraintsTest.mm",
|
||||
"objc/unittests/RTCPeerConnectionFactoryBuilderTest.mm",
|
||||
"objc/unittests/RTCPeerConnectionTest.mm",
|
||||
@ -1293,7 +1288,6 @@ if (is_ios || is_mac) {
|
||||
"objc/api/peerconnection/RTCFieldTrials.h",
|
||||
"objc/api/peerconnection/RTCIceCandidate.h",
|
||||
"objc/api/peerconnection/RTCIceServer.h",
|
||||
"objc/api/peerconnection/RTCIntervalRange.h",
|
||||
"objc/api/peerconnection/RTCLegacyStatsReport.h",
|
||||
"objc/api/peerconnection/RTCMediaConstraints.h",
|
||||
"objc/api/peerconnection/RTCMediaSource.h",
|
||||
@ -1408,7 +1402,6 @@ if (is_ios || is_mac) {
|
||||
"objc/api/peerconnection/RTCFieldTrials.h",
|
||||
"objc/api/peerconnection/RTCIceCandidate.h",
|
||||
"objc/api/peerconnection/RTCIceServer.h",
|
||||
"objc/api/peerconnection/RTCIntervalRange.h",
|
||||
"objc/api/peerconnection/RTCLegacyStatsReport.h",
|
||||
"objc/api/peerconnection/RTCMediaConstraints.h",
|
||||
"objc/api/peerconnection/RTCMediaSource.h",
|
||||
|
||||
@ -415,27 +415,6 @@ public class PeerConnection {
|
||||
KEEP_FIRST_READY // Keep the first ready port and prune the rest on the same network.
|
||||
}
|
||||
|
||||
/** Java version of rtc::IntervalRange */
|
||||
public static class IntervalRange {
|
||||
private final int min;
|
||||
private final int max;
|
||||
|
||||
public IntervalRange(int min, int max) {
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
}
|
||||
|
||||
@CalledByNative("IntervalRange")
|
||||
public int getMin() {
|
||||
return min;
|
||||
}
|
||||
|
||||
@CalledByNative("IntervalRange")
|
||||
public int getMax() {
|
||||
return max;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Java version of webrtc::SdpSemantics.
|
||||
*
|
||||
@ -525,7 +504,6 @@ public class PeerConnection {
|
||||
//
|
||||
// Can be set to Integer.MAX_VALUE to effectively disable the limit.
|
||||
public int maxIPv6Networks;
|
||||
@Nullable public IntervalRange iceRegatherIntervalRange;
|
||||
|
||||
// These values will be overridden by MediaStream constraints if deprecated constraints-based
|
||||
// create peerconnection interface is used.
|
||||
@ -609,7 +587,6 @@ public class PeerConnection {
|
||||
stunCandidateKeepaliveIntervalMs = null;
|
||||
disableIPv6OnWifi = false;
|
||||
maxIPv6Networks = 5;
|
||||
iceRegatherIntervalRange = null;
|
||||
disableIpv6 = false;
|
||||
enableDscp = false;
|
||||
enableCpuOveruseDetection = true;
|
||||
@ -765,12 +742,6 @@ public class PeerConnection {
|
||||
return maxIPv6Networks;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@CalledByNative("RTCConfiguration")
|
||||
IntervalRange getIceRegatherIntervalRange() {
|
||||
return iceRegatherIntervalRange;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@CalledByNative("RTCConfiguration")
|
||||
TurnCustomizer getTurnCustomizer() {
|
||||
|
||||
@ -168,7 +168,6 @@ public class PeerConnectionTest {
|
||||
|
||||
// Test configuration options.
|
||||
config.continualGatheringPolicy = PeerConnection.ContinualGatheringPolicy.GATHER_CONTINUALLY;
|
||||
config.iceRegatherIntervalRange = new PeerConnection.IntervalRange(1000, 2000);
|
||||
|
||||
PeerConnection offeringPC =
|
||||
factory.createPeerConnection(config, mock(PeerConnection.Observer.class));
|
||||
|
||||
@ -240,13 +240,6 @@ void JavaToNativeRTCConfiguration(
|
||||
Java_RTCConfiguration_getDisableIPv6OnWifi(jni, j_rtc_config);
|
||||
rtc_config->max_ipv6_networks =
|
||||
Java_RTCConfiguration_getMaxIPv6Networks(jni, j_rtc_config);
|
||||
ScopedJavaLocalRef<jobject> j_ice_regather_interval_range =
|
||||
Java_RTCConfiguration_getIceRegatherIntervalRange(jni, j_rtc_config);
|
||||
if (!IsNull(jni, j_ice_regather_interval_range)) {
|
||||
int min = Java_IntervalRange_getMin(jni, j_ice_regather_interval_range);
|
||||
int max = Java_IntervalRange_getMax(jni, j_ice_regather_interval_range);
|
||||
rtc_config->ice_regather_interval_range.emplace(min, max);
|
||||
}
|
||||
|
||||
rtc_config->turn_customizer = GetNativeTurnCustomizer(jni, j_turn_customizer);
|
||||
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#import "api/peerconnection/RTCIntervalRange.h"
|
||||
@ -15,7 +15,6 @@
|
||||
#import "RTCMacros.h"
|
||||
|
||||
@class RTCIceServer;
|
||||
@class RTCIntervalRange;
|
||||
|
||||
/**
|
||||
* Represents the ice transport policy. This exposes the same states in C++,
|
||||
@ -157,13 +156,6 @@ RTC_OBJC_EXPORT
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSNumber *iceCheckMinInterval;
|
||||
|
||||
/** ICE Periodic Regathering
|
||||
* If set, WebRTC will periodically create and propose candidates without
|
||||
* starting a new ICE generation. The regathering happens continuously with
|
||||
* interval specified in milliseconds by the uniform distribution [a, b].
|
||||
*/
|
||||
@property(nonatomic, strong, nullable) RTCIntervalRange *iceRegatherIntervalRange;
|
||||
|
||||
/** Configure the SDP semantics used by this PeerConnection. Note that the
|
||||
* WebRTC 1.0 specification requires UnifiedPlan semantics. The
|
||||
* RTCRtpTransceiver API is only available with UnifiedPlan semantics.
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
#import "RTCCertificate.h"
|
||||
#import "RTCConfiguration+Native.h"
|
||||
#import "RTCIceServer+Private.h"
|
||||
#import "RTCIntervalRange+Private.h"
|
||||
#import "base/RTCLogging.h"
|
||||
|
||||
#include "rtc_base/rtc_certificate_generator.h"
|
||||
@ -48,7 +47,6 @@
|
||||
@synthesize shouldSurfaceIceCandidatesOnIceTransportTypeChanged =
|
||||
_shouldSurfaceIceCandidatesOnIceTransportTypeChanged;
|
||||
@synthesize iceCheckMinInterval = _iceCheckMinInterval;
|
||||
@synthesize iceRegatherIntervalRange = _iceRegatherIntervalRange;
|
||||
@synthesize sdpSemantics = _sdpSemantics;
|
||||
@synthesize turnCustomizer = _turnCustomizer;
|
||||
@synthesize activeResetSrtpParams = _activeResetSrtpParams;
|
||||
@ -118,11 +116,6 @@
|
||||
_iceCheckMinInterval =
|
||||
[NSNumber numberWithInt:*config.ice_check_min_interval];
|
||||
}
|
||||
if (config.ice_regather_interval_range) {
|
||||
const rtc::IntervalRange &nativeIntervalRange = config.ice_regather_interval_range.value();
|
||||
_iceRegatherIntervalRange =
|
||||
[[RTCIntervalRange alloc] initWithNativeIntervalRange:nativeIntervalRange];
|
||||
}
|
||||
_sdpSemantics = [[self class] sdpSemanticsForNativeSdpSemantics:config.sdp_semantics];
|
||||
_turnCustomizer = config.turn_customizer;
|
||||
_activeResetSrtpParams = config.active_reset_srtp_params;
|
||||
@ -147,7 +140,7 @@
|
||||
- (NSString *)description {
|
||||
static NSString *formatString = @"RTCConfiguration: "
|
||||
@"{\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n%d\n%d\n%d\n"
|
||||
@"%d\n%@\n%@\n%d\n%d\n%d\n%d\n%d\n%@\n}\n";
|
||||
@"%d\n%@\n%d\n%d\n%d\n%d\n%d\n%@\n}\n";
|
||||
|
||||
return [NSString
|
||||
stringWithFormat:formatString,
|
||||
@ -168,7 +161,6 @@
|
||||
_shouldPresumeWritableWhenFullyRelayed,
|
||||
_shouldSurfaceIceCandidatesOnIceTransportTypeChanged,
|
||||
_iceCheckMinInterval,
|
||||
_iceRegatherIntervalRange,
|
||||
_disableLinkLocalNetworks,
|
||||
_disableIPV6,
|
||||
_disableIPV6OnWiFi,
|
||||
@ -251,12 +243,6 @@
|
||||
if (_iceCheckMinInterval != nil) {
|
||||
nativeConfig->ice_check_min_interval = absl::optional<int>(_iceCheckMinInterval.intValue);
|
||||
}
|
||||
if (_iceRegatherIntervalRange != nil) {
|
||||
std::unique_ptr<rtc::IntervalRange> nativeIntervalRange(
|
||||
_iceRegatherIntervalRange.nativeIntervalRange);
|
||||
nativeConfig->ice_regather_interval_range =
|
||||
absl::optional<rtc::IntervalRange>(*nativeIntervalRange);
|
||||
}
|
||||
nativeConfig->sdp_semantics = [[self class] nativeSdpSemanticsForSdpSemantics:_sdpSemantics];
|
||||
if (_turnCustomizer) {
|
||||
nativeConfig->turn_customizer = _turnCustomizer;
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#import "RTCIntervalRange.h"
|
||||
|
||||
#include "rtc_base/time_utils.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RTCIntervalRange ()
|
||||
|
||||
@property(nonatomic, readonly) std::unique_ptr<rtc::IntervalRange> nativeIntervalRange;
|
||||
|
||||
- (instancetype)initWithNativeIntervalRange:(const rtc::IntervalRange &)config;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RTCIntervalRange : NSObject
|
||||
|
||||
@property(nonatomic, readonly) NSInteger min;
|
||||
@property(nonatomic, readonly) NSInteger max;
|
||||
|
||||
- (instancetype)init;
|
||||
- (instancetype)initWithMin:(NSInteger)min max:(NSInteger)max NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#import "RTCIntervalRange+Private.h"
|
||||
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
@implementation RTCIntervalRange
|
||||
|
||||
@synthesize min = _min;
|
||||
@synthesize max = _max;
|
||||
|
||||
- (instancetype)init {
|
||||
return [self initWithMin:0 max:0];
|
||||
}
|
||||
|
||||
- (instancetype)initWithMin:(NSInteger)min
|
||||
max:(NSInteger)max {
|
||||
RTC_DCHECK_LE(min, max);
|
||||
if (self = [super init]) {
|
||||
_min = min;
|
||||
_max = max;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithNativeIntervalRange:(const rtc::IntervalRange &)config {
|
||||
return [self initWithMin:config.min() max:config.max()];
|
||||
}
|
||||
|
||||
- (NSString *)description {
|
||||
return [NSString stringWithFormat:@"[%ld, %ld]", (long)_min, (long)_max];
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
- (std::unique_ptr<rtc::IntervalRange>)nativeIntervalRange {
|
||||
std::unique_ptr<rtc::IntervalRange> nativeIntervalRange(
|
||||
new rtc::IntervalRange((int)_min, (int)_max));
|
||||
return nativeIntervalRange;
|
||||
}
|
||||
|
||||
@end
|
||||
@ -17,7 +17,6 @@
|
||||
#import "api/peerconnection/RTCConfiguration+Private.h"
|
||||
#import "api/peerconnection/RTCConfiguration.h"
|
||||
#import "api/peerconnection/RTCIceServer.h"
|
||||
#import "api/peerconnection/RTCIntervalRange.h"
|
||||
#import "helpers/NSString+StdString.h"
|
||||
|
||||
@interface RTCConfigurationTest : NSObject
|
||||
@ -30,7 +29,6 @@
|
||||
- (void)testConversionToNativeConfiguration {
|
||||
NSArray *urlStrings = @[ @"stun:stun1.example.net" ];
|
||||
RTCIceServer *server = [[RTCIceServer alloc] initWithURLStrings:urlStrings];
|
||||
RTCIntervalRange *range = [[RTCIntervalRange alloc] initWithMin:0 max:100];
|
||||
|
||||
RTCConfiguration *config = [[RTCConfiguration alloc] init];
|
||||
config.iceServers = @[ server ];
|
||||
@ -49,7 +47,6 @@
|
||||
config.continualGatheringPolicy =
|
||||
RTCContinualGatheringPolicyGatherContinually;
|
||||
config.shouldPruneTurnPorts = YES;
|
||||
config.iceRegatherIntervalRange = range;
|
||||
config.cryptoOptions = [[RTCCryptoOptions alloc] initWithSrtpEnableGcmCryptoSuites:YES
|
||||
srtpEnableAes128Sha1_32CryptoCipher:YES
|
||||
srtpEnableEncryptedRtpHeaderExtensions:YES
|
||||
@ -82,8 +79,6 @@
|
||||
EXPECT_EQ(webrtc::PeerConnectionInterface::GATHER_CONTINUALLY,
|
||||
nativeConfig->continual_gathering_policy);
|
||||
EXPECT_EQ(true, nativeConfig->prune_turn_ports);
|
||||
EXPECT_EQ(range.min, nativeConfig->ice_regather_interval_range->min());
|
||||
EXPECT_EQ(range.max, nativeConfig->ice_regather_interval_range->max());
|
||||
EXPECT_EQ(true, nativeConfig->crypto_options->srtp.enable_gcm_crypto_suites);
|
||||
EXPECT_EQ(true, nativeConfig->crypto_options->srtp.enable_aes128_sha1_32_crypto_cipher);
|
||||
EXPECT_EQ(true, nativeConfig->crypto_options->srtp.enable_encrypted_rtp_header_extensions);
|
||||
@ -95,7 +90,6 @@
|
||||
- (void)testNativeConversionToConfiguration {
|
||||
NSArray *urlStrings = @[ @"stun:stun1.example.net" ];
|
||||
RTCIceServer *server = [[RTCIceServer alloc] initWithURLStrings:urlStrings];
|
||||
RTCIntervalRange *range = [[RTCIntervalRange alloc] initWithMin:0 max:100];
|
||||
|
||||
RTCConfiguration *config = [[RTCConfiguration alloc] init];
|
||||
config.iceServers = @[ server ];
|
||||
@ -114,7 +108,6 @@
|
||||
config.continualGatheringPolicy =
|
||||
RTCContinualGatheringPolicyGatherContinually;
|
||||
config.shouldPruneTurnPorts = YES;
|
||||
config.iceRegatherIntervalRange = range;
|
||||
config.cryptoOptions = [[RTCCryptoOptions alloc] initWithSrtpEnableGcmCryptoSuites:YES
|
||||
srtpEnableAes128Sha1_32CryptoCipher:NO
|
||||
srtpEnableEncryptedRtpHeaderExtensions:NO
|
||||
@ -146,8 +139,6 @@
|
||||
newConfig.iceBackupCandidatePairPingInterval);
|
||||
EXPECT_EQ(config.continualGatheringPolicy, newConfig.continualGatheringPolicy);
|
||||
EXPECT_EQ(config.shouldPruneTurnPorts, newConfig.shouldPruneTurnPorts);
|
||||
EXPECT_EQ(config.iceRegatherIntervalRange.min, newConfig.iceRegatherIntervalRange.min);
|
||||
EXPECT_EQ(config.iceRegatherIntervalRange.max, newConfig.iceRegatherIntervalRange.max);
|
||||
EXPECT_EQ(config.cryptoOptions.srtpEnableGcmCryptoSuites,
|
||||
newConfig.cryptoOptions.srtpEnableGcmCryptoSuites);
|
||||
EXPECT_EQ(config.cryptoOptions.srtpEnableAes128Sha1_32CryptoCipher,
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include "rtc_base/gunit.h"
|
||||
|
||||
#import "api/peerconnection/RTCIntervalRange+Private.h"
|
||||
#import "api/peerconnection/RTCIntervalRange.h"
|
||||
|
||||
@interface RTCIntervalRangeTest : NSObject
|
||||
- (void)testConversionToNativeConfiguration;
|
||||
- (void)testNativeConversionToConfiguration;
|
||||
@end
|
||||
|
||||
@implementation RTCIntervalRangeTest
|
||||
|
||||
- (void)testConversionToNativeConfiguration {
|
||||
NSInteger min = 0;
|
||||
NSInteger max = 100;
|
||||
RTCIntervalRange *range = [[RTCIntervalRange alloc] initWithMin:min max:max];
|
||||
EXPECT_EQ(min, range.min);
|
||||
EXPECT_EQ(max, range.max);
|
||||
std::unique_ptr<rtc::IntervalRange> nativeRange = range.nativeIntervalRange;
|
||||
EXPECT_EQ(min, nativeRange->min());
|
||||
EXPECT_EQ(max, nativeRange->max());
|
||||
}
|
||||
|
||||
- (void)testNativeConversionToConfiguration {
|
||||
NSInteger min = 0;
|
||||
NSInteger max = 100;
|
||||
rtc::IntervalRange nativeRange((int)min, (int)max);
|
||||
RTCIntervalRange *range =
|
||||
[[RTCIntervalRange alloc] initWithNativeIntervalRange:nativeRange];
|
||||
EXPECT_EQ(min, range.min);
|
||||
EXPECT_EQ(max, range.max);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
TEST(RTCIntervalRangeTest, NativeConfigurationConversionTest) {
|
||||
@autoreleasepool {
|
||||
RTCIntervalRangeTest *test = [[RTCIntervalRangeTest alloc] init];
|
||||
[test testConversionToNativeConfiguration];
|
||||
[test testNativeConversionToConfiguration];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user