Add Stable Writable Connection Ping Interval parameter to RTCConfiguration.
Bug: webrtc:12642
Change-Id: I543760d49f87130d717c7cf0eca7d2d2f45e8eac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215242
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Derek Bailey <derekbailey@google.com>
Cr-Commit-Position: refs/heads/master@{#33751}
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc
index 0da0c37..3eb5aeb 100644
--- a/pc/peer_connection.cc
+++ b/pc/peer_connection.cc
@@ -180,7 +180,6 @@
return kIceCandidatePairMax;
}
-
absl::optional<int> RTCConfigurationToIceConfigOptionalInt(
int rtc_configuration_parameter) {
if (rtc_configuration_parameter ==
@@ -248,6 +247,8 @@
ice_config.ice_inactive_timeout = config.ice_inactive_timeout;
ice_config.stun_keepalive_interval = config.stun_candidate_keepalive_interval;
ice_config.network_preference = config.network_preference;
+ ice_config.stable_writable_connection_ping_interval =
+ config.stable_writable_connection_ping_interval_ms;
return ice_config;
}
@@ -334,6 +335,7 @@
bool enable_implicit_rollback;
absl::optional<bool> allow_codec_switching;
absl::optional<int> report_usage_pattern_delay_ms;
+ absl::optional<int> stable_writable_connection_ping_interval_ms;
};
static_assert(sizeof(stuff_being_tested_for_equality) == sizeof(*this),
"Did you add something to RTCConfiguration and forget to "
@@ -393,7 +395,9 @@
turn_logging_id == o.turn_logging_id &&
enable_implicit_rollback == o.enable_implicit_rollback &&
allow_codec_switching == o.allow_codec_switching &&
- report_usage_pattern_delay_ms == o.report_usage_pattern_delay_ms;
+ report_usage_pattern_delay_ms == o.report_usage_pattern_delay_ms &&
+ stable_writable_connection_ping_interval_ms ==
+ o.stable_writable_connection_ping_interval_ms;
}
bool PeerConnectionInterface::RTCConfiguration::operator!=(
@@ -1423,6 +1427,8 @@
configuration.active_reset_srtp_params;
modified_config.turn_logging_id = configuration.turn_logging_id;
modified_config.allow_codec_switching = configuration.allow_codec_switching;
+ modified_config.stable_writable_connection_ping_interval_ms =
+ configuration.stable_writable_connection_ping_interval_ms;
if (configuration != modified_config) {
LOG_AND_RETURN_ERROR(RTCErrorType::INVALID_MODIFICATION,
"Modifying the configuration in an unsupported way.");