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:
@ -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