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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/stats/rtcstats_objects.h ('k') | no next file » | 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 #include "webrtc/api/stats/rtcstats_objects.h" 11 #include "webrtc/api/stats/rtcstats_objects.h"
12 12
13 namespace webrtc { 13 namespace webrtc {
14 14
15 const char* RTCStatsIceCandidatePairState::kFrozen = "frozen";
16 const char* RTCStatsIceCandidatePairState::kWaiting = "waiting";
17 const char* RTCStatsIceCandidatePairState::kInProgress = "inprogress";
18 const char* RTCStatsIceCandidatePairState::kFailed = "failed";
19 const char* RTCStatsIceCandidatePairState::kSucceeded = "succeeded";
20 const char* RTCStatsIceCandidatePairState::kCancelled = "cancelled";
21
22 // Strings defined in https://tools.ietf.org/html/rfc5245.
15 const char* RTCIceCandidateType::kHost = "host"; 23 const char* RTCIceCandidateType::kHost = "host";
16 const char* RTCIceCandidateType::kSrflx = "srflx"; 24 const char* RTCIceCandidateType::kSrflx = "srflx";
17 const char* RTCIceCandidateType::kPrflx = "prflx"; 25 const char* RTCIceCandidateType::kPrflx = "prflx";
18 const char* RTCIceCandidateType::kRelay = "relay"; 26 const char* RTCIceCandidateType::kRelay = "relay";
19 27
28 WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair",
29 &transport_id,
30 &local_candidate_id,
31 &remote_candidate_id,
32 &state,
33 &priority,
34 &nominated,
35 &writable,
36 &readable,
37 &bytes_sent,
38 &bytes_received,
39 &total_rtt,
40 &current_rtt,
41 &available_outgoing_bitrate,
42 &available_incoming_bitrate,
43 &requests_received,
44 &requests_sent,
45 &responses_received,
46 &responses_sent,
47 &retransmissions_received,
48 &retransmissions_sent,
49 &consent_requests_received,
50 &consent_requests_sent,
51 &consent_responses_received,
52 &consent_responses_sent);
53
54 RTCIceCandidatePairStats::RTCIceCandidatePairStats(
55 const std::string& id, int64_t timestamp_us)
56 : RTCIceCandidatePairStats(std::string(id), timestamp_us) {
57 }
58
59 RTCIceCandidatePairStats::RTCIceCandidatePairStats(
60 std::string&& id, int64_t timestamp_us)
61 : RTCStats(std::move(id), timestamp_us),
62 transport_id("transportId"),
63 local_candidate_id("localCandidateId"),
64 remote_candidate_id("remoteCandidateId"),
65 state("state"),
66 priority("priority"),
67 nominated("nominated"),
68 writable("writable"),
69 readable("readable"),
70 bytes_sent("bytesSent"),
71 bytes_received("bytesReceived"),
72 total_rtt("totalRtt"),
73 current_rtt("currentRtt"),
74 available_outgoing_bitrate("availableOutgoingBitrate"),
75 available_incoming_bitrate("availableIncomingBitrate"),
76 requests_received("requestsReceived"),
77 requests_sent("requestsSent"),
78 responses_received("responsesReceived"),
79 responses_sent("responsesSent"),
80 retransmissions_received("retransmissionsReceived"),
81 retransmissions_sent("retransmissionsSent"),
82 consent_requests_received("consentRequestsReceived"),
83 consent_requests_sent("consentRequestsSent"),
84 consent_responses_received("consentResponsesReceived"),
85 consent_responses_sent("consentResponsesSent") {
86 }
87
88 RTCIceCandidatePairStats::RTCIceCandidatePairStats(
89 const RTCIceCandidatePairStats& other)
90 : RTCStats(other.id(), other.timestamp_us()),
91 transport_id(other.transport_id),
92 local_candidate_id(other.local_candidate_id),
93 remote_candidate_id(other.remote_candidate_id),
94 state(other.state),
95 priority(other.priority),
96 nominated(other.nominated),
97 writable(other.writable),
98 readable(other.readable),
99 bytes_sent(other.bytes_sent),
100 bytes_received(other.bytes_received),
101 total_rtt(other.total_rtt),
102 current_rtt(other.current_rtt),
103 available_outgoing_bitrate(other.available_outgoing_bitrate),
104 available_incoming_bitrate(other.available_incoming_bitrate),
105 requests_received(other.requests_received),
106 requests_sent(other.requests_sent),
107 responses_received(other.responses_received),
108 responses_sent(other.responses_sent),
109 retransmissions_received(other.retransmissions_received),
110 retransmissions_sent(other.retransmissions_sent),
111 consent_requests_received(other.consent_requests_received),
112 consent_requests_sent(other.consent_requests_sent),
113 consent_responses_received(other.consent_responses_received),
114 consent_responses_sent(other.consent_responses_sent) {
115 }
116
117 RTCIceCandidatePairStats::~RTCIceCandidatePairStats() {
118 }
119
20 WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "ice-candidate", 120 WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "ice-candidate",
21 &ip, 121 &ip,
22 &port, 122 &port,
23 &protocol, 123 &protocol,
24 &candidate_type, 124 &candidate_type,
25 &priority, 125 &priority,
26 &url); 126 &url);
27 127
28 RTCIceCandidateStats::RTCIceCandidateStats( 128 RTCIceCandidateStats::RTCIceCandidateStats(
29 const std::string& id, int64_t timestamp_us) 129 const std::string& id, int64_t timestamp_us)
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 const RTCPeerConnectionStats& other) 238 const RTCPeerConnectionStats& other)
139 : RTCStats(other.id(), other.timestamp_us()), 239 : RTCStats(other.id(), other.timestamp_us()),
140 data_channels_opened(other.data_channels_opened), 240 data_channels_opened(other.data_channels_opened),
141 data_channels_closed(other.data_channels_closed) { 241 data_channels_closed(other.data_channels_closed) {
142 } 242 }
143 243
144 RTCPeerConnectionStats::~RTCPeerConnectionStats() { 244 RTCPeerConnectionStats::~RTCPeerConnectionStats() {
145 } 245 }
146 246
147 } // namespace webrtc 247 } // namespace webrtc
OLDNEW
« 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