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