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

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

Issue 2303763002: Use RateCounter for received bitrate stats. (Closed)
Patch Set: fix warning Created 4 years, 3 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 | « webrtc/call/call.cc ('k') | webrtc/video/stats_counter.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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Note: StatsCounter takes ownership of |observer|. 75 // Note: StatsCounter takes ownership of |observer|.
76 76
77 class StatsCounter { 77 class StatsCounter {
78 public: 78 public:
79 virtual ~StatsCounter(); 79 virtual ~StatsCounter();
80 80
81 virtual bool GetMetric(int* metric) const = 0; 81 virtual bool GetMetric(int* metric) const = 0;
82 82
83 AggregatedStats GetStats(); 83 AggregatedStats GetStats();
84 84
85 // Checks if a sample has been added (i.e. Add or Set called).
86 bool HasSample() const;
87
85 protected: 88 protected:
86 StatsCounter(Clock* clock, 89 StatsCounter(Clock* clock,
87 bool include_empty_intervals, 90 bool include_empty_intervals,
88 StatsCounterObserver* observer); 91 StatsCounterObserver* observer);
89 92
90 void Add(int sample); 93 void Add(int sample);
91 void Set(int sample); 94 void Set(int sample);
92 95
93 int max_; 96 int max_;
94 int64_t sum_; 97 int64_t sum_;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 225
223 private: 226 private:
224 bool GetMetric(int* metric) const override; 227 bool GetMetric(int* metric) const override;
225 228
226 RTC_DISALLOW_COPY_AND_ASSIGN(RateAccCounter); 229 RTC_DISALLOW_COPY_AND_ASSIGN(RateAccCounter);
227 }; 230 };
228 231
229 } // namespace webrtc 232 } // namespace webrtc
230 233
231 #endif // WEBRTC_VIDEO_STATS_COUNTER_H_ 234 #endif // WEBRTC_VIDEO_STATS_COUNTER_H_
OLDNEW
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/video/stats_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698