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

Unified Diff: webrtc/video/send_statistics_proxy.h

Issue 1325153009: Add histogram for percentage of sent frames that are limited in resolution due to quality. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: add stats for number of times a frame is down scaled Created 5 years, 3 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
Index: webrtc/video/send_statistics_proxy.h
diff --git a/webrtc/video/send_statistics_proxy.h b/webrtc/video/send_statistics_proxy.h
index 60d962f93b3a1cdf541868fab929001fdce7d801..e8b807d1c356bcfb1fe54df46967af0502379a51 100644
--- a/webrtc/video/send_statistics_proxy.h
+++ b/webrtc/video/send_statistics_proxy.h
@@ -102,6 +102,15 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
int sum;
int num_samples;
};
+ struct BoolSampleCounter {
+ BoolSampleCounter() : sum(0), num_samples(0) {}
+ void Add(bool sample);
pbos-webrtc 2015/09/28 14:30:18 Should these counter classes be shared? I don't re
mflodman 2015/10/02 09:21:51 Or move it to a shared header.
åsapersson 2015/10/06 11:26:39 Ok this part has been submitted in another cl. Can
mflodman 2015/10/07 11:18:58 Absolutely.
+ int Percent(int min_required_samples) const;
+
+ private:
+ int sum;
+ int num_samples;
+ };
struct StatsUpdateTimes {
StatsUpdateTimes() : resolution_update_ms(0) {}
int64_t resolution_update_ms;
@@ -129,6 +138,8 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
SampleCounter sent_width_counter_ GUARDED_BY(crit_);
SampleCounter sent_height_counter_ GUARDED_BY(crit_);
SampleCounter encode_time_counter_ GUARDED_BY(crit_);
+ BoolSampleCounter quality_limited_frame_counter_ GUARDED_BY(crit_);
+ SampleCounter quality_downscales_counter_ GUARDED_BY(crit_);
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698