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

Unified Diff: webrtc/stats/rtcstats_objects.cc

Issue 2390693003: RTCIceCandidatePairStats added. (Closed)
Patch Set: Addressed comments (added requests_sent/responses_sent) Created 4 years, 2 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/stats/rtcstats_objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/stats/rtcstats_objects.cc
diff --git a/webrtc/stats/rtcstats_objects.cc b/webrtc/stats/rtcstats_objects.cc
index 3c80404f9c6d7ed181efc8b9d78ca74363f43563..947b5647d7f46325748d1126623a3b38f9f1c06e 100644
--- a/webrtc/stats/rtcstats_objects.cc
+++ b/webrtc/stats/rtcstats_objects.cc
@@ -12,11 +12,111 @@
namespace webrtc {
+const char* RTCStatsIceCandidatePairState::kFrozen = "frozen";
+const char* RTCStatsIceCandidatePairState::kWaiting = "waiting";
+const char* RTCStatsIceCandidatePairState::kInProgress = "inprogress";
+const char* RTCStatsIceCandidatePairState::kFailed = "failed";
+const char* RTCStatsIceCandidatePairState::kSucceeded = "succeeded";
+const char* RTCStatsIceCandidatePairState::kCancelled = "cancelled";
+
+// Strings defined in https://tools.ietf.org/html/rfc5245.
const char* RTCIceCandidateType::kHost = "host";
const char* RTCIceCandidateType::kSrflx = "srflx";
const char* RTCIceCandidateType::kPrflx = "prflx";
const char* RTCIceCandidateType::kRelay = "relay";
+WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair",
+ &transport_id,
+ &local_candidate_id,
+ &remote_candidate_id,
+ &state,
+ &priority,
+ &nominated,
+ &writable,
+ &readable,
+ &bytes_sent,
+ &bytes_received,
+ &total_rtt,
+ &current_rtt,
+ &available_outgoing_bitrate,
+ &available_incoming_bitrate,
+ &requests_received,
+ &requests_sent,
+ &responses_received,
+ &responses_sent,
+ &retransmissions_received,
+ &retransmissions_sent,
+ &consent_requests_received,
+ &consent_requests_sent,
+ &consent_responses_received,
+ &consent_responses_sent);
+
+RTCIceCandidatePairStats::RTCIceCandidatePairStats(
+ const std::string& id, int64_t timestamp_us)
+ : RTCIceCandidatePairStats(std::string(id), timestamp_us) {
+}
+
+RTCIceCandidatePairStats::RTCIceCandidatePairStats(
+ std::string&& id, int64_t timestamp_us)
+ : RTCStats(std::move(id), timestamp_us),
+ transport_id("transportId"),
+ local_candidate_id("localCandidateId"),
+ remote_candidate_id("remoteCandidateId"),
+ state("state"),
+ priority("priority"),
+ nominated("nominated"),
+ writable("writable"),
+ readable("readable"),
+ bytes_sent("bytesSent"),
+ bytes_received("bytesReceived"),
+ total_rtt("totalRtt"),
+ current_rtt("currentRtt"),
+ available_outgoing_bitrate("availableOutgoingBitrate"),
+ available_incoming_bitrate("availableIncomingBitrate"),
+ requests_received("requestsReceived"),
+ requests_sent("requestsSent"),
+ responses_received("responsesReceived"),
+ responses_sent("responsesSent"),
+ retransmissions_received("retransmissionsReceived"),
+ retransmissions_sent("retransmissionsSent"),
+ consent_requests_received("consentRequestsReceived"),
+ consent_requests_sent("consentRequestsSent"),
+ consent_responses_received("consentResponsesReceived"),
+ consent_responses_sent("consentResponsesSent") {
+}
+
+RTCIceCandidatePairStats::RTCIceCandidatePairStats(
+ const RTCIceCandidatePairStats& other)
+ : RTCStats(other.id(), other.timestamp_us()),
+ transport_id(other.transport_id),
+ local_candidate_id(other.local_candidate_id),
+ remote_candidate_id(other.remote_candidate_id),
+ state(other.state),
+ priority(other.priority),
+ nominated(other.nominated),
+ writable(other.writable),
+ readable(other.readable),
+ bytes_sent(other.bytes_sent),
+ bytes_received(other.bytes_received),
+ total_rtt(other.total_rtt),
+ current_rtt(other.current_rtt),
+ available_outgoing_bitrate(other.available_outgoing_bitrate),
+ available_incoming_bitrate(other.available_incoming_bitrate),
+ requests_received(other.requests_received),
+ requests_sent(other.requests_sent),
+ responses_received(other.responses_received),
+ responses_sent(other.responses_sent),
+ retransmissions_received(other.retransmissions_received),
+ retransmissions_sent(other.retransmissions_sent),
+ consent_requests_received(other.consent_requests_received),
+ consent_requests_sent(other.consent_requests_sent),
+ consent_responses_received(other.consent_responses_received),
+ consent_responses_sent(other.consent_responses_sent) {
+}
+
+RTCIceCandidatePairStats::~RTCIceCandidatePairStats() {
+}
+
WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "ice-candidate",
&ip,
&port,
« no previous file with comments | « webrtc/api/stats/rtcstats_objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698