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

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

Issue 2666533002: Add probe logging to RtcEventLog. (Closed)
Patch Set: |min_probes| --> |min_packets| 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
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 rtc::CritScope lock(&crit_); 100 rtc::CritScope lock(&crit_);
101 if (event_log_) { 101 if (event_log_) {
102 event_log_->LogAudioSendStreamConfig(config); 102 event_log_->LogAudioSendStreamConfig(config);
103 } 103 }
104 } 104 }
105 105
106 void LogRtpHeader(webrtc::PacketDirection direction, 106 void LogRtpHeader(webrtc::PacketDirection direction,
107 webrtc::MediaType media_type, 107 webrtc::MediaType media_type,
108 const uint8_t* header, 108 const uint8_t* header,
109 size_t packet_length) override { 109 size_t packet_length) override {
110 LogRtpHeader(direction, media_type, header, packet_length,
111 PacketInfo::kNotAProbe);
112 }
113
114 void LogRtpHeader(webrtc::PacketDirection direction,
115 webrtc::MediaType media_type,
116 const uint8_t* header,
117 size_t packet_length,
118 int probe_cluster_id) override {
110 rtc::CritScope lock(&crit_); 119 rtc::CritScope lock(&crit_);
111 if (event_log_) { 120 if (event_log_) {
112 event_log_->LogRtpHeader(direction, media_type, header, packet_length); 121 event_log_->LogRtpHeader(direction, media_type, header, packet_length,
122 probe_cluster_id);
113 } 123 }
114 } 124 }
115 125
116 void LogRtcpPacket(webrtc::PacketDirection direction, 126 void LogRtcpPacket(webrtc::PacketDirection direction,
117 webrtc::MediaType media_type, 127 webrtc::MediaType media_type,
118 const uint8_t* packet, 128 const uint8_t* packet,
119 size_t length) override { 129 size_t length) override {
120 rtc::CritScope lock(&crit_); 130 rtc::CritScope lock(&crit_);
121 if (event_log_) { 131 if (event_log_) {
122 event_log_->LogRtcpPacket(direction, media_type, packet, length); 132 event_log_->LogRtcpPacket(direction, media_type, packet, length);
(...skipping 17 matching lines...) Expand all
140 } 150 }
141 151
142 void LogAudioNetworkAdaptation( 152 void LogAudioNetworkAdaptation(
143 const AudioNetworkAdaptor::EncoderRuntimeConfig& config) override { 153 const AudioNetworkAdaptor::EncoderRuntimeConfig& config) override {
144 rtc::CritScope lock(&crit_); 154 rtc::CritScope lock(&crit_);
145 if (event_log_) { 155 if (event_log_) {
146 event_log_->LogAudioNetworkAdaptation(config); 156 event_log_->LogAudioNetworkAdaptation(config);
147 } 157 }
148 } 158 }
149 159
160 void LogProbeClusterCreated(int id,
161 int bitrate_bps,
162 int min_probes,
terelius 2017/02/20 14:00:31 probes -> packets
163 int min_bytes) override {
164 rtc::CritScope lock(&crit_);
165 if (event_log_) {
166 event_log_->LogProbeClusterCreated(id, bitrate_bps, min_probes,
167 min_bytes);
168 }
169 };
170
171 void LogProbeResultSuccess(int id, int bitrate_bps) override {
172 rtc::CritScope lock(&crit_);
173 if (event_log_) {
174 event_log_->LogProbeResultSuccess(id, bitrate_bps);
175 }
176 };
177
178 void LogProbeResultFailure(int id,
179 ProbeFailureReason failure_reason) override {
180 rtc::CritScope lock(&crit_);
181 if (event_log_) {
182 event_log_->LogProbeResultFailure(id, failure_reason);
183 }
184 };
185
150 void SetEventLog(RtcEventLog* event_log) { 186 void SetEventLog(RtcEventLog* event_log) {
151 rtc::CritScope lock(&crit_); 187 rtc::CritScope lock(&crit_);
152 event_log_ = event_log; 188 event_log_ = event_log;
153 } 189 }
154 190
155 private: 191 private:
156 rtc::CriticalSection crit_; 192 rtc::CriticalSection crit_;
157 RtcEventLog* event_log_ GUARDED_BY(crit_); 193 RtcEventLog* event_log_ GUARDED_BY(crit_);
158 RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogProxy); 194 RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogProxy);
159 }; 195 };
(...skipping 2851 matching lines...) Expand 10 before | Expand all | Expand 10 after
3011 int64_t min_rtt = 0; 3047 int64_t min_rtt = 0;
3012 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3048 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3013 0) { 3049 0) {
3014 return 0; 3050 return 0;
3015 } 3051 }
3016 return rtt; 3052 return rtt;
3017 } 3053 }
3018 3054
3019 } // namespace voe 3055 } // namespace voe
3020 } // namespace webrtc 3056 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698