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

Unified Diff: webrtc/video/send_statistics_proxy.h

Issue 1374673003: Move sent key frame stats to send_statistics_proxy class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: address comments 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
« 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 3510ded0825dc385619fe8fb9dbdc88aa9ac0144..6366e5d945a56e14dcd72b2e6ce83e9e8da74753 100644
--- a/webrtc/video/send_statistics_proxy.h
+++ b/webrtc/video/send_statistics_proxy.h
@@ -96,6 +96,17 @@ class SendStatisticsProxy : public CpuOveruseMetricsObserver,
int sum;
int num_samples;
};
+ struct BoolSampleCounter {
+ BoolSampleCounter() : sum(0), num_samples(0) {}
+ void Add(bool sample);
+ int Percent(int min_required_samples) const;
+ int Permille(int min_required_samples) const;
+
+ private:
+ int Fraction(int min_required_samples, float multiplier) const;
pbos-webrtc 2015/09/28 13:50:12 denominator
+ int sum;
+ int num_samples;
+ };
struct StatsUpdateTimes {
StatsUpdateTimes() : resolution_update_ms(0) {}
int64_t resolution_update_ms;
@@ -122,6 +133,7 @@ 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 key_frame_counter_ GUARDED_BY(crit_);
};
} // namespace webrtc
« 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