Chromium Code Reviews| Index: webrtc/video/receive_statistics_proxy.cc |
| diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc |
| index abf297f56f962b3af150f673cc7d50ba3c9ebab2..6f795f18efa3cb8bf4c7216184d5ef1da4a8aada 100644 |
| --- a/webrtc/video/receive_statistics_proxy.cc |
| +++ b/webrtc/video/receive_statistics_proxy.cc |
| @@ -59,6 +59,10 @@ void ReceiveStatisticsProxy::UpdateHistograms() { |
| RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedWidthInPixels", width); |
| RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceivedHeightInPixels", height); |
| } |
| + int sync_offset_ms = render_sync_offset_counter_.Avg(kMinRequiredSamples); |
| + if (sync_offset_ms != -1) |
| + RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.AVSyncOffsetInMs", sync_offset_ms); |
| + |
| int qp = qp_counters_.vp8.Avg(kMinRequiredSamples); |
| if (qp != -1) |
| RTC_HISTOGRAM_COUNTS_200("WebRTC.Video.Decoded.Vp8.Qp", qp); |
| @@ -220,7 +224,9 @@ void ReceiveStatisticsProxy::OnDecodedFrame() { |
| stats_.decode_frame_rate = decode_fps_estimator_.Rate(now); |
| } |
| -void ReceiveStatisticsProxy::OnRenderedFrame(int width, int height) { |
| +void ReceiveStatisticsProxy::OnRenderedFrame(int width, |
| + int height, |
| + int64_t stream_sync_offset_ms) { |
| RTC_DCHECK_GT(width, 0); |
| RTC_DCHECK_GT(height, 0); |
| uint64_t now = clock_->TimeInMilliseconds(); |
| @@ -232,6 +238,9 @@ void ReceiveStatisticsProxy::OnRenderedFrame(int width, int height) { |
| render_height_counter_.Add(height); |
| render_fps_tracker_.AddSamples(1); |
| render_pixel_tracker_.AddSamples(sqrt(width * height)); |
| + |
| + if (stream_sync_offset_ms != -1) |
| + render_sync_offset_counter_.Add(stream_sync_offset_ms); |
|
pbos-webrtc
2016/03/04 14:34:27
Should we expose this in getStats as well?
åsapersson
2016/03/09 15:44:35
Done.
|
| } |
| void ReceiveStatisticsProxy::OnReceiveRatesUpdated(uint32_t bitRate, |