OLD | NEW |
---|---|
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
118 DumpNetworkMetrics(); | 118 DumpNetworkMetrics(); |
119 | 119 |
120 Controller::NetworkMetrics network_metrics; | 120 Controller::NetworkMetrics network_metrics; |
121 network_metrics.overhead_bytes_per_packet = | 121 network_metrics.overhead_bytes_per_packet = |
122 rtc::Optional<size_t>(overhead_bytes_per_packet); | 122 rtc::Optional<size_t>(overhead_bytes_per_packet); |
123 UpdateNetworkMetrics(network_metrics); | 123 UpdateNetworkMetrics(network_metrics); |
124 } | 124 } |
125 | 125 |
126 AudioEncoderRuntimeConfig AudioNetworkAdaptorImpl::GetEncoderRuntimeConfig() { | 126 AudioEncoderRuntimeConfig AudioNetworkAdaptorImpl::GetEncoderRuntimeConfig() { |
127 AudioEncoderRuntimeConfig config; | 127 AudioEncoderRuntimeConfig config; |
128 if (prev_config_) { | |
129 config.last_fl_change_increase = prev_config_->last_fl_change_increase; | |
alexnarest
2017/09/14 07:53:42
Sorry, missed this one yesterday. I do not think w
ivoc
2017/09/14 09:59:44
Good point, I moved this into the FL controller.
| |
130 } | |
128 for (auto& controller : | 131 for (auto& controller : |
129 controller_manager_->GetSortedControllers(last_metrics_)) | 132 controller_manager_->GetSortedControllers(last_metrics_)) |
130 controller->MakeDecision(&config); | 133 controller->MakeDecision(&config); |
131 | 134 |
132 // Update ANA stats. | 135 // Update ANA stats. |
133 auto increment_opt = [](rtc::Optional<uint32_t>& a) { | 136 auto increment_opt = [](rtc::Optional<uint32_t>& a) { |
134 a = rtc::Optional<uint32_t>(a.value_or(0) + 1); | 137 a = rtc::Optional<uint32_t>(a.value_or(0) + 1); |
135 }; | 138 }; |
136 if (prev_config_) { | 139 if (prev_config_) { |
137 if (config.bitrate_bps != prev_config_->bitrate_bps) { | 140 if (config.bitrate_bps != prev_config_->bitrate_bps) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
204 debug_dump_writer_->DumpNetworkMetrics(last_metrics_, rtc::TimeMillis()); | 207 debug_dump_writer_->DumpNetworkMetrics(last_metrics_, rtc::TimeMillis()); |
205 } | 208 } |
206 | 209 |
207 void AudioNetworkAdaptorImpl::UpdateNetworkMetrics( | 210 void AudioNetworkAdaptorImpl::UpdateNetworkMetrics( |
208 const Controller::NetworkMetrics& network_metrics) { | 211 const Controller::NetworkMetrics& network_metrics) { |
209 for (auto& controller : controller_manager_->GetControllers()) | 212 for (auto& controller : controller_manager_->GetControllers()) |
210 controller->UpdateNetworkMetrics(network_metrics); | 213 controller->UpdateNetworkMetrics(network_metrics); |
211 } | 214 } |
212 | 215 |
213 } // namespace webrtc | 216 } // namespace webrtc |
OLD | NEW |