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

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

Issue 2559953002: Log audio network adapter decisions in event log. (Closed)
Patch Set: Log Ana Created 4 years 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) 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 void LogBwePacketLossEvent(int32_t bitrate, 134 void LogBwePacketLossEvent(int32_t bitrate,
135 uint8_t fraction_loss, 135 uint8_t fraction_loss,
136 int32_t total_packets) override { 136 int32_t total_packets) override {
137 rtc::CritScope lock(&crit_); 137 rtc::CritScope lock(&crit_);
138 if (event_log_) { 138 if (event_log_) {
139 event_log_->LogBwePacketLossEvent(bitrate, fraction_loss, total_packets); 139 event_log_->LogBwePacketLossEvent(bitrate, fraction_loss, total_packets);
140 } 140 }
141 } 141 }
142 142
143 void LogAnaDecisionEvent(rtc::Optional<int> bitrate_bps,
144 rtc::Optional<int> frame_length_ms,
145 rtc::Optional<float> uplink_packet_loss_fraction,
146 rtc::Optional<bool> enable_fec,
147 rtc::Optional<bool> enable_dtx,
148 rtc::Optional<size_t> num_channels) override {
149 rtc::CritScope lock(&crit_);
150 if (event_log_) {
151 event_log_->LogAnaDecisionEvent(bitrate_bps, frame_length_ms,
152 uplink_packet_loss_fraction, enable_fec,
153 enable_dtx, num_channels);
154 }
155 }
156
143 void SetEventLog(RtcEventLog* event_log) { 157 void SetEventLog(RtcEventLog* event_log) {
144 rtc::CritScope lock(&crit_); 158 rtc::CritScope lock(&crit_);
145 event_log_ = event_log; 159 event_log_ = event_log;
146 } 160 }
147 161
148 private: 162 private:
149 rtc::CriticalSection crit_; 163 rtc::CriticalSection crit_;
150 RtcEventLog* event_log_ GUARDED_BY(crit_); 164 RtcEventLog* event_log_ GUARDED_BY(crit_);
151 RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogProxy); 165 RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogProxy);
152 }; 166 };
(...skipping 3126 matching lines...) Expand 10 before | Expand all | Expand 10 after
3279 int64_t min_rtt = 0; 3293 int64_t min_rtt = 0;
3280 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3294 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3281 0) { 3295 0) {
3282 return 0; 3296 return 0;
3283 } 3297 }
3284 return rtt; 3298 return rtt;
3285 } 3299 }
3286 3300
3287 } // namespace voe 3301 } // namespace voe
3288 } // namespace webrtc 3302 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698