Relanding: Implement RTCConfiguration.iceCandidatePoolSize.
Depends on this CL in order to work in Chromium:
https://codereview.chromium.org/1976673002/
It works by creating pooled PortAllocatorSessions which can be picked up
by a P2PTransportChannel when needed (after a local description is set).
This can optimize candidate gathering time when there is some time between
creating a PeerConnection and setting a local description.
R=pthatcher@webrtc.org
Committed: https://chromium.googlesource.com/external/webrtc/+/48e9d05f510b1616c81303944008f75825971802
Review URL: https://codereview.webrtc.org/1956453003 .
Cr-Original-Commit-Position: refs/heads/master@{#12729}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: a1c303535fe7a29b87879047996efa2952f9701b
diff --git a/api/peerconnectioninterface.h b/api/peerconnectioninterface.h
index 94d2c00..fe0dc1d 100644
--- a/api/peerconnectioninterface.h
+++ b/api/peerconnectioninterface.h
@@ -270,42 +270,30 @@
static const int kAudioJitterBufferMaxPackets = 50;
// TODO(pthatcher): Rename this ice_transport_type, but update
// Chromium at the same time.
- IceTransportsType type;
+ IceTransportsType type = kAll;
// TODO(pthatcher): Rename this ice_servers, but update Chromium
// at the same time.
IceServers servers;
- BundlePolicy bundle_policy;
- RtcpMuxPolicy rtcp_mux_policy;
- TcpCandidatePolicy tcp_candidate_policy;
- int audio_jitter_buffer_max_packets;
- bool audio_jitter_buffer_fast_accelerate;
- int ice_connection_receiving_timeout; // ms
- int ice_backup_candidate_pair_ping_interval; // ms
- ContinualGatheringPolicy continual_gathering_policy;
+ BundlePolicy bundle_policy = kBundlePolicyBalanced;
+ RtcpMuxPolicy rtcp_mux_policy = kRtcpMuxPolicyNegotiate;
+ TcpCandidatePolicy tcp_candidate_policy = kTcpCandidatePolicyEnabled;
+ int audio_jitter_buffer_max_packets = kAudioJitterBufferMaxPackets;
+ bool audio_jitter_buffer_fast_accelerate = false;
+ int ice_connection_receiving_timeout = kUndefined; // ms
+ int ice_backup_candidate_pair_ping_interval = kUndefined; // ms
+ ContinualGatheringPolicy continual_gathering_policy = GATHER_ONCE;
std::vector<rtc::scoped_refptr<rtc::RTCCertificate>> certificates;
- bool prioritize_most_likely_ice_candidate_pairs;
+ bool prioritize_most_likely_ice_candidate_pairs = false;
struct cricket::MediaConfig media_config;
// Flags corresponding to values set by constraint flags.
// rtc::Optional flags can be "missing", in which case the webrtc
// default applies.
- bool disable_ipv6;
- bool enable_rtp_data_channel;
+ bool disable_ipv6 = false;
+ bool enable_rtp_data_channel = false;
rtc::Optional<int> screencast_min_bitrate;
rtc::Optional<bool> combined_audio_video_bwe;
rtc::Optional<bool> enable_dtls_srtp;
- RTCConfiguration()
- : type(kAll),
- bundle_policy(kBundlePolicyBalanced),
- rtcp_mux_policy(kRtcpMuxPolicyNegotiate),
- tcp_candidate_policy(kTcpCandidatePolicyEnabled),
- audio_jitter_buffer_max_packets(kAudioJitterBufferMaxPackets),
- audio_jitter_buffer_fast_accelerate(false),
- ice_connection_receiving_timeout(kUndefined),
- ice_backup_candidate_pair_ping_interval(kUndefined),
- continual_gathering_policy(GATHER_ONCE),
- prioritize_most_likely_ice_candidate_pairs(false),
- disable_ipv6(false),
- enable_rtp_data_channel(false) {}
+ int ice_candidate_pool_size = 0;
};
struct RTCOfferAnswerOptions {