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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/rtcstatscollector_unittest.cc ('k') | webrtc/stats/rtcstats_objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ 11 #ifndef WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_
12 #define WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ 12 #define WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_
13 13
14 #include <string> 14 #include <string>
15 15
16 #include "webrtc/api/stats/rtcstats.h" 16 #include "webrtc/api/stats/rtcstats.h"
17 17
18 namespace webrtc { 18 namespace webrtc {
19 19
20 // https://w3c.github.io/webrtc-stats/#dom-rtcstatsicecandidatepairstate
21 struct RTCStatsIceCandidatePairState {
22 static const char* kFrozen;
23 static const char* kWaiting;
24 static const char* kInProgress;
25 static const char* kFailed;
26 static const char* kSucceeded;
27 static const char* kCancelled;
28 };
29
20 // https://www.w3.org/TR/webrtc/#rtcicecandidatetype-enum 30 // https://www.w3.org/TR/webrtc/#rtcicecandidatetype-enum
21 struct RTCIceCandidateType { 31 struct RTCIceCandidateType {
22 static const char* kHost; 32 static const char* kHost;
23 static const char* kSrflx; 33 static const char* kSrflx;
24 static const char* kPrflx; 34 static const char* kPrflx;
25 static const char* kRelay; 35 static const char* kRelay;
26 }; 36 };
27 37
38 class RTCIceCandidatePairStats : public RTCStats {
39 public:
40 WEBRTC_RTCSTATS_DECL();
41
42 RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us);
43 RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us);
44 RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other);
45 ~RTCIceCandidatePairStats() override;
46
47 RTCStatsMember<std::string> transport_id;
48 RTCStatsMember<std::string> local_candidate_id;
49 RTCStatsMember<std::string> remote_candidate_id;
50 // TODO(hbos): Support enum types?
51 // "RTCStatsMember<RTCStatsIceCandidatePairState>"?
52 RTCStatsMember<std::string> state;
53 RTCStatsMember<uint64_t> priority;
54 RTCStatsMember<bool> nominated;
55 RTCStatsMember<bool> writable;
56 RTCStatsMember<bool> readable;
57 RTCStatsMember<uint64_t> bytes_sent;
58 RTCStatsMember<uint64_t> bytes_received;
59 RTCStatsMember<double> total_rtt;
60 RTCStatsMember<double> current_rtt;
61 RTCStatsMember<double> available_outgoing_bitrate;
62 RTCStatsMember<double> available_incoming_bitrate;
63 RTCStatsMember<uint64_t> requests_received;
64 RTCStatsMember<uint64_t> requests_sent;
65 RTCStatsMember<uint64_t> responses_received;
66 RTCStatsMember<uint64_t> responses_sent;
67 RTCStatsMember<uint64_t> retransmissions_received;
68 RTCStatsMember<uint64_t> retransmissions_sent;
69 RTCStatsMember<uint64_t> consent_requests_received;
70 RTCStatsMember<uint64_t> consent_requests_sent;
71 RTCStatsMember<uint64_t> consent_responses_received;
72 RTCStatsMember<uint64_t> consent_responses_sent;
73 };
74
28 // https://w3c.github.io/webrtc-stats/#icecandidate-dict* 75 // https://w3c.github.io/webrtc-stats/#icecandidate-dict*
29 class RTCIceCandidateStats : public RTCStats { 76 class RTCIceCandidateStats : public RTCStats {
30 public: 77 public:
31 WEBRTC_RTCSTATS_DECL(); 78 WEBRTC_RTCSTATS_DECL();
32 79
33 RTCIceCandidateStats(const RTCIceCandidateStats& other); 80 RTCIceCandidateStats(const RTCIceCandidateStats& other);
34 ~RTCIceCandidateStats() override; 81 ~RTCIceCandidateStats() override;
35 82
36 RTCStatsMember<std::string> ip; 83 RTCStatsMember<std::string> ip;
37 RTCStatsMember<int32_t> port; 84 RTCStatsMember<int32_t> port;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 RTCPeerConnectionStats(const RTCPeerConnectionStats& other); 140 RTCPeerConnectionStats(const RTCPeerConnectionStats& other);
94 ~RTCPeerConnectionStats() override; 141 ~RTCPeerConnectionStats() override;
95 142
96 RTCStatsMember<uint32_t> data_channels_opened; 143 RTCStatsMember<uint32_t> data_channels_opened;
97 RTCStatsMember<uint32_t> data_channels_closed; 144 RTCStatsMember<uint32_t> data_channels_closed;
98 }; 145 };
99 146
100 } // namespace webrtc 147 } // namespace webrtc
101 148
102 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ 149 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_
OLDNEW
« 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