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

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: address comments Created 3 years, 8 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') | 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 312186a1f9e63bce2a8e7d099a593edcf99699e8..23558ab8f6905ac0f3bc108b9f795fb8cb4e2003 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 num_cpu_downscales); // -1: disabled.
void SetQualityScalingStats(int num_quality_downscales); // -1: disabled.
void OnEncoderStatsUpdate(uint32_t framerate, uint32_t bitrate);
@@ -144,10 +144,17 @@ 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
- SampleCounter vp9; // QP range: 0-255
- SampleCounter h264; // QP range: 0-51
+ SampleCounter vp8; // QP range: 0-127.
+ SampleCounter vp9; // QP range: 0-255.
+ SampleCounter h264; // QP range: 0-51.
};
void PurgeOldStats() EXCLUSIVE_LOCKS_REQUIRED(crit_);
VideoSendStream::StreamStats* GetStatsEntry(uint32_t ssrc)
@@ -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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698