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

Unified Diff: webrtc/video/send_statistics_proxy.h

Issue 2786593003: Add histogram stats for number of cpu/quality adapt changes per minute for sent video streams: (Closed)
Patch Set: rebase Created 3 years, 9 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/send_statistics_proxy.cc » ('j') | webrtc/video/send_statistics_proxy.cc » ('J')
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 312186a1f9e63bce2a8e7d099a593edcf99699e8..2e607e95e3a42ffcd8cd35140b29f842e1abdeba 100644
--- a/webrtc/video/send_statistics_proxy.h
+++ b/webrtc/video/send_statistics_proxy.h
@@ -59,7 +59,7 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
void OnCpuRestrictedResolutionChanged(bool cpu_restricted_resolution);
void OnQualityRestrictedResolutionChanged(int num_quality_downscales);
- void SetCpuScalingStats(bool cpu_restricted_resolution);
+ void SetCpuScalingStats(int cpu_restricted_resolutions); // -1: disabled.
void SetQualityScalingStats(int num_quality_downscales); // -1: disabled.
void OnEncoderStatsUpdate(uint32_t framerate, uint32_t bitrate);
@@ -144,6 +144,13 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
bool last_paused_or_resumed;
int64_t last_ms;
};
+ struct StatsTimer {
+ void Start(int64_t now_ms);
+ void Stop(int64_t now_ms);
+ void Restart(int64_t now_ms);
+ int64_t start_ms = -1;
+ int64_t total_ms = 0;
+ };
struct QpCounters {
SampleCounter vp8; // QP range: 0-127
brandtr 2017/04/04 11:24:21 Unrelated nit: add period to these three comment l
åsapersson 2017/04/04 14:30:52 Done.
SampleCounter vp9; // QP range: 0-255
@@ -207,6 +214,8 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
RateAccCounter fec_byte_counter_;
int64_t first_rtcp_stats_time_ms_;
int64_t first_rtp_stats_time_ms_;
+ StatsTimer cpu_scaling_timer_;
+ StatsTimer quality_scaling_timer_;
BoolSampleCounter paused_time_counter_;
TargetRateUpdates target_rate_updates_;
ReportBlockStats report_block_stats_;
« no previous file with comments | « no previous file | webrtc/video/send_statistics_proxy.cc » ('j') | webrtc/video/send_statistics_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698