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

Unified Diff: webrtc/api/rtcstatscollector.cc

Issue 2597423003: RTCIceCandidatePairStats.[state/priority] added, ConnectionInfo updated. (Closed)
Patch Set: Rebase with master Created 3 years, 12 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/api/rtcstats_integrationtest.cc ('k') | webrtc/api/rtcstatscollector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/rtcstatscollector.cc
diff --git a/webrtc/api/rtcstatscollector.cc b/webrtc/api/rtcstatscollector.cc
index 85113e69a2e925271ad1c1150a3e02ff62ed9880..4e5e8d9739562bd862052265d85642ef685bac74 100644
--- a/webrtc/api/rtcstatscollector.cc
+++ b/webrtc/api/rtcstatscollector.cc
@@ -114,6 +114,23 @@ const char* DataStateToRTCDataChannelState(
}
}
+const char* IceCandidatePairStateToRTCStatsIceCandidatePairState(
+ cricket::IceCandidatePairState state) {
+ switch (state) {
+ case cricket::IceCandidatePairState::WAITING:
+ return RTCStatsIceCandidatePairState::kWaiting;
+ case cricket::IceCandidatePairState::IN_PROGRESS:
+ return RTCStatsIceCandidatePairState::kInProgress;
+ case cricket::IceCandidatePairState::SUCCEEDED:
+ return RTCStatsIceCandidatePairState::kSucceeded;
+ case cricket::IceCandidatePairState::FAILED:
+ return RTCStatsIceCandidatePairState::kFailed;
+ default:
+ RTC_NOTREACHED();
+ return nullptr;
+ }
+}
+
std::unique_ptr<RTCCodecStats> CodecStatsFromRtpCodecParameters(
uint64_t timestamp_us, bool inbound, bool audio,
const RtpCodecParameters& codec_params) {
@@ -646,6 +663,9 @@ void RTCStatsCollector::ProduceIceCandidateAndPairStats_n(
timestamp_us, info.local_candidate, true, report);
candidate_pair_stats->remote_candidate_id = ProduceIceCandidateStats(
timestamp_us, info.remote_candidate, false, report);
+ candidate_pair_stats->state =
+ IceCandidatePairStateToRTCStatsIceCandidatePairState(info.state);
+ candidate_pair_stats->priority = info.priority;
// TODO(hbos): This writable is different than the spec. It goes to
// false after a certain amount of time without a response passes.
// crbug.com/633550
« no previous file with comments | « webrtc/api/rtcstats_integrationtest.cc ('k') | webrtc/api/rtcstatscollector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698