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

Unified Diff: webrtc/video/receive_statistics_proxy.cc

Issue 1351403008: Add delay metric (includes network delay (rtt/2) + jitter delay + decode time + (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') | webrtc/video_engine/vie_channel.h » ('j') | 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..2a376c26c5d2612208ca43c3c95389ecbf245157 100644
--- a/webrtc/video/receive_statistics_proxy.cc
+++ b/webrtc/video/receive_statistics_proxy.cc
@@ -53,6 +53,10 @@ void ReceiveStatisticsProxy::UpdateHistograms() {
int decode_ms = decode_time_counter_.Avg(kMinRequiredDecodeSamples);
if (decode_ms != -1)
RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.DecodeTimeInMs", decode_ms);
+
+ int delay_ms = delay_counter_.Avg(kMinRequiredDecodeSamples);
+ if (delay_ms != -1)
+ RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.ReceiveSideDelayInMs", delay_ms);
}
VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const {
@@ -78,7 +82,8 @@ void ReceiveStatisticsProxy::OnDecoderTiming(int decode_ms,
int target_delay_ms,
int jitter_buffer_ms,
int min_playout_delay_ms,
- int render_delay_ms) {
+ int render_delay_ms,
+ int64_t rtt_ms) {
rtc::CritScope lock(&crit_);
stats_.decode_ms = decode_ms;
stats_.max_decode_ms = max_decode_ms;
@@ -88,6 +93,7 @@ void ReceiveStatisticsProxy::OnDecoderTiming(int decode_ms,
stats_.min_playout_delay_ms = min_playout_delay_ms;
stats_.render_delay_ms = render_delay_ms;
decode_time_counter_.Add(decode_ms);
+ delay_counter_.Add(target_delay_ms + rtt_ms / 2);
stefan-webrtc 2015/09/28 15:20:42 Why are we adding rtt/2? Should at least be explai
åsapersson 2015/10/05 13:26:00 Added comment and updated CL description.
}
void ReceiveStatisticsProxy::RtcpPacketTypesCounterUpdated(
« no previous file with comments | « webrtc/video/receive_statistics_proxy.h ('k') | webrtc/video_engine/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698