OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 void Channel::OnTwccBasedUplinkPacketLossRate( | 1296 void Channel::OnTwccBasedUplinkPacketLossRate( |
1297 const rtc::Optional<float>& packet_loss_rate) { | 1297 const rtc::Optional<float>& packet_loss_rate) { |
1298 if (!use_twcc_plr_for_ana_) | 1298 if (!use_twcc_plr_for_ana_) |
1299 return; | 1299 return; |
1300 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { | 1300 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { |
1301 if (*encoder) | 1301 if (*encoder) |
1302 (*encoder)->OnReceivedUplinkPacketLossFraction(packet_loss_rate); | 1302 (*encoder)->OnReceivedUplinkPacketLossFraction(packet_loss_rate); |
1303 }); | 1303 }); |
1304 } | 1304 } |
1305 | 1305 |
| 1306 void Channel::OnRecoverableUplinkPacketLossRate( |
| 1307 const rtc::Optional<float>& recoverable_packet_loss_rate) { |
| 1308 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { |
| 1309 if (*encoder) |
| 1310 (*encoder)->OnReceivedUplinkRecoverablePacketLossFraction( |
| 1311 recoverable_packet_loss_rate); |
| 1312 }); |
| 1313 } |
| 1314 |
1306 void Channel::OnUplinkPacketLossRate(float packet_loss_rate) { | 1315 void Channel::OnUplinkPacketLossRate(float packet_loss_rate) { |
1307 if (use_twcc_plr_for_ana_) | 1316 if (use_twcc_plr_for_ana_) |
1308 return; | 1317 return; |
1309 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { | 1318 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { |
1310 if (*encoder) { | 1319 if (*encoder) { |
1311 (*encoder)->OnReceivedUplinkPacketLossFraction( | 1320 (*encoder)->OnReceivedUplinkPacketLossFraction( |
1312 rtc::Optional<float>(packet_loss_rate)); | 1321 rtc::Optional<float>(packet_loss_rate)); |
1313 } | 1322 } |
1314 }); | 1323 }); |
1315 } | 1324 } |
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3009 int64_t min_rtt = 0; | 3018 int64_t min_rtt = 0; |
3010 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3019 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3011 0) { | 3020 0) { |
3012 return 0; | 3021 return 0; |
3013 } | 3022 } |
3014 return rtt; | 3023 return rtt; |
3015 } | 3024 } |
3016 | 3025 |
3017 } // namespace voe | 3026 } // namespace voe |
3018 } // namespace webrtc | 3027 } // namespace webrtc |
OLD | NEW |