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

Unified Diff: webrtc/video/send_statistics_proxy.h

Issue 2530393003: Move histogram for number of pause events to per stream. (Closed)
Patch Set: rebase 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
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..4c086b9593bacbb4ae2c0e3632309f0ef7a0e830 100644
--- a/webrtc/video/send_statistics_proxy.h
+++ b/webrtc/video/send_statistics_proxy.h
@@ -122,19 +122,27 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
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>

Powered by Google App Engine
This is Rietveld 408576698