Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 void SignalChannelNetworkState(MediaType media, NetworkState state) override; | 205 void SignalChannelNetworkState(MediaType media, NetworkState state) override; |
| 206 | 206 |
| 207 void OnTransportOverheadChanged(MediaType media, | 207 void OnTransportOverheadChanged(MediaType media, |
| 208 int transport_overhead_per_packet) override; | 208 int transport_overhead_per_packet) override; |
| 209 | 209 |
| 210 void OnNetworkRouteChanged(const std::string& transport_name, | 210 void OnNetworkRouteChanged(const std::string& transport_name, |
| 211 const rtc::NetworkRoute& network_route) override; | 211 const rtc::NetworkRoute& network_route) override; |
| 212 | 212 |
| 213 void OnSentPacket(const rtc::SentPacket& sent_packet) override; | 213 void OnSentPacket(const rtc::SentPacket& sent_packet) override; |
| 214 | 214 |
| 215 bool SetRtpKeepAliveConfig(const RtpKeepAliveConfig& config) override; | |
| 215 | 216 |
| 216 // Implements BitrateObserver. | 217 // Implements BitrateObserver. |
| 217 void OnNetworkChanged(uint32_t bitrate_bps, | 218 void OnNetworkChanged(uint32_t bitrate_bps, |
| 218 uint8_t fraction_loss, | 219 uint8_t fraction_loss, |
| 219 int64_t rtt_ms, | 220 int64_t rtt_ms, |
| 220 int64_t probing_interval_ms) override; | 221 int64_t probing_interval_ms) override; |
| 221 | 222 |
| 222 // Implements BitrateAllocator::LimitObserver. | 223 // Implements BitrateAllocator::LimitObserver. |
| 223 void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps, | 224 void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps, |
| 224 uint32_t max_padding_bitrate_bps) override; | 225 uint32_t max_padding_bitrate_bps) override; |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1136 | 1137 |
| 1137 transport_send_->send_side_cc()->SignalNetworkState(aggregate_state); | 1138 transport_send_->send_side_cc()->SignalNetworkState(aggregate_state); |
| 1138 } | 1139 } |
| 1139 | 1140 |
| 1140 void Call::OnSentPacket(const rtc::SentPacket& sent_packet) { | 1141 void Call::OnSentPacket(const rtc::SentPacket& sent_packet) { |
| 1141 video_send_delay_stats_->OnSentPacket(sent_packet.packet_id, | 1142 video_send_delay_stats_->OnSentPacket(sent_packet.packet_id, |
| 1142 clock_->TimeInMilliseconds()); | 1143 clock_->TimeInMilliseconds()); |
| 1143 transport_send_->send_side_cc()->OnSentPacket(sent_packet); | 1144 transport_send_->send_side_cc()->OnSentPacket(sent_packet); |
| 1144 } | 1145 } |
| 1145 | 1146 |
| 1147 bool Call::SetRtpKeepAliveConfig(const RtpKeepAliveConfig& config) { | |
| 1148 // 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
| |
| 1149 | |
| 1150 ReadLockScoped lock(*send_crit_); | |
| 1151 if (config != config_.keepalive_config && | |
| 1152 (!video_send_streams_.empty() || !audio_send_ssrcs_.empty())) { | |
| 1153 LOG(LS_WARNING) << "RTP keep-alive settings cannot be altered after " | |
| 1154 "creating send streams."; | |
| 1155 return false; | |
| 1156 } | |
| 1157 config_.keepalive_config = config; | |
| 1158 return true; | |
| 1159 } | |
| 1160 | |
| 1146 void Call::OnNetworkChanged(uint32_t target_bitrate_bps, | 1161 void Call::OnNetworkChanged(uint32_t target_bitrate_bps, |
| 1147 uint8_t fraction_loss, | 1162 uint8_t fraction_loss, |
| 1148 int64_t rtt_ms, | 1163 int64_t rtt_ms, |
| 1149 int64_t probing_interval_ms) { | 1164 int64_t probing_interval_ms) { |
| 1150 // TODO(perkj): Consider making sure CongestionController operates on | 1165 // TODO(perkj): Consider making sure CongestionController operates on |
| 1151 // |worker_queue_|. | 1166 // |worker_queue_|. |
| 1152 if (!worker_queue_.IsCurrent()) { | 1167 if (!worker_queue_.IsCurrent()) { |
| 1153 worker_queue_.PostTask( | 1168 worker_queue_.PostTask( |
| 1154 [this, target_bitrate_bps, fraction_loss, rtt_ms, probing_interval_ms] { | 1169 [this, target_bitrate_bps, fraction_loss, rtt_ms, probing_interval_ms] { |
| 1155 OnNetworkChanged(target_bitrate_bps, fraction_loss, rtt_ms, | 1170 OnNetworkChanged(target_bitrate_bps, fraction_loss, rtt_ms, |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1417 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1432 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
| 1418 receive_side_cc_.OnReceivedPacket( | 1433 receive_side_cc_.OnReceivedPacket( |
| 1419 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1434 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
| 1420 header); | 1435 header); |
| 1421 } | 1436 } |
| 1422 } | 1437 } |
| 1423 | 1438 |
| 1424 } // namespace internal | 1439 } // namespace internal |
| 1425 | 1440 |
| 1426 } // namespace webrtc | 1441 } // namespace webrtc |
| OLD | NEW |