Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: webrtc/voice_engine/channel.cc

Issue 2661043003: Allow ANA to receive RPLR (recoverable packet loss rate) indications (Closed)
Patch Set: Uncomment thread-checker to fix UT Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 void Channel::OnTwccBasedUplinkPacketLossRate(float packet_loss_rate) { 1307 void Channel::OnTwccBasedUplinkPacketLossRate(float packet_loss_rate) {
1308 if (!use_twcc_plr_for_ana_) 1308 if (!use_twcc_plr_for_ana_)
1309 return; 1309 return;
1310 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { 1310 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) {
1311 if (*encoder) { 1311 if (*encoder) {
1312 (*encoder)->OnReceivedUplinkPacketLossFraction(packet_loss_rate); 1312 (*encoder)->OnReceivedUplinkPacketLossFraction(packet_loss_rate);
1313 } 1313 }
1314 }); 1314 });
1315 } 1315 }
1316 1316
1317 void Channel::OnRecoverableUplinkPacketLossRate(
1318 float recoverable_packet_loss_rate) {
1319 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) {
1320 if (*encoder) {
1321 (*encoder)->OnReceivedUplinkRecoverablePacketLossFraction(
1322 recoverable_packet_loss_rate);
1323 }
1324 });
1325 }
1326
1317 void Channel::OnUplinkPacketLossRate(float packet_loss_rate) { 1327 void Channel::OnUplinkPacketLossRate(float packet_loss_rate) {
1318 if (use_twcc_plr_for_ana_) 1328 if (use_twcc_plr_for_ana_)
1319 return; 1329 return;
1320 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { 1330 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) {
1321 if (*encoder) { 1331 if (*encoder) {
1322 (*encoder)->OnReceivedUplinkPacketLossFraction(packet_loss_rate); 1332 (*encoder)->OnReceivedUplinkPacketLossFraction(packet_loss_rate);
1323 } 1333 }
1324 }); 1334 });
1325 } 1335 }
1326 1336
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
3019 int64_t min_rtt = 0; 3029 int64_t min_rtt = 0;
3020 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3030 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3021 0) { 3031 0) {
3022 return 0; 3032 return 0;
3023 } 3033 }
3024 return rtt; 3034 return rtt;
3025 } 3035 }
3026 3036
3027 } // namespace voe 3037 } // namespace voe
3028 } // namespace webrtc 3038 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/voice_engine/channel.h ('k') | webrtc/voice_engine/channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698