Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: webrtc/video/receive_statistics_proxy.h

Issue 2577073002: ReceiveStatisticsProxy: add some unit tests, change members from int to int64_t. (Closed)
Patch Set: add unit tests Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/video/receive_statistics_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | webrtc/video/receive_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698