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

Unified Diff: webrtc/video/receive_statistics_proxy.cc

Issue 1366583002: Add stats for rendered pixels (sqrt(w*h)) per second: (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 | « webrtc/video/receive_statistics_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/receive_statistics_proxy.cc
diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc
index b6063a80afbb1719b2c013a0881a52910da3a38d..1147ef245b83d7c2924ddb2706580635b4e60eee 100644
--- a/webrtc/video/receive_statistics_proxy.cc
+++ b/webrtc/video/receive_statistics_proxy.cc
@@ -21,7 +21,8 @@ ReceiveStatisticsProxy::ReceiveStatisticsProxy(uint32_t ssrc, Clock* clock)
// 1000ms window, scale 1000 for ms to s.
decode_fps_estimator_(1000, 1000),
renders_fps_estimator_(1000, 1000),
- render_fps_tracker_(100u, 10u) {
+ render_fps_tracker_(100u, 10u),
+ render_pixel_tracker_(100u, 10u) {
stats_.ssrc = ssrc;
}
@@ -40,6 +41,12 @@ void ReceiveStatisticsProxy::UpdateHistograms() {
if (render_fps > 0)
RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.RenderFramesPerSecond", render_fps);
+ int render_pps = static_cast<int>(render_pixel_tracker_.ComputeTotalRate());
+ if (render_pps > 0) {
+ RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.RenderPixelsPerSecond",
+ render_pps);
+ }
+
const int kMinRequiredSamples = 200;
int width = render_width_counter_.Avg(kMinRequiredSamples);
int height = render_height_counter_.Avg(kMinRequiredSamples);
@@ -146,6 +153,8 @@ void ReceiveStatisticsProxy::OnRenderedFrame(int width, int height) {
render_width_counter_.Add(width);
render_height_counter_.Add(height);
render_fps_tracker_.AddSamples(1);
+ if (width > 0 && height > 0)
pbos-webrtc 2015/09/23 13:39:20 DCHECK width>0 and height>0 instead.
åsapersson 2015/09/23 14:07:53 Done.
+ render_pixel_tracker_.AddSamples(sqrt(width * height));
}
void ReceiveStatisticsProxy::OnReceiveRatesUpdated(uint32_t bitRate,
« no previous file with comments | « webrtc/video/receive_statistics_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698