Index: webrtc/call/call.cc |
diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc |
index 3966d5e0309add865df305fbf284f689c317400e..809e64617a8ef765f7bd47d6ba8d6bd11ec094d6 100644 |
--- a/webrtc/call/call.cc |
+++ b/webrtc/call/call.cc |
@@ -211,6 +211,7 @@ class Call : public webrtc::Call, |
void OnSentPacket(const rtc::SentPacket& sent_packet) override; |
+ bool SetRtpKeepAliveConfig(const RtpKeepAliveConfig& config) override; |
// Implements BitrateObserver. |
void OnNetworkChanged(uint32_t bitrate_bps, |
@@ -1141,6 +1142,20 @@ void Call::OnSentPacket(const rtc::SentPacket& sent_packet) { |
transport_send_->send_side_cc()->OnSentPacket(sent_packet); |
} |
+bool Call::SetRtpKeepAliveConfig(const RtpKeepAliveConfig& config) { |
+ RTC_DCHECK_RUN_ON(&configuration_thread_checker_); |
+ |
+ ReadLockScoped lock(*send_crit_); |
+ if (config != config_.keepalive_config && |
+ (!video_send_streams_.empty() || !audio_send_ssrcs_.empty())) { |
+ LOG(LS_WARNING) << "RTP keep-alive settings cannot be altered after " |
+ "creating send streams."; |
+ return false; |
+ } |
+ config_.keepalive_config = config; |
+ return true; |
+} |
+ |
void Call::OnNetworkChanged(uint32_t target_bitrate_bps, |
uint8_t fraction_loss, |
int64_t rtt_ms, |