hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #include "api/stats/rtcstats_objects.h" |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 12 | |
| 13 | namespace webrtc { |
| 14 | |
agrieve | 26622d3 | 2017-08-08 10:48:15 -0700 | [diff] [blame] | 15 | const char* const RTCDataChannelState::kConnecting = "connecting"; |
| 16 | const char* const RTCDataChannelState::kOpen = "open"; |
| 17 | const char* const RTCDataChannelState::kClosing = "closing"; |
| 18 | const char* const RTCDataChannelState::kClosed = "closed"; |
hbos | cc555c5 | 2016-10-18 12:48:31 -0700 | [diff] [blame] | 19 | |
agrieve | 26622d3 | 2017-08-08 10:48:15 -0700 | [diff] [blame] | 20 | const char* const RTCStatsIceCandidatePairState::kFrozen = "frozen"; |
| 21 | const char* const RTCStatsIceCandidatePairState::kWaiting = "waiting"; |
| 22 | const char* const RTCStatsIceCandidatePairState::kInProgress = "in-progress"; |
| 23 | const char* const RTCStatsIceCandidatePairState::kFailed = "failed"; |
| 24 | const char* const RTCStatsIceCandidatePairState::kSucceeded = "succeeded"; |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 25 | |
| 26 | // Strings defined in https://tools.ietf.org/html/rfc5245. |
agrieve | 26622d3 | 2017-08-08 10:48:15 -0700 | [diff] [blame] | 27 | const char* const RTCIceCandidateType::kHost = "host"; |
| 28 | const char* const RTCIceCandidateType::kSrflx = "srflx"; |
| 29 | const char* const RTCIceCandidateType::kPrflx = "prflx"; |
| 30 | const char* const RTCIceCandidateType::kRelay = "relay"; |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 31 | |
agrieve | 26622d3 | 2017-08-08 10:48:15 -0700 | [diff] [blame] | 32 | const char* const RTCDtlsTransportState::kNew = "new"; |
| 33 | const char* const RTCDtlsTransportState::kConnecting = "connecting"; |
| 34 | const char* const RTCDtlsTransportState::kConnected = "connected"; |
| 35 | const char* const RTCDtlsTransportState::kClosed = "closed"; |
| 36 | const char* const RTCDtlsTransportState::kFailed = "failed"; |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 37 | |
agrieve | 26622d3 | 2017-08-08 10:48:15 -0700 | [diff] [blame] | 38 | const char* const RTCMediaStreamTrackKind::kAudio = "audio"; |
| 39 | const char* const RTCMediaStreamTrackKind::kVideo = "video"; |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 40 | |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 41 | // https://w3c.github.io/webrtc-stats/#dom-rtcnetworktype |
| 42 | const char* const RTCNetworkType::kBluetooth = "bluetooth"; |
| 43 | const char* const RTCNetworkType::kCellular = "cellular"; |
| 44 | const char* const RTCNetworkType::kEthernet = "ethernet"; |
| 45 | const char* const RTCNetworkType::kWifi = "wifi"; |
| 46 | const char* const RTCNetworkType::kWimax = "wimax"; |
| 47 | const char* const RTCNetworkType::kVpn = "vpn"; |
| 48 | const char* const RTCNetworkType::kUnknown = "unknown"; |
| 49 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 50 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 51 | WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate", |
| 52 | &fingerprint, |
| 53 | &fingerprint_algorithm, |
| 54 | &base64_certificate, |
| 55 | &issuer_certificate_id); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 56 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 57 | |
| 58 | RTCCertificateStats::RTCCertificateStats( |
| 59 | const std::string& id, int64_t timestamp_us) |
| 60 | : RTCCertificateStats(std::string(id), timestamp_us) { |
| 61 | } |
| 62 | |
| 63 | RTCCertificateStats::RTCCertificateStats( |
| 64 | std::string&& id, int64_t timestamp_us) |
| 65 | : RTCStats(std::move(id), timestamp_us), |
| 66 | fingerprint("fingerprint"), |
| 67 | fingerprint_algorithm("fingerprintAlgorithm"), |
| 68 | base64_certificate("base64Certificate"), |
| 69 | issuer_certificate_id("issuerCertificateId") { |
| 70 | } |
| 71 | |
| 72 | RTCCertificateStats::RTCCertificateStats( |
| 73 | const RTCCertificateStats& other) |
| 74 | : RTCStats(other.id(), other.timestamp_us()), |
| 75 | fingerprint(other.fingerprint), |
| 76 | fingerprint_algorithm(other.fingerprint_algorithm), |
| 77 | base64_certificate(other.base64_certificate), |
| 78 | issuer_certificate_id(other.issuer_certificate_id) { |
| 79 | } |
| 80 | |
| 81 | RTCCertificateStats::~RTCCertificateStats() { |
| 82 | } |
| 83 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 84 | // clang-format off |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 85 | WEBRTC_RTCSTATS_IMPL(RTCCodecStats, RTCStats, "codec", |
| 86 | &payload_type, |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 87 | &mime_type, |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 88 | &clock_rate, |
| 89 | &channels, |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 90 | &sdp_fmtp_line, |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 91 | &implementation); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 92 | // clang-format on |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 93 | |
| 94 | RTCCodecStats::RTCCodecStats( |
| 95 | const std::string& id, int64_t timestamp_us) |
| 96 | : RTCCodecStats(std::string(id), timestamp_us) { |
| 97 | } |
| 98 | |
| 99 | RTCCodecStats::RTCCodecStats( |
| 100 | std::string&& id, int64_t timestamp_us) |
| 101 | : RTCStats(std::move(id), timestamp_us), |
| 102 | payload_type("payloadType"), |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 103 | mime_type("mimeType"), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 104 | clock_rate("clockRate"), |
| 105 | channels("channels"), |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 106 | sdp_fmtp_line("sdpFmtpLine"), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 107 | implementation("implementation") { |
| 108 | } |
| 109 | |
| 110 | RTCCodecStats::RTCCodecStats( |
| 111 | const RTCCodecStats& other) |
| 112 | : RTCStats(other.id(), other.timestamp_us()), |
| 113 | payload_type(other.payload_type), |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 114 | mime_type(other.mime_type), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 115 | clock_rate(other.clock_rate), |
| 116 | channels(other.channels), |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 117 | sdp_fmtp_line(other.sdp_fmtp_line), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 118 | implementation(other.implementation) { |
| 119 | } |
| 120 | |
| 121 | RTCCodecStats::~RTCCodecStats() { |
| 122 | } |
| 123 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 124 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 125 | WEBRTC_RTCSTATS_IMPL(RTCDataChannelStats, RTCStats, "data-channel", |
| 126 | &label, |
| 127 | &protocol, |
| 128 | &datachannelid, |
| 129 | &state, |
| 130 | &messages_sent, |
| 131 | &bytes_sent, |
| 132 | &messages_received, |
| 133 | &bytes_received); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 134 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 135 | |
| 136 | RTCDataChannelStats::RTCDataChannelStats( |
| 137 | const std::string& id, int64_t timestamp_us) |
| 138 | : RTCDataChannelStats(std::string(id), timestamp_us) { |
| 139 | } |
| 140 | |
| 141 | RTCDataChannelStats::RTCDataChannelStats( |
| 142 | std::string&& id, int64_t timestamp_us) |
| 143 | : RTCStats(std::move(id), timestamp_us), |
| 144 | label("label"), |
| 145 | protocol("protocol"), |
| 146 | datachannelid("datachannelid"), |
| 147 | state("state"), |
| 148 | messages_sent("messagesSent"), |
| 149 | bytes_sent("bytesSent"), |
| 150 | messages_received("messagesReceived"), |
| 151 | bytes_received("bytesReceived") { |
| 152 | } |
| 153 | |
| 154 | RTCDataChannelStats::RTCDataChannelStats( |
| 155 | const RTCDataChannelStats& other) |
| 156 | : RTCStats(other.id(), other.timestamp_us()), |
| 157 | label(other.label), |
| 158 | protocol(other.protocol), |
| 159 | datachannelid(other.datachannelid), |
| 160 | state(other.state), |
| 161 | messages_sent(other.messages_sent), |
| 162 | bytes_sent(other.bytes_sent), |
| 163 | messages_received(other.messages_received), |
| 164 | bytes_received(other.bytes_received) { |
| 165 | } |
| 166 | |
| 167 | RTCDataChannelStats::~RTCDataChannelStats() { |
| 168 | } |
| 169 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 170 | // clang-format off |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 171 | WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair", |
| 172 | &transport_id, |
| 173 | &local_candidate_id, |
| 174 | &remote_candidate_id, |
| 175 | &state, |
| 176 | &priority, |
| 177 | &nominated, |
| 178 | &writable, |
| 179 | &readable, |
| 180 | &bytes_sent, |
| 181 | &bytes_received, |
hbos | 3168c7a | 2016-12-15 06:17:08 -0800 | [diff] [blame] | 182 | &total_round_trip_time, |
| 183 | ¤t_round_trip_time, |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 184 | &available_outgoing_bitrate, |
| 185 | &available_incoming_bitrate, |
| 186 | &requests_received, |
| 187 | &requests_sent, |
| 188 | &responses_received, |
| 189 | &responses_sent, |
| 190 | &retransmissions_received, |
| 191 | &retransmissions_sent, |
| 192 | &consent_requests_received, |
| 193 | &consent_requests_sent, |
| 194 | &consent_responses_received, |
| 195 | &consent_responses_sent); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 196 | // clang-format on |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 197 | |
| 198 | RTCIceCandidatePairStats::RTCIceCandidatePairStats( |
| 199 | const std::string& id, int64_t timestamp_us) |
| 200 | : RTCIceCandidatePairStats(std::string(id), timestamp_us) { |
| 201 | } |
| 202 | |
| 203 | RTCIceCandidatePairStats::RTCIceCandidatePairStats( |
| 204 | std::string&& id, int64_t timestamp_us) |
| 205 | : RTCStats(std::move(id), timestamp_us), |
| 206 | transport_id("transportId"), |
| 207 | local_candidate_id("localCandidateId"), |
| 208 | remote_candidate_id("remoteCandidateId"), |
| 209 | state("state"), |
| 210 | priority("priority"), |
| 211 | nominated("nominated"), |
| 212 | writable("writable"), |
| 213 | readable("readable"), |
| 214 | bytes_sent("bytesSent"), |
| 215 | bytes_received("bytesReceived"), |
hbos | 3168c7a | 2016-12-15 06:17:08 -0800 | [diff] [blame] | 216 | total_round_trip_time("totalRoundTripTime"), |
| 217 | current_round_trip_time("currentRoundTripTime"), |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 218 | available_outgoing_bitrate("availableOutgoingBitrate"), |
| 219 | available_incoming_bitrate("availableIncomingBitrate"), |
| 220 | requests_received("requestsReceived"), |
| 221 | requests_sent("requestsSent"), |
| 222 | responses_received("responsesReceived"), |
| 223 | responses_sent("responsesSent"), |
| 224 | retransmissions_received("retransmissionsReceived"), |
| 225 | retransmissions_sent("retransmissionsSent"), |
| 226 | consent_requests_received("consentRequestsReceived"), |
| 227 | consent_requests_sent("consentRequestsSent"), |
| 228 | consent_responses_received("consentResponsesReceived"), |
| 229 | consent_responses_sent("consentResponsesSent") { |
| 230 | } |
| 231 | |
| 232 | RTCIceCandidatePairStats::RTCIceCandidatePairStats( |
| 233 | const RTCIceCandidatePairStats& other) |
| 234 | : RTCStats(other.id(), other.timestamp_us()), |
| 235 | transport_id(other.transport_id), |
| 236 | local_candidate_id(other.local_candidate_id), |
| 237 | remote_candidate_id(other.remote_candidate_id), |
| 238 | state(other.state), |
| 239 | priority(other.priority), |
| 240 | nominated(other.nominated), |
| 241 | writable(other.writable), |
| 242 | readable(other.readable), |
| 243 | bytes_sent(other.bytes_sent), |
| 244 | bytes_received(other.bytes_received), |
hbos | 3168c7a | 2016-12-15 06:17:08 -0800 | [diff] [blame] | 245 | total_round_trip_time(other.total_round_trip_time), |
| 246 | current_round_trip_time(other.current_round_trip_time), |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 247 | available_outgoing_bitrate(other.available_outgoing_bitrate), |
| 248 | available_incoming_bitrate(other.available_incoming_bitrate), |
| 249 | requests_received(other.requests_received), |
| 250 | requests_sent(other.requests_sent), |
| 251 | responses_received(other.responses_received), |
| 252 | responses_sent(other.responses_sent), |
| 253 | retransmissions_received(other.retransmissions_received), |
| 254 | retransmissions_sent(other.retransmissions_sent), |
| 255 | consent_requests_received(other.consent_requests_received), |
| 256 | consent_requests_sent(other.consent_requests_sent), |
| 257 | consent_responses_received(other.consent_responses_received), |
| 258 | consent_responses_sent(other.consent_responses_sent) { |
| 259 | } |
| 260 | |
| 261 | RTCIceCandidatePairStats::~RTCIceCandidatePairStats() { |
| 262 | } |
| 263 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 264 | // clang-format off |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 265 | WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "ice-candidate", |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 266 | &transport_id, |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 267 | &is_remote, |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 268 | &network_type, |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 269 | &ip, |
| 270 | &port, |
| 271 | &protocol, |
| 272 | &candidate_type, |
| 273 | &priority, |
hbos | d17a5a7 | 2017-01-02 08:09:59 -0800 | [diff] [blame] | 274 | &url, |
| 275 | &deleted); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 276 | // clang-format on |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 277 | |
| 278 | RTCIceCandidateStats::RTCIceCandidateStats( |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 279 | const std::string& id, int64_t timestamp_us, bool is_remote) |
| 280 | : RTCIceCandidateStats(std::string(id), timestamp_us, is_remote) { |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 281 | } |
| 282 | |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 283 | RTCIceCandidateStats::RTCIceCandidateStats(std::string&& id, |
| 284 | int64_t timestamp_us, |
| 285 | bool is_remote) |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 286 | : RTCStats(std::move(id), timestamp_us), |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 287 | transport_id("transportId"), |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 288 | is_remote("isRemote", is_remote), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 289 | network_type("networkType"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 290 | ip("ip"), |
| 291 | port("port"), |
| 292 | protocol("protocol"), |
| 293 | candidate_type("candidateType"), |
| 294 | priority("priority"), |
hbos | d17a5a7 | 2017-01-02 08:09:59 -0800 | [diff] [blame] | 295 | url("url"), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 296 | deleted("deleted", false) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 297 | |
| 298 | RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other) |
| 299 | : RTCStats(other.id(), other.timestamp_us()), |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 300 | transport_id(other.transport_id), |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 301 | is_remote(other.is_remote), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 302 | network_type(other.network_type), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 303 | ip(other.ip), |
| 304 | port(other.port), |
| 305 | protocol(other.protocol), |
| 306 | candidate_type(other.candidate_type), |
| 307 | priority(other.priority), |
hbos | d17a5a7 | 2017-01-02 08:09:59 -0800 | [diff] [blame] | 308 | url(other.url), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 309 | deleted(other.deleted) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 310 | |
| 311 | RTCIceCandidateStats::~RTCIceCandidateStats() { |
| 312 | } |
| 313 | |
| 314 | const char RTCLocalIceCandidateStats::kType[] = "local-candidate"; |
| 315 | |
| 316 | RTCLocalIceCandidateStats::RTCLocalIceCandidateStats( |
| 317 | const std::string& id, int64_t timestamp_us) |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 318 | : RTCIceCandidateStats(id, timestamp_us, false) { |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 319 | } |
| 320 | |
| 321 | RTCLocalIceCandidateStats::RTCLocalIceCandidateStats( |
| 322 | std::string&& id, int64_t timestamp_us) |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 323 | : RTCIceCandidateStats(std::move(id), timestamp_us, false) { |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 324 | } |
| 325 | |
| 326 | const char* RTCLocalIceCandidateStats::type() const { |
| 327 | return kType; |
| 328 | } |
| 329 | |
| 330 | const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate"; |
| 331 | |
| 332 | RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats( |
| 333 | const std::string& id, int64_t timestamp_us) |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 334 | : RTCIceCandidateStats(id, timestamp_us, true) { |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 335 | } |
| 336 | |
| 337 | RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats( |
| 338 | std::string&& id, int64_t timestamp_us) |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 339 | : RTCIceCandidateStats(std::move(id), timestamp_us, true) { |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 340 | } |
| 341 | |
| 342 | const char* RTCRemoteIceCandidateStats::type() const { |
| 343 | return kType; |
| 344 | } |
| 345 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 346 | // clang-format off |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 347 | WEBRTC_RTCSTATS_IMPL(RTCMediaStreamStats, RTCStats, "stream", |
| 348 | &stream_identifier, |
| 349 | &track_ids); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 350 | // clang-format on |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 351 | |
| 352 | RTCMediaStreamStats::RTCMediaStreamStats( |
| 353 | const std::string& id, int64_t timestamp_us) |
| 354 | : RTCMediaStreamStats(std::string(id), timestamp_us) { |
| 355 | } |
| 356 | |
| 357 | RTCMediaStreamStats::RTCMediaStreamStats( |
| 358 | std::string&& id, int64_t timestamp_us) |
| 359 | : RTCStats(std::move(id), timestamp_us), |
| 360 | stream_identifier("streamIdentifier"), |
| 361 | track_ids("trackIds") { |
| 362 | } |
| 363 | |
| 364 | RTCMediaStreamStats::RTCMediaStreamStats( |
| 365 | const RTCMediaStreamStats& other) |
| 366 | : RTCStats(other.id(), other.timestamp_us()), |
| 367 | stream_identifier(other.stream_identifier), |
| 368 | track_ids(other.track_ids) { |
| 369 | } |
| 370 | |
| 371 | RTCMediaStreamStats::~RTCMediaStreamStats() { |
| 372 | } |
| 373 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 374 | // clang-format off |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 375 | WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track", |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 376 | &track_identifier, |
| 377 | &remote_source, |
| 378 | &ended, |
| 379 | &detached, |
| 380 | &kind, |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 381 | &jitter_buffer_delay, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 382 | &frame_width, |
| 383 | &frame_height, |
| 384 | &frames_per_second, |
| 385 | &frames_sent, |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 386 | &huge_frames_sent, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 387 | &frames_received, |
| 388 | &frames_decoded, |
| 389 | &frames_dropped, |
| 390 | &frames_corrupted, |
| 391 | &partial_frames_lost, |
| 392 | &full_frames_lost, |
| 393 | &audio_level, |
| 394 | &total_audio_energy, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 395 | &echo_return_loss, |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 396 | &echo_return_loss_enhancement, |
| 397 | &total_samples_received, |
| 398 | &total_samples_duration, |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 399 | &concealed_samples, |
| 400 | &concealment_events); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 401 | // clang-format on |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 402 | |
| 403 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 404 | const std::string& id, int64_t timestamp_us, const char* kind) |
| 405 | : RTCMediaStreamTrackStats(std::string(id), timestamp_us, kind) { |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 406 | } |
| 407 | |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 408 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(std::string&& id, |
| 409 | int64_t timestamp_us, |
| 410 | const char* kind) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 411 | : RTCStats(std::move(id), timestamp_us), |
| 412 | track_identifier("trackIdentifier"), |
| 413 | remote_source("remoteSource"), |
| 414 | ended("ended"), |
| 415 | detached("detached"), |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 416 | kind("kind", kind), |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 417 | jitter_buffer_delay("jitterBufferDelay"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 418 | frame_width("frameWidth"), |
| 419 | frame_height("frameHeight"), |
| 420 | frames_per_second("framesPerSecond"), |
| 421 | frames_sent("framesSent"), |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 422 | huge_frames_sent("hugeFramesSent"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 423 | frames_received("framesReceived"), |
| 424 | frames_decoded("framesDecoded"), |
| 425 | frames_dropped("framesDropped"), |
| 426 | frames_corrupted("framesCorrupted"), |
| 427 | partial_frames_lost("partialFramesLost"), |
| 428 | full_frames_lost("fullFramesLost"), |
| 429 | audio_level("audioLevel"), |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 430 | total_audio_energy("totalAudioEnergy"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 431 | echo_return_loss("echoReturnLoss"), |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 432 | echo_return_loss_enhancement("echoReturnLossEnhancement"), |
| 433 | total_samples_received("totalSamplesReceived"), |
| 434 | total_samples_duration("totalSamplesDuration"), |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 435 | concealed_samples("concealedSamples"), |
| 436 | concealment_events("concealmentEvents") { |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 437 | RTC_DCHECK(kind == RTCMediaStreamTrackKind::kAudio || |
| 438 | kind == RTCMediaStreamTrackKind::kVideo); |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 439 | } |
| 440 | |
| 441 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( |
| 442 | const RTCMediaStreamTrackStats& other) |
| 443 | : RTCStats(other.id(), other.timestamp_us()), |
| 444 | track_identifier(other.track_identifier), |
| 445 | remote_source(other.remote_source), |
| 446 | ended(other.ended), |
| 447 | detached(other.detached), |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 448 | kind(other.kind), |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 449 | jitter_buffer_delay(other.jitter_buffer_delay), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 450 | frame_width(other.frame_width), |
| 451 | frame_height(other.frame_height), |
| 452 | frames_per_second(other.frames_per_second), |
| 453 | frames_sent(other.frames_sent), |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 454 | huge_frames_sent(other.huge_frames_sent), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 455 | frames_received(other.frames_received), |
| 456 | frames_decoded(other.frames_decoded), |
| 457 | frames_dropped(other.frames_dropped), |
| 458 | frames_corrupted(other.frames_corrupted), |
| 459 | partial_frames_lost(other.partial_frames_lost), |
| 460 | full_frames_lost(other.full_frames_lost), |
| 461 | audio_level(other.audio_level), |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 462 | total_audio_energy(other.total_audio_energy), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 463 | echo_return_loss(other.echo_return_loss), |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 464 | echo_return_loss_enhancement(other.echo_return_loss_enhancement), |
| 465 | total_samples_received(other.total_samples_received), |
| 466 | total_samples_duration(other.total_samples_duration), |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 467 | concealed_samples(other.concealed_samples), |
| 468 | concealment_events(other.concealment_events) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 469 | |
| 470 | RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() { |
| 471 | } |
| 472 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 473 | // clang-format off |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 474 | WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection", |
| 475 | &data_channels_opened, |
| 476 | &data_channels_closed); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 477 | // clang-format on |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 478 | |
| 479 | RTCPeerConnectionStats::RTCPeerConnectionStats( |
hbos | 0e6758d | 2016-08-31 07:57:36 -0700 | [diff] [blame] | 480 | const std::string& id, int64_t timestamp_us) |
| 481 | : RTCPeerConnectionStats(std::string(id), timestamp_us) { |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 482 | } |
| 483 | |
| 484 | RTCPeerConnectionStats::RTCPeerConnectionStats( |
hbos | 0e6758d | 2016-08-31 07:57:36 -0700 | [diff] [blame] | 485 | std::string&& id, int64_t timestamp_us) |
| 486 | : RTCStats(std::move(id), timestamp_us), |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 487 | data_channels_opened("dataChannelsOpened"), |
| 488 | data_channels_closed("dataChannelsClosed") { |
| 489 | } |
| 490 | |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 491 | RTCPeerConnectionStats::RTCPeerConnectionStats( |
| 492 | const RTCPeerConnectionStats& other) |
| 493 | : RTCStats(other.id(), other.timestamp_us()), |
| 494 | data_channels_opened(other.data_channels_opened), |
| 495 | data_channels_closed(other.data_channels_closed) { |
| 496 | } |
| 497 | |
| 498 | RTCPeerConnectionStats::~RTCPeerConnectionStats() { |
| 499 | } |
| 500 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 501 | // clang-format off |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 502 | WEBRTC_RTCSTATS_IMPL(RTCRTPStreamStats, RTCStats, "rtp", |
| 503 | &ssrc, |
| 504 | &associate_stats_id, |
| 505 | &is_remote, |
| 506 | &media_type, |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 507 | &track_id, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 508 | &transport_id, |
| 509 | &codec_id, |
| 510 | &fir_count, |
| 511 | &pli_count, |
| 512 | &nack_count, |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 513 | &sli_count, |
| 514 | &qp_sum); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 515 | // clang-format on |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 516 | |
| 517 | RTCRTPStreamStats::RTCRTPStreamStats( |
| 518 | const std::string& id, int64_t timestamp_us) |
| 519 | : RTCRTPStreamStats(std::string(id), timestamp_us) { |
| 520 | } |
| 521 | |
| 522 | RTCRTPStreamStats::RTCRTPStreamStats( |
| 523 | std::string&& id, int64_t timestamp_us) |
| 524 | : RTCStats(std::move(id), timestamp_us), |
| 525 | ssrc("ssrc"), |
| 526 | associate_stats_id("associateStatsId"), |
| 527 | is_remote("isRemote", false), |
| 528 | media_type("mediaType"), |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 529 | track_id("trackId"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 530 | transport_id("transportId"), |
| 531 | codec_id("codecId"), |
| 532 | fir_count("firCount"), |
| 533 | pli_count("pliCount"), |
| 534 | nack_count("nackCount"), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 535 | sli_count("sliCount"), |
| 536 | qp_sum("qpSum") { |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 537 | } |
| 538 | |
| 539 | RTCRTPStreamStats::RTCRTPStreamStats( |
| 540 | const RTCRTPStreamStats& other) |
| 541 | : RTCStats(other.id(), other.timestamp_us()), |
| 542 | ssrc(other.ssrc), |
| 543 | associate_stats_id(other.associate_stats_id), |
| 544 | is_remote(other.is_remote), |
| 545 | media_type(other.media_type), |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 546 | track_id(other.track_id), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 547 | transport_id(other.transport_id), |
| 548 | codec_id(other.codec_id), |
| 549 | fir_count(other.fir_count), |
| 550 | pli_count(other.pli_count), |
| 551 | nack_count(other.nack_count), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 552 | sli_count(other.sli_count), |
| 553 | qp_sum(other.qp_sum) { |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 554 | } |
| 555 | |
| 556 | RTCRTPStreamStats::~RTCRTPStreamStats() { |
| 557 | } |
| 558 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 559 | // clang-format off |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 560 | WEBRTC_RTCSTATS_IMPL( |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 561 | RTCInboundRTPStreamStats, RTCRTPStreamStats, "inbound-rtp", |
| 562 | &packets_received, |
| 563 | &bytes_received, |
| 564 | &packets_lost, |
| 565 | &jitter, |
| 566 | &fraction_lost, |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 567 | &round_trip_time, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 568 | &packets_discarded, |
| 569 | &packets_repaired, |
| 570 | &burst_packets_lost, |
| 571 | &burst_packets_discarded, |
| 572 | &burst_loss_count, |
| 573 | &burst_discard_count, |
| 574 | &burst_loss_rate, |
| 575 | &burst_discard_rate, |
| 576 | &gap_loss_rate, |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 577 | &gap_discard_rate, |
| 578 | &frames_decoded); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 579 | // clang-format on |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 580 | |
| 581 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats( |
| 582 | const std::string& id, int64_t timestamp_us) |
| 583 | : RTCInboundRTPStreamStats(std::string(id), timestamp_us) { |
| 584 | } |
| 585 | |
| 586 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats( |
| 587 | std::string&& id, int64_t timestamp_us) |
| 588 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
| 589 | packets_received("packetsReceived"), |
| 590 | bytes_received("bytesReceived"), |
| 591 | packets_lost("packetsLost"), |
| 592 | jitter("jitter"), |
| 593 | fraction_lost("fractionLost"), |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 594 | round_trip_time("roundTripTime"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 595 | packets_discarded("packetsDiscarded"), |
| 596 | packets_repaired("packetsRepaired"), |
| 597 | burst_packets_lost("burstPacketsLost"), |
| 598 | burst_packets_discarded("burstPacketsDiscarded"), |
| 599 | burst_loss_count("burstLossCount"), |
| 600 | burst_discard_count("burstDiscardCount"), |
| 601 | burst_loss_rate("burstLossRate"), |
| 602 | burst_discard_rate("burstDiscardRate"), |
| 603 | gap_loss_rate("gapLossRate"), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 604 | gap_discard_rate("gapDiscardRate"), |
| 605 | frames_decoded("framesDecoded") { |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 606 | } |
| 607 | |
| 608 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats( |
| 609 | const RTCInboundRTPStreamStats& other) |
| 610 | : RTCRTPStreamStats(other), |
| 611 | packets_received(other.packets_received), |
| 612 | bytes_received(other.bytes_received), |
| 613 | packets_lost(other.packets_lost), |
| 614 | jitter(other.jitter), |
| 615 | fraction_lost(other.fraction_lost), |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 616 | round_trip_time(other.round_trip_time), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 617 | packets_discarded(other.packets_discarded), |
| 618 | packets_repaired(other.packets_repaired), |
| 619 | burst_packets_lost(other.burst_packets_lost), |
| 620 | burst_packets_discarded(other.burst_packets_discarded), |
| 621 | burst_loss_count(other.burst_loss_count), |
| 622 | burst_discard_count(other.burst_discard_count), |
| 623 | burst_loss_rate(other.burst_loss_rate), |
| 624 | burst_discard_rate(other.burst_discard_rate), |
| 625 | gap_loss_rate(other.gap_loss_rate), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 626 | gap_discard_rate(other.gap_discard_rate), |
| 627 | frames_decoded(other.frames_decoded) { |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 628 | } |
| 629 | |
| 630 | RTCInboundRTPStreamStats::~RTCInboundRTPStreamStats() { |
| 631 | } |
| 632 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 633 | // clang-format off |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 634 | WEBRTC_RTCSTATS_IMPL( |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 635 | RTCOutboundRTPStreamStats, RTCRTPStreamStats, "outbound-rtp", |
| 636 | &packets_sent, |
| 637 | &bytes_sent, |
| 638 | &target_bitrate, |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 639 | &frames_encoded); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 640 | // clang-format on |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 641 | |
| 642 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats( |
| 643 | const std::string& id, int64_t timestamp_us) |
| 644 | : RTCOutboundRTPStreamStats(std::string(id), timestamp_us) { |
| 645 | } |
| 646 | |
| 647 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats( |
| 648 | std::string&& id, int64_t timestamp_us) |
| 649 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
| 650 | packets_sent("packetsSent"), |
| 651 | bytes_sent("bytesSent"), |
| 652 | target_bitrate("targetBitrate"), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 653 | frames_encoded("framesEncoded") { |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 654 | } |
| 655 | |
| 656 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats( |
| 657 | const RTCOutboundRTPStreamStats& other) |
| 658 | : RTCRTPStreamStats(other), |
| 659 | packets_sent(other.packets_sent), |
| 660 | bytes_sent(other.bytes_sent), |
| 661 | target_bitrate(other.target_bitrate), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 662 | frames_encoded(other.frames_encoded) { |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 663 | } |
| 664 | |
| 665 | RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() { |
| 666 | } |
| 667 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 668 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 669 | WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport", |
| 670 | &bytes_sent, |
| 671 | &bytes_received, |
| 672 | &rtcp_transport_stats_id, |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 673 | &dtls_state, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 674 | &selected_candidate_pair_id, |
| 675 | &local_certificate_id, |
| 676 | &remote_certificate_id); |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 677 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 678 | |
| 679 | RTCTransportStats::RTCTransportStats( |
| 680 | const std::string& id, int64_t timestamp_us) |
| 681 | : RTCTransportStats(std::string(id), timestamp_us) { |
| 682 | } |
| 683 | |
| 684 | RTCTransportStats::RTCTransportStats( |
| 685 | std::string&& id, int64_t timestamp_us) |
| 686 | : RTCStats(std::move(id), timestamp_us), |
| 687 | bytes_sent("bytesSent"), |
| 688 | bytes_received("bytesReceived"), |
| 689 | rtcp_transport_stats_id("rtcpTransportStatsId"), |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 690 | dtls_state("dtlsState"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 691 | selected_candidate_pair_id("selectedCandidatePairId"), |
| 692 | local_certificate_id("localCertificateId"), |
| 693 | remote_certificate_id("remoteCertificateId") { |
| 694 | } |
| 695 | |
| 696 | RTCTransportStats::RTCTransportStats( |
| 697 | const RTCTransportStats& other) |
| 698 | : RTCStats(other.id(), other.timestamp_us()), |
| 699 | bytes_sent(other.bytes_sent), |
| 700 | bytes_received(other.bytes_received), |
| 701 | rtcp_transport_stats_id(other.rtcp_transport_stats_id), |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 702 | dtls_state(other.dtls_state), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 703 | selected_candidate_pair_id(other.selected_candidate_pair_id), |
| 704 | local_certificate_id(other.local_certificate_id), |
| 705 | remote_certificate_id(other.remote_certificate_id) { |
| 706 | } |
| 707 | |
| 708 | RTCTransportStats::~RTCTransportStats() { |
| 709 | } |
| 710 | |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 711 | } // namespace webrtc |