| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 } | 218 } |
| 219 | 219 |
| 220 void SendStatisticsProxy::CNameChanged(const char* cname, uint32_t ssrc) { | 220 void SendStatisticsProxy::CNameChanged(const char* cname, uint32_t ssrc) { |
| 221 } | 221 } |
| 222 | 222 |
| 223 void SendStatisticsProxy::DataCountersUpdated( | 223 void SendStatisticsProxy::DataCountersUpdated( |
| 224 const StreamDataCounters& counters, | 224 const StreamDataCounters& counters, |
| 225 uint32_t ssrc) { | 225 uint32_t ssrc) { |
| 226 rtc::CritScope lock(&crit_); | 226 rtc::CritScope lock(&crit_); |
| 227 VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc); | 227 VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc); |
| 228 DCHECK(stats != nullptr) << "DataCountersUpdated reported for unknown ssrc: " | 228 RTC_DCHECK(stats != nullptr) |
| 229 << ssrc; | 229 << "DataCountersUpdated reported for unknown ssrc: " << ssrc; |
| 230 | 230 |
| 231 stats->rtp_stats = counters; | 231 stats->rtp_stats = counters; |
| 232 } | 232 } |
| 233 | 233 |
| 234 void SendStatisticsProxy::Notify(const BitrateStatistics& total_stats, | 234 void SendStatisticsProxy::Notify(const BitrateStatistics& total_stats, |
| 235 const BitrateStatistics& retransmit_stats, | 235 const BitrateStatistics& retransmit_stats, |
| 236 uint32_t ssrc) { | 236 uint32_t ssrc) { |
| 237 rtc::CritScope lock(&crit_); | 237 rtc::CritScope lock(&crit_); |
| 238 VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc); | 238 VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc); |
| 239 if (stats == nullptr) | 239 if (stats == nullptr) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 269 ++num_samples; | 269 ++num_samples; |
| 270 } | 270 } |
| 271 | 271 |
| 272 int SendStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { | 272 int SendStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { |
| 273 if (num_samples < min_required_samples || num_samples == 0) | 273 if (num_samples < min_required_samples || num_samples == 0) |
| 274 return -1; | 274 return -1; |
| 275 return sum / num_samples; | 275 return sum / num_samples; |
| 276 } | 276 } |
| 277 | 277 |
| 278 } // namespace webrtc | 278 } // namespace webrtc |
| OLD | NEW |