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, |