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

Unified Diff: webrtc/pc/rtcstatscollector.cc

Issue 2719523002: RTCIceCandidatePairStats.[total/current]RoundTripTime collected. (Closed)
Patch Set: EXPECT_EQ(expected, actual) Created 3 years, 10 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/pc/rtcstats_integrationtest.cc ('k') | webrtc/pc/rtcstatscollector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/rtcstatscollector.cc
diff --git a/webrtc/pc/rtcstatscollector.cc b/webrtc/pc/rtcstatscollector.cc
index 81443bb82c6d97adfeb9ea4101a488e1ce7827ae..abb4ab94c75d446140e7ddcbebd2e6d7904465fd 100644
--- a/webrtc/pc/rtcstatscollector.cc
+++ b/webrtc/pc/rtcstatscollector.cc
@@ -875,11 +875,14 @@ void RTCStatsCollector::ProduceIceCandidateAndPairStats_n(
static_cast<uint64_t>(info.sent_total_bytes);
candidate_pair_stats->bytes_received =
static_cast<uint64_t>(info.recv_total_bytes);
- // TODO(hbos): The |info.rtt| measurement is smoothed. It shouldn't be
- // smoothed according to the spec. crbug.com/633550. See
- // https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-currentrtt
- candidate_pair_stats->current_round_trip_time =
- static_cast<double>(info.rtt) / rtc::kNumMillisecsPerSec;
+ candidate_pair_stats->total_round_trip_time =
+ static_cast<double>(info.total_round_trip_time_ms) /
+ rtc::kNumMillisecsPerSec;
+ if (info.current_round_trip_time_ms) {
+ candidate_pair_stats->current_round_trip_time =
+ static_cast<double>(*info.current_round_trip_time_ms) /
+ rtc::kNumMillisecsPerSec;
+ }
if (info.best_connection && video_media_info &&
!video_media_info->bw_estimations.empty()) {
// The bandwidth estimations we have are for the selected candidate
« no previous file with comments | « webrtc/pc/rtcstats_integrationtest.cc ('k') | webrtc/pc/rtcstatscollector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698