Index: webrtc/video/receive_statistics_proxy.cc |
diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc |
index 590bd03b78d0e8d82b8614ddd518c9adbc2c7886..ce70096949c2115d0cd8f7cef8a682081381c856 100644 |
--- a/webrtc/video/receive_statistics_proxy.cc |
+++ b/webrtc/video/receive_statistics_proxy.cc |
@@ -73,6 +73,8 @@ ReceiveStatisticsProxy::ReceiveStatisticsProxy( |
renders_fps_estimator_(1000, 1000), |
render_fps_tracker_(100, 10u), |
render_pixel_tracker_(100, 10u), |
+ e2e_delay_max_ms_video_(-1), |
+ e2e_delay_max_ms_screenshare_(-1), |
sprang_webrtc
2017/03/28 11:14:23
Maybe we should report all stats and reset state i
ilnik
2017/03/28 14:47:02
Problem here is that due to packet loss/reordering
|
freq_offset_counter_(clock, nullptr, kFreqOffsetProcessIntervalMs), |
first_report_block_time_ms_(-1), |
avg_rtt_ms_(0), |
@@ -169,9 +171,30 @@ void ReceiveStatisticsProxy::UpdateHistograms() { |
if (delay_ms != -1) |
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.OnewayDelayInMs", delay_ms); |
- int e2e_delay_ms = e2e_delay_counter_.Avg(kMinRequiredSamples); |
- if (e2e_delay_ms != -1) |
- RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.EndToEndDelayInMs", e2e_delay_ms); |
+ int e2e_delay_ms_video = e2e_delay_counter_video_.Avg(kMinRequiredSamples); |
+ if (e2e_delay_ms_video != -1) { |
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.EndToEndDelayInMs", |
+ e2e_delay_ms_video); |
+ } |
+ |
+ int e2e_delay_ms_screenshare = |
+ e2e_delay_counter_screenshare_.Avg(kMinRequiredSamples); |
+ if (e2e_delay_ms_screenshare != -1) { |
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.EndToEndDelayInMs", |
+ e2e_delay_ms_screenshare); |
+ } |
+ |
+ int e2e_delay_max_ms_video = e2e_delay_max_ms_video_; |
+ if (e2e_delay_max_ms_video != -1) { |
+ RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.EndToEndDelayMaxInMs", |
+ e2e_delay_max_ms_video); |
+ } |
+ |
+ int e2e_delay_max_ms_screenshare = e2e_delay_max_ms_screenshare_; |
+ if (e2e_delay_max_ms_screenshare != -1) { |
+ RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.Screenshare.EndToEndDelayMaxInMs", |
+ e2e_delay_max_ms_screenshare); |
+ } |
StreamDataCounters rtp = stats_.rtp_stats; |
StreamDataCounters rtx; |
@@ -469,8 +492,16 @@ void ReceiveStatisticsProxy::OnRenderedFrame(const VideoFrame& frame) { |
if (frame.ntp_time_ms() > 0) { |
int64_t delay_ms = clock_->CurrentNtpInMilliseconds() - frame.ntp_time_ms(); |
- if (delay_ms >= 0) |
- e2e_delay_counter_.Add(delay_ms); |
+ if (delay_ms >= 0) { |
+ if (frame.content_type() == kVideoContent_Screenshare) { |
+ e2e_delay_max_ms_screenshare_ = |
+ std::max(delay_ms, e2e_delay_max_ms_screenshare_); |
+ e2e_delay_counter_screenshare_.Add(delay_ms); |
+ } else { |
+ e2e_delay_max_ms_video_ = std::max(delay_ms, e2e_delay_max_ms_video_); |
+ e2e_delay_counter_video_.Add(delay_ms); |
+ } |
+ } |
} |
} |