OLD | NEW |
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 Loading... |
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 PacketInfo::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 17 matching lines...) Expand all Loading... |
141 } | 151 } |
142 | 152 |
143 void LogAudioNetworkAdaptation( | 153 void LogAudioNetworkAdaptation( |
144 const AudioNetworkAdaptor::EncoderRuntimeConfig& config) override { | 154 const AudioNetworkAdaptor::EncoderRuntimeConfig& config) override { |
145 rtc::CritScope lock(&crit_); | 155 rtc::CritScope lock(&crit_); |
146 if (event_log_) { | 156 if (event_log_) { |
147 event_log_->LogAudioNetworkAdaptation(config); | 157 event_log_->LogAudioNetworkAdaptation(config); |
148 } | 158 } |
149 } | 159 } |
150 | 160 |
| 161 void LogProbeClusterCreated(int id, |
| 162 int bitrate_bps, |
| 163 int min_probes, |
| 164 int min_bytes) override { |
| 165 rtc::CritScope lock(&crit_); |
| 166 if (event_log_) { |
| 167 event_log_->LogProbeClusterCreated(id, bitrate_bps, min_probes, |
| 168 min_bytes); |
| 169 } |
| 170 }; |
| 171 |
| 172 void LogProbeResultSuccess(int id, int bitrate_bps) override { |
| 173 rtc::CritScope lock(&crit_); |
| 174 if (event_log_) { |
| 175 event_log_->LogProbeResultSuccess(id, bitrate_bps); |
| 176 } |
| 177 }; |
| 178 |
| 179 void LogProbeResultFailure(int id, |
| 180 ProbeFailureReason failure_reason) override { |
| 181 rtc::CritScope lock(&crit_); |
| 182 if (event_log_) { |
| 183 event_log_->LogProbeResultFailure(id, failure_reason); |
| 184 } |
| 185 }; |
| 186 |
151 void SetEventLog(RtcEventLog* event_log) { | 187 void SetEventLog(RtcEventLog* event_log) { |
152 rtc::CritScope lock(&crit_); | 188 rtc::CritScope lock(&crit_); |
153 event_log_ = event_log; | 189 event_log_ = event_log; |
154 } | 190 } |
155 | 191 |
156 private: | 192 private: |
157 rtc::CriticalSection crit_; | 193 rtc::CriticalSection crit_; |
158 RtcEventLog* event_log_ GUARDED_BY(crit_); | 194 RtcEventLog* event_log_ GUARDED_BY(crit_); |
159 RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogProxy); | 195 RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogProxy); |
160 }; | 196 }; |
(...skipping 3142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3303 int64_t min_rtt = 0; | 3339 int64_t min_rtt = 0; |
3304 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3340 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
3305 0) { | 3341 0) { |
3306 return 0; | 3342 return 0; |
3307 } | 3343 } |
3308 return rtt; | 3344 return rtt; |
3309 } | 3345 } |
3310 | 3346 |
3311 } // namespace voe | 3347 } // namespace voe |
3312 } // namespace webrtc | 3348 } // namespace webrtc |
OLD | NEW |