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

Unified Diff: webrtc/api/stats/rtcstats_objects.h

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/rtcstatscollector_unittest.cc ('k') | webrtc/stats/rtcstats_objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/stats/rtcstats_objects.h
diff --git a/webrtc/api/stats/rtcstats_objects.h b/webrtc/api/stats/rtcstats_objects.h
index e827d011ea9499b3eff8fead60d3c03d8de5d1f8..4738fe89a89793e7f3993c843693927fc05ad7ba 100644
--- a/webrtc/api/stats/rtcstats_objects.h
+++ b/webrtc/api/stats/rtcstats_objects.h
@@ -17,6 +17,16 @@
namespace webrtc {
+// https://w3c.github.io/webrtc-stats/#dom-rtcstatsicecandidatepairstate
+struct RTCStatsIceCandidatePairState {
+ static const char* kFrozen;
+ static const char* kWaiting;
+ static const char* kInProgress;
+ static const char* kFailed;
+ static const char* kSucceeded;
+ static const char* kCancelled;
+};
+
// https://www.w3.org/TR/webrtc/#rtcicecandidatetype-enum
struct RTCIceCandidateType {
static const char* kHost;
@@ -25,6 +35,43 @@ struct RTCIceCandidateType {
static const char* kRelay;
};
+class RTCIceCandidatePairStats : public RTCStats {
+ public:
+ WEBRTC_RTCSTATS_DECL();
+
+ RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us);
+ RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us);
+ RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other);
+ ~RTCIceCandidatePairStats() override;
+
+ RTCStatsMember<std::string> transport_id;
+ RTCStatsMember<std::string> local_candidate_id;
+ RTCStatsMember<std::string> remote_candidate_id;
+ // TODO(hbos): Support enum types?
+ // "RTCStatsMember<RTCStatsIceCandidatePairState>"?
+ RTCStatsMember<std::string> state;
+ RTCStatsMember<uint64_t> priority;
+ RTCStatsMember<bool> nominated;
+ RTCStatsMember<bool> writable;
+ RTCStatsMember<bool> readable;
+ RTCStatsMember<uint64_t> bytes_sent;
+ RTCStatsMember<uint64_t> bytes_received;
+ RTCStatsMember<double> total_rtt;
+ RTCStatsMember<double> current_rtt;
+ RTCStatsMember<double> available_outgoing_bitrate;
+ RTCStatsMember<double> available_incoming_bitrate;
+ RTCStatsMember<uint64_t> requests_received;
+ RTCStatsMember<uint64_t> requests_sent;
+ RTCStatsMember<uint64_t> responses_received;
+ RTCStatsMember<uint64_t> responses_sent;
+ RTCStatsMember<uint64_t> retransmissions_received;
+ RTCStatsMember<uint64_t> retransmissions_sent;
+ RTCStatsMember<uint64_t> consent_requests_received;
+ RTCStatsMember<uint64_t> consent_requests_sent;
+ RTCStatsMember<uint64_t> consent_responses_received;
+ RTCStatsMember<uint64_t> consent_responses_sent;
+};
+
// https://w3c.github.io/webrtc-stats/#icecandidate-dict*
class RTCIceCandidateStats : public RTCStats {
public:
« no previous file with comments | « webrtc/api/rtcstatscollector_unittest.cc ('k') | webrtc/stats/rtcstats_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698