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

Unified Diff: webrtc/video/stats_counter.h

Issue 2235223002: Add ability to handle data from multiple streams in RateAccCounter. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: int -> uint32_t Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/video/stats_counter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/stats_counter.h
diff --git a/webrtc/video/stats_counter.h b/webrtc/video/stats_counter.h
index c6e6151933ea53fe88afb085c4fd0c158888ed46..08663f80155f1a6c582015e49e899e5550fa75eb 100644
--- a/webrtc/video/stats_counter.h
+++ b/webrtc/video/stats_counter.h
@@ -20,6 +20,7 @@ namespace webrtc {
class AggregatedCounter;
class Clock;
+class Samples;
// |StatsCounterObserver| is called periodically when a metric is updated.
class StatsCounterObserver {
@@ -104,15 +105,12 @@ class StatsCounter {
StatsCounterObserver* observer);
void Add(int sample);
- void Set(int sample);
+ void Set(int sample, uint32_t stream_id);
- int max_;
- int64_t sum_;
- int64_t num_samples_;
- int64_t last_sum_;
-
- const std::unique_ptr<AggregatedCounter> aggregated_counter_;
+ const bool include_empty_intervals_;
const int64_t process_intervals_ms_;
+ const std::unique_ptr<AggregatedCounter> aggregated_counter_;
+ const std::unique_ptr<Samples> samples_;
private:
bool TimeToProcess(int* num_elapsed_intervals);
@@ -121,7 +119,6 @@ class StatsCounter {
bool IncludeEmptyIntervals() const;
Clock* const clock_;
- const bool include_empty_intervals_;
const std::unique_ptr<StatsCounterObserver> observer_;
int64_t last_process_time_ms_;
bool paused_;
@@ -262,7 +259,7 @@ class RateAccCounter : public StatsCounter {
bool include_empty_intervals);
~RateAccCounter() override {}
- void Set(int sample);
+ void Set(int sample, uint32_t stream_id);
private:
bool GetMetric(int* metric) const override;
« no previous file with comments | « no previous file | webrtc/video/stats_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698