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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 void SendStatisticsProxy::StatisticsUpdated(const RtcpStatistics& statistics, | 349 void SendStatisticsProxy::StatisticsUpdated(const RtcpStatistics& statistics, |
350 uint32_t ssrc) { | 350 uint32_t ssrc) { |
351 rtc::CritScope lock(&crit_); | 351 rtc::CritScope lock(&crit_); |
352 VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc); | 352 VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc); |
353 if (stats == nullptr) | 353 if (stats == nullptr) |
354 return; | 354 return; |
355 | 355 |
356 stats->rtcp_stats = statistics; | 356 stats->rtcp_stats = statistics; |
357 } | 357 } |
358 | 358 |
359 void SendStatisticsProxy::CNameChanged(const char* cname, uint32_t ssrc) { | 359 void SendStatisticsProxy::CNameChanged(const char* cname, uint32_t ssrc) {} |
360 } | |
361 | 360 |
362 void SendStatisticsProxy::DataCountersUpdated( | 361 void SendStatisticsProxy::DataCountersUpdated( |
363 const StreamDataCounters& counters, | 362 const StreamDataCounters& counters, |
364 uint32_t ssrc) { | 363 uint32_t ssrc) { |
365 rtc::CritScope lock(&crit_); | 364 rtc::CritScope lock(&crit_); |
366 VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc); | 365 VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc); |
367 RTC_DCHECK(stats != nullptr) | 366 RTC_DCHECK(stats != nullptr) |
368 << "DataCountersUpdated reported for unknown ssrc: " << ssrc; | 367 << "DataCountersUpdated reported for unknown ssrc: " << ssrc; |
369 | 368 |
370 stats->rtp_stats = counters; | 369 stats->rtp_stats = counters; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 return Fraction(min_required_samples, 1000.0f); | 432 return Fraction(min_required_samples, 1000.0f); |
434 } | 433 } |
435 | 434 |
436 int SendStatisticsProxy::BoolSampleCounter::Fraction( | 435 int SendStatisticsProxy::BoolSampleCounter::Fraction( |
437 int min_required_samples, float multiplier) const { | 436 int min_required_samples, float multiplier) const { |
438 if (num_samples < min_required_samples || num_samples == 0) | 437 if (num_samples < min_required_samples || num_samples == 0) |
439 return -1; | 438 return -1; |
440 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); | 439 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); |
441 } | 440 } |
442 } // namespace webrtc | 441 } // namespace webrtc |
OLD | NEW |