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

Side by Side Diff: webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.cc

Issue 2745473003: Resolve cyclic dependency between audio network adaptor and event log api (Closed)
Patch Set: Revert "Activated checks for rtc_event_log_api" Created 3 years, 8 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 last_metrics_.overhead_bytes_per_packet = 105 last_metrics_.overhead_bytes_per_packet =
106 rtc::Optional<size_t>(overhead_bytes_per_packet); 106 rtc::Optional<size_t>(overhead_bytes_per_packet);
107 DumpNetworkMetrics(); 107 DumpNetworkMetrics();
108 108
109 Controller::NetworkMetrics network_metrics; 109 Controller::NetworkMetrics network_metrics;
110 network_metrics.overhead_bytes_per_packet = 110 network_metrics.overhead_bytes_per_packet =
111 rtc::Optional<size_t>(overhead_bytes_per_packet); 111 rtc::Optional<size_t>(overhead_bytes_per_packet);
112 UpdateNetworkMetrics(network_metrics); 112 UpdateNetworkMetrics(network_metrics);
113 } 113 }
114 114
115 AudioNetworkAdaptor::EncoderRuntimeConfig 115 AudioEncoderRuntimeConfig AudioNetworkAdaptorImpl::GetEncoderRuntimeConfig() {
116 AudioNetworkAdaptorImpl::GetEncoderRuntimeConfig() { 116 AudioEncoderRuntimeConfig config;
117 EncoderRuntimeConfig config;
118 for (auto& controller : 117 for (auto& controller :
119 controller_manager_->GetSortedControllers(last_metrics_)) 118 controller_manager_->GetSortedControllers(last_metrics_))
120 controller->MakeDecision(&config); 119 controller->MakeDecision(&config);
121 120
122 if (debug_dump_writer_) 121 if (debug_dump_writer_)
123 debug_dump_writer_->DumpEncoderRuntimeConfig( 122 debug_dump_writer_->DumpEncoderRuntimeConfig(
124 config, config_.clock->TimeInMilliseconds()); 123 config, config_.clock->TimeInMilliseconds());
125 124
126 if (event_log_writer_) 125 if (event_log_writer_)
127 event_log_writer_->MaybeLogEncoderConfig(config); 126 event_log_writer_->MaybeLogEncoderConfig(config);
(...skipping 15 matching lines...) Expand all
143 config_.clock->TimeInMilliseconds()); 142 config_.clock->TimeInMilliseconds());
144 } 143 }
145 144
146 void AudioNetworkAdaptorImpl::UpdateNetworkMetrics( 145 void AudioNetworkAdaptorImpl::UpdateNetworkMetrics(
147 const Controller::NetworkMetrics& network_metrics) { 146 const Controller::NetworkMetrics& network_metrics) {
148 for (auto& controller : controller_manager_->GetControllers()) 147 for (auto& controller : controller_manager_->GetControllers())
149 controller->UpdateNetworkMetrics(network_metrics); 148 controller->UpdateNetworkMetrics(network_metrics);
150 } 149 }
151 150
152 } // namespace webrtc 151 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698