Chromium Code Reviews| Index: webrtc/call/call.cc |
| diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc |
| index 25dcf32a620c48965c22077d8c6d35cc3b298267..dd5ef9c7a87744cfd67a368b3f2bda719574bf78 100644 |
| --- a/webrtc/call/call.cc |
| +++ b/webrtc/call/call.cc |
| @@ -212,6 +212,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, |
| @@ -1143,6 +1144,20 @@ void Call::OnSentPacket(const rtc::SentPacket& sent_packet) { |
| transport_send_->send_side_cc()->OnSentPacket(sent_packet); |
| } |
| +bool Call::SetRtpKeepAliveConfig(const RtpKeepAliveConfig& config) { |
| + // Can be called by RtpTransportController not on the configuration thread. |
|
stefan-webrtc
2017/08/08 08:13:06
This comment will become confusing. Call currently
sprang_webrtc
2017/08/08 08:53:30
OK, so this badly phrased comment referred to the
|
| + |
| + 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, |