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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // 1000ms window, scale 1000 for ms to s. | 71 // 1000ms window, scale 1000 for ms to s. |
72 decode_fps_estimator_(1000, 1000), | 72 decode_fps_estimator_(1000, 1000), |
73 renders_fps_estimator_(1000, 1000), | 73 renders_fps_estimator_(1000, 1000), |
74 render_fps_tracker_(100, 10u), | 74 render_fps_tracker_(100, 10u), |
75 render_pixel_tracker_(100, 10u), | 75 render_pixel_tracker_(100, 10u), |
76 freq_offset_counter_(clock, nullptr, kFreqOffsetProcessIntervalMs), | 76 freq_offset_counter_(clock, nullptr, kFreqOffsetProcessIntervalMs), |
77 first_report_block_time_ms_(-1), | 77 first_report_block_time_ms_(-1), |
78 avg_rtt_ms_(0), | 78 avg_rtt_ms_(0), |
79 frame_window_accumulated_bytes_(0) { | 79 frame_window_accumulated_bytes_(0) { |
80 stats_.ssrc = config_.rtp.remote_ssrc; | 80 stats_.ssrc = config_.rtp.remote_ssrc; |
81 for (auto it : config_.rtp.rtx) | 81 // TODO(brandtr): Replace |rtx_stats_| with a single instance of |
82 rtx_stats_[it.second.ssrc] = StreamDataCounters(); | 82 // StreamDataCounters. |
| 83 if (config_.rtp.rtx_ssrc) { |
| 84 rtx_stats_[config_.rtp.rtx_ssrc] = StreamDataCounters(); |
| 85 } |
83 } | 86 } |
84 | 87 |
85 ReceiveStatisticsProxy::~ReceiveStatisticsProxy() { | 88 ReceiveStatisticsProxy::~ReceiveStatisticsProxy() { |
86 UpdateHistograms(); | 89 UpdateHistograms(); |
87 } | 90 } |
88 | 91 |
89 void ReceiveStatisticsProxy::UpdateHistograms() { | 92 void ReceiveStatisticsProxy::UpdateHistograms() { |
90 RTC_HISTOGRAM_COUNTS_100000( | 93 RTC_HISTOGRAM_COUNTS_100000( |
91 "WebRTC.Video.ReceiveStreamLifetimeInSeconds", | 94 "WebRTC.Video.ReceiveStreamLifetimeInSeconds", |
92 (clock_->TimeInMilliseconds() - start_ms_) / 1000); | 95 (clock_->TimeInMilliseconds() - start_ms_) / 1000); |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 sum = 0; | 536 sum = 0; |
534 } | 537 } |
535 | 538 |
536 void ReceiveStatisticsProxy::OnRttUpdate(int64_t avg_rtt_ms, | 539 void ReceiveStatisticsProxy::OnRttUpdate(int64_t avg_rtt_ms, |
537 int64_t max_rtt_ms) { | 540 int64_t max_rtt_ms) { |
538 rtc::CritScope lock(&crit_); | 541 rtc::CritScope lock(&crit_); |
539 avg_rtt_ms_ = avg_rtt_ms; | 542 avg_rtt_ms_ = avg_rtt_ms; |
540 } | 543 } |
541 | 544 |
542 } // namespace webrtc | 545 } // namespace webrtc |
OLD | NEW |