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

Unified Diff: webrtc/pc/rtcstatscollector.cc

Issue 2719523002: RTCIceCandidatePairStats.[total/current]RoundTripTime collected. (Closed)
Patch Set: 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
Index: webrtc/pc/rtcstatscollector.cc
diff --git a/webrtc/pc/rtcstatscollector.cc b/webrtc/pc/rtcstatscollector.cc
index 99d7bc1c90b300ab8b34f8f00c36fe79dd942a78..bcee357066d260d239e8618f466627e97c4b2b4b 100644
--- a/webrtc/pc/rtcstatscollector.cc
+++ b/webrtc/pc/rtcstatscollector.cc
@@ -874,11 +874,16 @@ 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;
+ if (info.total_round_trip_time_ms) {
+ 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

Powered by Google App Engine
This is Rietveld 408576698