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

Unified Diff: webrtc/video/send_statistics_proxy.h

Issue 2530393003: Move histogram for number of pause events to per stream. (Closed)
Patch Set: fix comment Created 4 years 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 | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/send_statistics_proxy.h
diff --git a/webrtc/video/send_statistics_proxy.h b/webrtc/video/send_statistics_proxy.h
index 934dab2f93e1f3af28d1f7f37084fcc1297b7760..ac52a52fcf965bcf987e562c28dacd0bdbaba24d 100644
--- a/webrtc/video/send_statistics_proxy.h
+++ b/webrtc/video/send_statistics_proxy.h
@@ -111,30 +111,38 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
SampleCounter() : sum(0), num_samples(0) {}
~SampleCounter() {}
void Add(int sample);
- int Avg(int min_required_samples) const;
+ int Avg(int64_t min_required_samples) const;
private:
- int sum;
- int num_samples;
+ int64_t sum;
+ int64_t num_samples;
};
class BoolSampleCounter {
public:
BoolSampleCounter() : sum(0), num_samples(0) {}
~BoolSampleCounter() {}
void Add(bool sample);
- int Percent(int min_required_samples) const;
- int Permille(int min_required_samples) const;
+ void Add(bool sample, int64_t count);
+ int Percent(int64_t min_required_samples) const;
+ int Permille(int64_t min_required_samples) const;
private:
- int Fraction(int min_required_samples, float multiplier) const;
- int sum;
- int num_samples;
+ int Fraction(int64_t min_required_samples, float multiplier) const;
+ int64_t sum;
+ int64_t num_samples;
};
struct StatsUpdateTimes {
StatsUpdateTimes() : resolution_update_ms(0), bitrate_update_ms(0) {}
int64_t resolution_update_ms;
int64_t bitrate_update_ms;
};
+ struct TargetRateUpdates {
+ TargetRateUpdates()
+ : pause_resume_events(0), last_paused_or_resumed(false), last_ms(-1) {}
+ int pause_resume_events;
+ bool last_paused_or_resumed;
+ int64_t last_ms;
+ };
struct QpCounters {
SampleCounter vp8; // QP range: 0-127
SampleCounter vp9; // QP range: 0-255
@@ -189,6 +197,8 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
RateCounter sent_fps_counter_;
int64_t first_rtcp_stats_time_ms_;
int64_t first_rtp_stats_time_ms_;
+ BoolSampleCounter paused_time_counter_;
+ TargetRateUpdates target_rate_updates_;
ReportBlockStats report_block_stats_;
const VideoSendStream::Stats start_stats_;
std::map<int, QpCounters>
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698