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