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

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

Issue 2666533002: Add probe logging to RtcEventLog. (Closed)
Patch Set: Rebase + format Created 3 years, 10 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/tools/event_log_visualizer/analyzer.cc ('k') | no next file » | 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 rtc::CritScope lock(&crit_); 101 rtc::CritScope lock(&crit_);
102 if (event_log_) { 102 if (event_log_) {
103 event_log_->LogAudioSendStreamConfig(config); 103 event_log_->LogAudioSendStreamConfig(config);
104 } 104 }
105 } 105 }
106 106
107 void LogRtpHeader(webrtc::PacketDirection direction, 107 void LogRtpHeader(webrtc::PacketDirection direction,
108 webrtc::MediaType media_type, 108 webrtc::MediaType media_type,
109 const uint8_t* header, 109 const uint8_t* header,
110 size_t packet_length) override { 110 size_t packet_length) override {
111 LogRtpHeader(direction, media_type, header, packet_length,
112 PacedPacketInfo::kNotAProbe);
113 }
114
115 void LogRtpHeader(webrtc::PacketDirection direction,
116 webrtc::MediaType media_type,
117 const uint8_t* header,
118 size_t packet_length,
119 int probe_cluster_id) override {
111 rtc::CritScope lock(&crit_); 120 rtc::CritScope lock(&crit_);
112 if (event_log_) { 121 if (event_log_) {
113 event_log_->LogRtpHeader(direction, media_type, header, packet_length); 122 event_log_->LogRtpHeader(direction, media_type, header, packet_length,
123 probe_cluster_id);
114 } 124 }
115 } 125 }
116 126
117 void LogRtcpPacket(webrtc::PacketDirection direction, 127 void LogRtcpPacket(webrtc::PacketDirection direction,
118 webrtc::MediaType media_type, 128 webrtc::MediaType media_type,
119 const uint8_t* packet, 129 const uint8_t* packet,
120 size_t length) override { 130 size_t length) override {
121 rtc::CritScope lock(&crit_); 131 rtc::CritScope lock(&crit_);
122 if (event_log_) { 132 if (event_log_) {
123 event_log_->LogRtcpPacket(direction, media_type, packet, length); 133 event_log_->LogRtcpPacket(direction, media_type, packet, length);
(...skipping 26 matching lines...) Expand all
150 } 160 }
151 161
152 void LogAudioNetworkAdaptation( 162 void LogAudioNetworkAdaptation(
153 const AudioNetworkAdaptor::EncoderRuntimeConfig& config) override { 163 const AudioNetworkAdaptor::EncoderRuntimeConfig& config) override {
154 rtc::CritScope lock(&crit_); 164 rtc::CritScope lock(&crit_);
155 if (event_log_) { 165 if (event_log_) {
156 event_log_->LogAudioNetworkAdaptation(config); 166 event_log_->LogAudioNetworkAdaptation(config);
157 } 167 }
158 } 168 }
159 169
170 void LogProbeClusterCreated(int id,
171 int bitrate_bps,
172 int min_probes,
173 int min_bytes) override {
174 rtc::CritScope lock(&crit_);
175 if (event_log_) {
176 event_log_->LogProbeClusterCreated(id, bitrate_bps, min_probes,
177 min_bytes);
178 }
179 };
180
181 void LogProbeResultSuccess(int id, int bitrate_bps) override {
182 rtc::CritScope lock(&crit_);
183 if (event_log_) {
184 event_log_->LogProbeResultSuccess(id, bitrate_bps);
185 }
186 };
187
188 void LogProbeResultFailure(int id,
189 ProbeFailureReason failure_reason) override {
190 rtc::CritScope lock(&crit_);
191 if (event_log_) {
192 event_log_->LogProbeResultFailure(id, failure_reason);
193 }
194 };
195
160 void SetEventLog(RtcEventLog* event_log) { 196 void SetEventLog(RtcEventLog* event_log) {
161 rtc::CritScope lock(&crit_); 197 rtc::CritScope lock(&crit_);
162 event_log_ = event_log; 198 event_log_ = event_log;
163 } 199 }
164 200
165 private: 201 private:
166 rtc::CriticalSection crit_; 202 rtc::CriticalSection crit_;
167 RtcEventLog* event_log_ GUARDED_BY(crit_); 203 RtcEventLog* event_log_ GUARDED_BY(crit_);
168 RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogProxy); 204 RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogProxy);
169 }; 205 };
(...skipping 2870 matching lines...) Expand 10 before | Expand all | Expand 10 after
3040 int64_t min_rtt = 0; 3076 int64_t min_rtt = 0;
3041 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3077 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3042 0) { 3078 0) {
3043 return 0; 3079 return 0;
3044 } 3080 }
3045 return rtt; 3081 return rtt;
3046 } 3082 }
3047 3083
3048 } // namespace voe 3084 } // namespace voe
3049 } // namespace webrtc 3085 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/tools/event_log_visualizer/analyzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698