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

Side by Side Diff: webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 last_metrics_.uplink_packet_loss_fraction = 61 last_metrics_.uplink_packet_loss_fraction =
62 rtc::Optional<float>(uplink_packet_loss_fraction); 62 rtc::Optional<float>(uplink_packet_loss_fraction);
63 DumpNetworkMetrics(); 63 DumpNetworkMetrics();
64 64
65 Controller::NetworkMetrics network_metrics; 65 Controller::NetworkMetrics network_metrics;
66 network_metrics.uplink_packet_loss_fraction = 66 network_metrics.uplink_packet_loss_fraction =
67 rtc::Optional<float>(uplink_packet_loss_fraction); 67 rtc::Optional<float>(uplink_packet_loss_fraction);
68 UpdateNetworkMetrics(network_metrics); 68 UpdateNetworkMetrics(network_metrics);
69 } 69 }
70 70
71 void AudioNetworkAdaptorImpl::SetUplinkRecoverablePacketLossFraction(
72 float uplink_recoverable_packet_loss_fraction) {
73 last_metrics_.uplink_recoverable_packet_loss_fraction =
74 rtc::Optional<float>(uplink_recoverable_packet_loss_fraction);
75 DumpNetworkMetrics();
76
77 Controller::NetworkMetrics network_metrics;
78 network_metrics.uplink_recoverable_packet_loss_fraction =
79 rtc::Optional<float>(uplink_recoverable_packet_loss_fraction);
80 UpdateNetworkMetrics(network_metrics);
81 }
82
71 void AudioNetworkAdaptorImpl::SetRtt(int rtt_ms) { 83 void AudioNetworkAdaptorImpl::SetRtt(int rtt_ms) {
72 last_metrics_.rtt_ms = rtc::Optional<int>(rtt_ms); 84 last_metrics_.rtt_ms = rtc::Optional<int>(rtt_ms);
73 DumpNetworkMetrics(); 85 DumpNetworkMetrics();
74 86
75 Controller::NetworkMetrics network_metrics; 87 Controller::NetworkMetrics network_metrics;
76 network_metrics.rtt_ms = rtc::Optional<int>(rtt_ms); 88 network_metrics.rtt_ms = rtc::Optional<int>(rtt_ms);
77 UpdateNetworkMetrics(network_metrics); 89 UpdateNetworkMetrics(network_metrics);
78 } 90 }
79 91
80 void AudioNetworkAdaptorImpl::SetTargetAudioBitrate( 92 void AudioNetworkAdaptorImpl::SetTargetAudioBitrate(
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 config_.clock->TimeInMilliseconds()); 143 config_.clock->TimeInMilliseconds());
132 } 144 }
133 145
134 void AudioNetworkAdaptorImpl::UpdateNetworkMetrics( 146 void AudioNetworkAdaptorImpl::UpdateNetworkMetrics(
135 const Controller::NetworkMetrics& network_metrics) { 147 const Controller::NetworkMetrics& network_metrics) {
136 for (auto& controller : controller_manager_->GetControllers()) 148 for (auto& controller : controller_manager_->GetControllers())
137 controller->UpdateNetworkMetrics(network_metrics); 149 controller->UpdateNetworkMetrics(network_metrics);
138 } 150 }
139 151
140 } // namespace webrtc 152 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698