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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 uint32_t ssrc, | 78 uint32_t ssrc, |
79 const RtcpPacketTypeCounter& packet_counter) override; | 79 const RtcpPacketTypeCounter& packet_counter) override; |
80 // Overrides StreamDataCountersCallback. | 80 // Overrides StreamDataCountersCallback. |
81 void DataCountersUpdated(const webrtc::StreamDataCounters& counters, | 81 void DataCountersUpdated(const webrtc::StreamDataCounters& counters, |
82 uint32_t ssrc) override; | 82 uint32_t ssrc) override; |
83 | 83 |
84 private: | 84 private: |
85 struct SampleCounter { | 85 struct SampleCounter { |
86 SampleCounter() : sum(0), num_samples(0) {} | 86 SampleCounter() : sum(0), num_samples(0) {} |
87 void Add(int sample); | 87 void Add(int sample); |
88 int Avg(int min_required_samples) const; | 88 int Avg(int64_t min_required_samples) const; |
89 void Reset(); | 89 void Reset(); |
90 | 90 |
91 private: | 91 private: |
92 int sum; | 92 int64_t sum; |
93 int num_samples; | 93 int64_t num_samples; |
94 }; | 94 }; |
95 struct QpCounters { | 95 struct QpCounters { |
96 SampleCounter vp8; | 96 SampleCounter vp8; |
97 }; | 97 }; |
98 | 98 |
99 void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 99 void UpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
100 | 100 |
101 void QualitySample() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 101 void QualitySample() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
102 | 102 |
103 Clock* const clock_; | 103 Clock* const clock_; |
(...skipping 29 matching lines...) Expand all Loading... |
133 SampleCounter e2e_delay_counter_ GUARDED_BY(crit_); | 133 SampleCounter e2e_delay_counter_ GUARDED_BY(crit_); |
134 MaxCounter freq_offset_counter_ GUARDED_BY(crit_); | 134 MaxCounter freq_offset_counter_ GUARDED_BY(crit_); |
135 int64_t first_report_block_time_ms_ GUARDED_BY(crit_); | 135 int64_t first_report_block_time_ms_ GUARDED_BY(crit_); |
136 ReportBlockStats report_block_stats_ GUARDED_BY(crit_); | 136 ReportBlockStats report_block_stats_ GUARDED_BY(crit_); |
137 QpCounters qp_counters_; // Only accessed on the decoding thread. | 137 QpCounters qp_counters_; // Only accessed on the decoding thread. |
138 std::map<uint32_t, StreamDataCounters> rtx_stats_ GUARDED_BY(crit_); | 138 std::map<uint32_t, StreamDataCounters> rtx_stats_ GUARDED_BY(crit_); |
139 }; | 139 }; |
140 | 140 |
141 } // namespace webrtc | 141 } // namespace webrtc |
142 #endif // WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ | 142 #endif // WEBRTC_VIDEO_RECEIVE_STATISTICS_PROXY_H_ |
OLD | NEW |