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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 79 } |
80 | 80 |
81 // Returns the average RTT. | 81 // Returns the average RTT. |
82 virtual int64_t LastProcessedRtt() const { | 82 virtual int64_t LastProcessedRtt() const { |
83 return owner_->avg_rtt_ms(); | 83 return owner_->avg_rtt_ms(); |
84 } | 84 } |
85 | 85 |
86 private: | 86 private: |
87 CallStats* owner_; | 87 CallStats* owner_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(RtcpObserver); | 89 RTC_DISALLOW_COPY_AND_ASSIGN(RtcpObserver); |
90 }; | 90 }; |
91 | 91 |
92 CallStats::CallStats() | 92 CallStats::CallStats() |
93 : crit_(CriticalSectionWrapper::CreateCriticalSection()), | 93 : crit_(CriticalSectionWrapper::CreateCriticalSection()), |
94 rtcp_rtt_stats_(new RtcpObserver(this)), | 94 rtcp_rtt_stats_(new RtcpObserver(this)), |
95 last_process_time_(TickTime::MillisecondTimestamp()), | 95 last_process_time_(TickTime::MillisecondTimestamp()), |
96 max_rtt_ms_(0), | 96 max_rtt_ms_(0), |
97 avg_rtt_ms_(0) { | 97 avg_rtt_ms_(0) { |
98 } | 98 } |
99 | 99 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } | 158 } |
159 } | 159 } |
160 } | 160 } |
161 | 161 |
162 void CallStats::OnRttUpdate(int64_t rtt) { | 162 void CallStats::OnRttUpdate(int64_t rtt) { |
163 CriticalSectionScoped cs(crit_.get()); | 163 CriticalSectionScoped cs(crit_.get()); |
164 reports_.push_back(RttTime(rtt, TickTime::MillisecondTimestamp())); | 164 reports_.push_back(RttTime(rtt, TickTime::MillisecondTimestamp())); |
165 } | 165 } |
166 | 166 |
167 } // namespace webrtc | 167 } // namespace webrtc |
OLD | NEW |