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 | |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 13 | #include <utility> |
| 14 | |
Jakob Ivarsson | 758d946 | 2019-03-19 15:38:49 +0100 | [diff] [blame] | 15 | #include "api/stats/rtc_stats.h" |
Jonas Olsson | a4d8737 | 2019-07-05 19:08:33 +0200 | [diff] [blame] | 16 | #include "rtc_base/checks.h" |
Jakob Ivarsson | 758d946 | 2019-03-19 15:38:49 +0100 | [diff] [blame] | 17 | |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 18 | namespace webrtc { |
| 19 | |
agrieve | 26622d3 | 2017-08-08 10:48:15 -0700 | [diff] [blame] | 20 | const char* const RTCDataChannelState::kConnecting = "connecting"; |
| 21 | const char* const RTCDataChannelState::kOpen = "open"; |
| 22 | const char* const RTCDataChannelState::kClosing = "closing"; |
| 23 | const char* const RTCDataChannelState::kClosed = "closed"; |
hbos | cc555c5 | 2016-10-18 12:48:31 -0700 | [diff] [blame] | 24 | |
agrieve | 26622d3 | 2017-08-08 10:48:15 -0700 | [diff] [blame] | 25 | const char* const RTCStatsIceCandidatePairState::kFrozen = "frozen"; |
| 26 | const char* const RTCStatsIceCandidatePairState::kWaiting = "waiting"; |
| 27 | const char* const RTCStatsIceCandidatePairState::kInProgress = "in-progress"; |
| 28 | const char* const RTCStatsIceCandidatePairState::kFailed = "failed"; |
| 29 | const char* const RTCStatsIceCandidatePairState::kSucceeded = "succeeded"; |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 30 | |
| 31 | // Strings defined in https://tools.ietf.org/html/rfc5245. |
agrieve | 26622d3 | 2017-08-08 10:48:15 -0700 | [diff] [blame] | 32 | const char* const RTCIceCandidateType::kHost = "host"; |
| 33 | const char* const RTCIceCandidateType::kSrflx = "srflx"; |
| 34 | const char* const RTCIceCandidateType::kPrflx = "prflx"; |
| 35 | const char* const RTCIceCandidateType::kRelay = "relay"; |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 36 | |
agrieve | 26622d3 | 2017-08-08 10:48:15 -0700 | [diff] [blame] | 37 | const char* const RTCDtlsTransportState::kNew = "new"; |
| 38 | const char* const RTCDtlsTransportState::kConnecting = "connecting"; |
| 39 | const char* const RTCDtlsTransportState::kConnected = "connected"; |
| 40 | const char* const RTCDtlsTransportState::kClosed = "closed"; |
| 41 | const char* const RTCDtlsTransportState::kFailed = "failed"; |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 42 | |
agrieve | 26622d3 | 2017-08-08 10:48:15 -0700 | [diff] [blame] | 43 | const char* const RTCMediaStreamTrackKind::kAudio = "audio"; |
| 44 | const char* const RTCMediaStreamTrackKind::kVideo = "video"; |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 45 | |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 46 | // https://w3c.github.io/webrtc-stats/#dom-rtcnetworktype |
| 47 | const char* const RTCNetworkType::kBluetooth = "bluetooth"; |
| 48 | const char* const RTCNetworkType::kCellular = "cellular"; |
| 49 | const char* const RTCNetworkType::kEthernet = "ethernet"; |
| 50 | const char* const RTCNetworkType::kWifi = "wifi"; |
| 51 | const char* const RTCNetworkType::kWimax = "wimax"; |
| 52 | const char* const RTCNetworkType::kVpn = "vpn"; |
| 53 | const char* const RTCNetworkType::kUnknown = "unknown"; |
| 54 | |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 55 | // https://w3c.github.io/webrtc-stats/#dom-rtcqualitylimitationreason |
| 56 | const char* const RTCQualityLimitationReason::kNone = "none"; |
| 57 | const char* const RTCQualityLimitationReason::kCpu = "cpu"; |
| 58 | const char* const RTCQualityLimitationReason::kBandwidth = "bandwidth"; |
| 59 | const char* const RTCQualityLimitationReason::kOther = "other"; |
| 60 | |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 61 | // https://webrtc.org/experiments/rtp-hdrext/video-content-type/ |
| 62 | const char* const RTCContentType::kUnspecified = "unspecified"; |
| 63 | const char* const RTCContentType::kScreenshare = "screenshare"; |
| 64 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 65 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 66 | WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate", |
| 67 | &fingerprint, |
| 68 | &fingerprint_algorithm, |
| 69 | &base64_certificate, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 70 | &issuer_certificate_id) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 71 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 72 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 73 | RTCCertificateStats::RTCCertificateStats(const std::string& id, |
| 74 | int64_t timestamp_us) |
| 75 | : RTCCertificateStats(std::string(id), timestamp_us) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 76 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 77 | RTCCertificateStats::RTCCertificateStats(std::string&& id, int64_t timestamp_us) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 78 | : RTCStats(std::move(id), timestamp_us), |
| 79 | fingerprint("fingerprint"), |
| 80 | fingerprint_algorithm("fingerprintAlgorithm"), |
| 81 | base64_certificate("base64Certificate"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 82 | issuer_certificate_id("issuerCertificateId") {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 83 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 84 | RTCCertificateStats::RTCCertificateStats(const RTCCertificateStats& other) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 85 | : RTCStats(other.id(), other.timestamp_us()), |
| 86 | fingerprint(other.fingerprint), |
| 87 | fingerprint_algorithm(other.fingerprint_algorithm), |
| 88 | base64_certificate(other.base64_certificate), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 89 | issuer_certificate_id(other.issuer_certificate_id) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 90 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 91 | RTCCertificateStats::~RTCCertificateStats() {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 92 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 93 | // clang-format off |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 94 | WEBRTC_RTCSTATS_IMPL(RTCCodecStats, RTCStats, "codec", |
| 95 | &payload_type, |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 96 | &mime_type, |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 97 | &clock_rate, |
| 98 | &channels, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 99 | &sdp_fmtp_line) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 100 | // clang-format on |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 101 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 102 | RTCCodecStats::RTCCodecStats(const std::string& id, int64_t timestamp_us) |
| 103 | : RTCCodecStats(std::string(id), timestamp_us) {} |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 104 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 105 | RTCCodecStats::RTCCodecStats(std::string&& id, int64_t timestamp_us) |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 106 | : RTCStats(std::move(id), timestamp_us), |
| 107 | payload_type("payloadType"), |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 108 | mime_type("mimeType"), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 109 | clock_rate("clockRate"), |
| 110 | channels("channels"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 111 | sdp_fmtp_line("sdpFmtpLine") {} |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 112 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 113 | RTCCodecStats::RTCCodecStats(const RTCCodecStats& other) |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 114 | : RTCStats(other.id(), other.timestamp_us()), |
| 115 | payload_type(other.payload_type), |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 116 | mime_type(other.mime_type), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 117 | clock_rate(other.clock_rate), |
| 118 | channels(other.channels), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 119 | sdp_fmtp_line(other.sdp_fmtp_line) {} |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 120 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 121 | RTCCodecStats::~RTCCodecStats() {} |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 122 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 123 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 124 | WEBRTC_RTCSTATS_IMPL(RTCDataChannelStats, RTCStats, "data-channel", |
| 125 | &label, |
| 126 | &protocol, |
| 127 | &datachannelid, |
| 128 | &state, |
| 129 | &messages_sent, |
| 130 | &bytes_sent, |
| 131 | &messages_received, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 132 | &bytes_received) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 133 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 134 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 135 | RTCDataChannelStats::RTCDataChannelStats(const std::string& id, |
| 136 | int64_t timestamp_us) |
| 137 | : RTCDataChannelStats(std::string(id), timestamp_us) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 138 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 139 | RTCDataChannelStats::RTCDataChannelStats(std::string&& id, int64_t timestamp_us) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 140 | : RTCStats(std::move(id), timestamp_us), |
| 141 | label("label"), |
| 142 | protocol("protocol"), |
| 143 | datachannelid("datachannelid"), |
| 144 | state("state"), |
| 145 | messages_sent("messagesSent"), |
| 146 | bytes_sent("bytesSent"), |
| 147 | messages_received("messagesReceived"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 148 | bytes_received("bytesReceived") {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 149 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 150 | RTCDataChannelStats::RTCDataChannelStats(const RTCDataChannelStats& other) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 151 | : RTCStats(other.id(), other.timestamp_us()), |
| 152 | label(other.label), |
| 153 | protocol(other.protocol), |
| 154 | datachannelid(other.datachannelid), |
| 155 | state(other.state), |
| 156 | messages_sent(other.messages_sent), |
| 157 | bytes_sent(other.bytes_sent), |
| 158 | messages_received(other.messages_received), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 159 | bytes_received(other.bytes_received) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 160 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 161 | RTCDataChannelStats::~RTCDataChannelStats() {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 162 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 163 | // clang-format off |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 164 | WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair", |
| 165 | &transport_id, |
| 166 | &local_candidate_id, |
| 167 | &remote_candidate_id, |
| 168 | &state, |
| 169 | &priority, |
| 170 | &nominated, |
| 171 | &writable, |
| 172 | &readable, |
| 173 | &bytes_sent, |
| 174 | &bytes_received, |
hbos | 3168c7a | 2016-12-15 06:17:08 -0800 | [diff] [blame] | 175 | &total_round_trip_time, |
| 176 | ¤t_round_trip_time, |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 177 | &available_outgoing_bitrate, |
| 178 | &available_incoming_bitrate, |
| 179 | &requests_received, |
| 180 | &requests_sent, |
| 181 | &responses_received, |
| 182 | &responses_sent, |
| 183 | &retransmissions_received, |
| 184 | &retransmissions_sent, |
| 185 | &consent_requests_received, |
| 186 | &consent_requests_sent, |
| 187 | &consent_responses_received, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 188 | &consent_responses_sent) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 189 | // clang-format on |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 190 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 191 | RTCIceCandidatePairStats::RTCIceCandidatePairStats(const std::string& id, |
| 192 | int64_t timestamp_us) |
| 193 | : RTCIceCandidatePairStats(std::string(id), timestamp_us) {} |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 194 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 195 | RTCIceCandidatePairStats::RTCIceCandidatePairStats(std::string&& id, |
| 196 | int64_t timestamp_us) |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 197 | : RTCStats(std::move(id), timestamp_us), |
| 198 | transport_id("transportId"), |
| 199 | local_candidate_id("localCandidateId"), |
| 200 | remote_candidate_id("remoteCandidateId"), |
| 201 | state("state"), |
| 202 | priority("priority"), |
| 203 | nominated("nominated"), |
| 204 | writable("writable"), |
| 205 | readable("readable"), |
| 206 | bytes_sent("bytesSent"), |
| 207 | bytes_received("bytesReceived"), |
hbos | 3168c7a | 2016-12-15 06:17:08 -0800 | [diff] [blame] | 208 | total_round_trip_time("totalRoundTripTime"), |
| 209 | current_round_trip_time("currentRoundTripTime"), |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 210 | available_outgoing_bitrate("availableOutgoingBitrate"), |
| 211 | available_incoming_bitrate("availableIncomingBitrate"), |
| 212 | requests_received("requestsReceived"), |
| 213 | requests_sent("requestsSent"), |
| 214 | responses_received("responsesReceived"), |
| 215 | responses_sent("responsesSent"), |
| 216 | retransmissions_received("retransmissionsReceived"), |
| 217 | retransmissions_sent("retransmissionsSent"), |
| 218 | consent_requests_received("consentRequestsReceived"), |
| 219 | consent_requests_sent("consentRequestsSent"), |
| 220 | consent_responses_received("consentResponsesReceived"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 221 | consent_responses_sent("consentResponsesSent") {} |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 222 | |
| 223 | RTCIceCandidatePairStats::RTCIceCandidatePairStats( |
| 224 | const RTCIceCandidatePairStats& other) |
| 225 | : RTCStats(other.id(), other.timestamp_us()), |
| 226 | transport_id(other.transport_id), |
| 227 | local_candidate_id(other.local_candidate_id), |
| 228 | remote_candidate_id(other.remote_candidate_id), |
| 229 | state(other.state), |
| 230 | priority(other.priority), |
| 231 | nominated(other.nominated), |
| 232 | writable(other.writable), |
| 233 | readable(other.readable), |
| 234 | bytes_sent(other.bytes_sent), |
| 235 | bytes_received(other.bytes_received), |
hbos | 3168c7a | 2016-12-15 06:17:08 -0800 | [diff] [blame] | 236 | total_round_trip_time(other.total_round_trip_time), |
| 237 | current_round_trip_time(other.current_round_trip_time), |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 238 | available_outgoing_bitrate(other.available_outgoing_bitrate), |
| 239 | available_incoming_bitrate(other.available_incoming_bitrate), |
| 240 | requests_received(other.requests_received), |
| 241 | requests_sent(other.requests_sent), |
| 242 | responses_received(other.responses_received), |
| 243 | responses_sent(other.responses_sent), |
| 244 | retransmissions_received(other.retransmissions_received), |
| 245 | retransmissions_sent(other.retransmissions_sent), |
| 246 | consent_requests_received(other.consent_requests_received), |
| 247 | consent_requests_sent(other.consent_requests_sent), |
| 248 | consent_responses_received(other.consent_responses_received), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 249 | consent_responses_sent(other.consent_responses_sent) {} |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 250 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 251 | RTCIceCandidatePairStats::~RTCIceCandidatePairStats() {} |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 252 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 253 | // clang-format off |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 254 | WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "abstract-ice-candidate", |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 255 | &transport_id, |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 256 | &is_remote, |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 257 | &network_type, |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 258 | &ip, |
| 259 | &port, |
| 260 | &protocol, |
Philipp Hancke | 9551375 | 2018-09-27 14:40:08 +0200 | [diff] [blame] | 261 | &relay_protocol, |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 262 | &candidate_type, |
| 263 | &priority, |
hbos | d17a5a7 | 2017-01-02 08:09:59 -0800 | [diff] [blame] | 264 | &url, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 265 | &deleted) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 266 | // clang-format on |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 267 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 268 | RTCIceCandidateStats::RTCIceCandidateStats(const std::string& id, |
| 269 | int64_t timestamp_us, |
| 270 | bool is_remote) |
| 271 | : RTCIceCandidateStats(std::string(id), timestamp_us, is_remote) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 272 | |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 273 | RTCIceCandidateStats::RTCIceCandidateStats(std::string&& id, |
| 274 | int64_t timestamp_us, |
| 275 | bool is_remote) |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 276 | : RTCStats(std::move(id), timestamp_us), |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 277 | transport_id("transportId"), |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 278 | is_remote("isRemote", is_remote), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 279 | network_type("networkType"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 280 | ip("ip"), |
| 281 | port("port"), |
| 282 | protocol("protocol"), |
Philipp Hancke | 9551375 | 2018-09-27 14:40:08 +0200 | [diff] [blame] | 283 | relay_protocol("relayProtocol"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 284 | candidate_type("candidateType"), |
| 285 | priority("priority"), |
hbos | d17a5a7 | 2017-01-02 08:09:59 -0800 | [diff] [blame] | 286 | url("url"), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 287 | deleted("deleted", false) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 288 | |
| 289 | RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other) |
| 290 | : RTCStats(other.id(), other.timestamp_us()), |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 291 | transport_id(other.transport_id), |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 292 | is_remote(other.is_remote), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 293 | network_type(other.network_type), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 294 | ip(other.ip), |
| 295 | port(other.port), |
| 296 | protocol(other.protocol), |
Philipp Hancke | 9551375 | 2018-09-27 14:40:08 +0200 | [diff] [blame] | 297 | relay_protocol(other.relay_protocol), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 298 | candidate_type(other.candidate_type), |
| 299 | priority(other.priority), |
hbos | d17a5a7 | 2017-01-02 08:09:59 -0800 | [diff] [blame] | 300 | url(other.url), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 301 | deleted(other.deleted) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 302 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 303 | RTCIceCandidateStats::~RTCIceCandidateStats() {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 304 | |
| 305 | const char RTCLocalIceCandidateStats::kType[] = "local-candidate"; |
| 306 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 307 | RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(const std::string& id, |
| 308 | int64_t timestamp_us) |
| 309 | : RTCIceCandidateStats(id, timestamp_us, false) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 310 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 311 | RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(std::string&& id, |
| 312 | int64_t timestamp_us) |
| 313 | : RTCIceCandidateStats(std::move(id), timestamp_us, false) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 314 | |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 315 | std::unique_ptr<RTCStats> RTCLocalIceCandidateStats::copy() const { |
| 316 | return std::unique_ptr<RTCStats>(new RTCLocalIceCandidateStats(*this)); |
| 317 | } |
| 318 | |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 319 | const char* RTCLocalIceCandidateStats::type() const { |
| 320 | return kType; |
| 321 | } |
| 322 | |
| 323 | const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate"; |
| 324 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 325 | RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(const std::string& id, |
| 326 | int64_t timestamp_us) |
| 327 | : RTCIceCandidateStats(id, timestamp_us, true) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 328 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 329 | RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(std::string&& id, |
| 330 | int64_t timestamp_us) |
| 331 | : RTCIceCandidateStats(std::move(id), timestamp_us, true) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 332 | |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 333 | std::unique_ptr<RTCStats> RTCRemoteIceCandidateStats::copy() const { |
| 334 | return std::unique_ptr<RTCStats>(new RTCRemoteIceCandidateStats(*this)); |
| 335 | } |
| 336 | |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 337 | const char* RTCRemoteIceCandidateStats::type() const { |
| 338 | return kType; |
| 339 | } |
| 340 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 341 | // clang-format off |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 342 | WEBRTC_RTCSTATS_IMPL(RTCMediaStreamStats, RTCStats, "stream", |
| 343 | &stream_identifier, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 344 | &track_ids) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 345 | // clang-format on |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 346 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 347 | RTCMediaStreamStats::RTCMediaStreamStats(const std::string& id, |
| 348 | int64_t timestamp_us) |
| 349 | : RTCMediaStreamStats(std::string(id), timestamp_us) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 350 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 351 | RTCMediaStreamStats::RTCMediaStreamStats(std::string&& id, int64_t timestamp_us) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 352 | : RTCStats(std::move(id), timestamp_us), |
| 353 | stream_identifier("streamIdentifier"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 354 | track_ids("trackIds") {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 355 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 356 | RTCMediaStreamStats::RTCMediaStreamStats(const RTCMediaStreamStats& other) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 357 | : RTCStats(other.id(), other.timestamp_us()), |
| 358 | stream_identifier(other.stream_identifier), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 359 | track_ids(other.track_ids) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 360 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 361 | RTCMediaStreamStats::~RTCMediaStreamStats() {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 362 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 363 | // clang-format off |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 364 | WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track", |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 365 | &track_identifier, |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 366 | &media_source_id, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 367 | &remote_source, |
| 368 | &ended, |
| 369 | &detached, |
| 370 | &kind, |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 371 | &jitter_buffer_delay, |
Chen Xing | 0acffb5 | 2019-01-15 15:46:29 +0100 | [diff] [blame] | 372 | &jitter_buffer_emitted_count, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 373 | &frame_width, |
| 374 | &frame_height, |
| 375 | &frames_per_second, |
| 376 | &frames_sent, |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 377 | &huge_frames_sent, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 378 | &frames_received, |
| 379 | &frames_decoded, |
| 380 | &frames_dropped, |
| 381 | &frames_corrupted, |
| 382 | &partial_frames_lost, |
| 383 | &full_frames_lost, |
| 384 | &audio_level, |
| 385 | &total_audio_energy, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 386 | &echo_return_loss, |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 387 | &echo_return_loss_enhancement, |
| 388 | &total_samples_received, |
| 389 | &total_samples_duration, |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 390 | &concealed_samples, |
Henrik Boström | 21e99da | 2019-08-21 12:09:51 +0200 | [diff] [blame] | 391 | &silent_concealed_samples, |
Ruslan Burakov | 8af8896 | 2018-11-22 17:21:10 +0100 | [diff] [blame] | 392 | &concealment_events, |
Henrik Boström | 21e99da | 2019-08-21 12:09:51 +0200 | [diff] [blame] | 393 | &inserted_samples_for_deceleration, |
| 394 | &removed_samples_for_acceleration, |
Jakob Ivarsson | 352ce5c | 2018-11-27 12:52:16 +0100 | [diff] [blame] | 395 | &jitter_buffer_flushes, |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 396 | &delayed_packet_outage_samples, |
Jakob Ivarsson | 232b3fd | 2019-03-06 09:18:40 +0100 | [diff] [blame] | 397 | &relative_packet_arrival_delay, |
Artem Titov | e618cc9 | 2020-03-11 11:18:54 +0100 | [diff] [blame] | 398 | &jitter_buffer_target_delay, |
Henrik Lundin | 44125fa | 2019-04-29 17:00:46 +0200 | [diff] [blame] | 399 | &interruption_count, |
| 400 | &total_interruption_duration, |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 401 | &freeze_count, |
| 402 | &pause_count, |
| 403 | &total_freezes_duration, |
| 404 | &total_pauses_duration, |
| 405 | &total_frames_duration, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 406 | &sum_squared_frame_durations) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 407 | // clang-format on |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 408 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 409 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(const std::string& id, |
| 410 | int64_t timestamp_us, |
| 411 | const char* kind) |
| 412 | : RTCMediaStreamTrackStats(std::string(id), timestamp_us, kind) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 413 | |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 414 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(std::string&& id, |
| 415 | int64_t timestamp_us, |
| 416 | const char* kind) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 417 | : RTCStats(std::move(id), timestamp_us), |
| 418 | track_identifier("trackIdentifier"), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 419 | media_source_id("mediaSourceId"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 420 | remote_source("remoteSource"), |
| 421 | ended("ended"), |
| 422 | detached("detached"), |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 423 | kind("kind", kind), |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 424 | jitter_buffer_delay("jitterBufferDelay"), |
Chen Xing | 0acffb5 | 2019-01-15 15:46:29 +0100 | [diff] [blame] | 425 | jitter_buffer_emitted_count("jitterBufferEmittedCount"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 426 | frame_width("frameWidth"), |
| 427 | frame_height("frameHeight"), |
| 428 | frames_per_second("framesPerSecond"), |
| 429 | frames_sent("framesSent"), |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 430 | huge_frames_sent("hugeFramesSent"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 431 | frames_received("framesReceived"), |
| 432 | frames_decoded("framesDecoded"), |
| 433 | frames_dropped("framesDropped"), |
| 434 | frames_corrupted("framesCorrupted"), |
| 435 | partial_frames_lost("partialFramesLost"), |
| 436 | full_frames_lost("fullFramesLost"), |
| 437 | audio_level("audioLevel"), |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 438 | total_audio_energy("totalAudioEnergy"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 439 | echo_return_loss("echoReturnLoss"), |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 440 | echo_return_loss_enhancement("echoReturnLossEnhancement"), |
| 441 | total_samples_received("totalSamplesReceived"), |
| 442 | total_samples_duration("totalSamplesDuration"), |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 443 | concealed_samples("concealedSamples"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 444 | silent_concealed_samples("silentConcealedSamples"), |
Ruslan Burakov | 8af8896 | 2018-11-22 17:21:10 +0100 | [diff] [blame] | 445 | concealment_events("concealmentEvents"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 446 | inserted_samples_for_deceleration("insertedSamplesForDeceleration"), |
| 447 | removed_samples_for_acceleration("removedSamplesForAcceleration"), |
Jakob Ivarsson | 758d946 | 2019-03-19 15:38:49 +0100 | [diff] [blame] | 448 | jitter_buffer_flushes( |
| 449 | "jitterBufferFlushes", |
| 450 | {NonStandardGroupId::kRtcAudioJitterBufferMaxPackets}), |
| 451 | delayed_packet_outage_samples( |
| 452 | "delayedPacketOutageSamples", |
| 453 | {NonStandardGroupId::kRtcAudioJitterBufferMaxPackets, |
| 454 | NonStandardGroupId::kRtcStatsRelativePacketArrivalDelay}), |
| 455 | relative_packet_arrival_delay( |
| 456 | "relativePacketArrivalDelay", |
| 457 | {NonStandardGroupId::kRtcStatsRelativePacketArrivalDelay}), |
Artem Titov | e618cc9 | 2020-03-11 11:18:54 +0100 | [diff] [blame] | 458 | jitter_buffer_target_delay("jitterBufferTargetDelay"), |
Henrik Lundin | 44125fa | 2019-04-29 17:00:46 +0200 | [diff] [blame] | 459 | interruption_count("interruptionCount"), |
| 460 | total_interruption_duration("totalInterruptionDuration"), |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 461 | freeze_count("freezeCount"), |
| 462 | pause_count("pauseCount"), |
| 463 | total_freezes_duration("totalFreezesDuration"), |
| 464 | total_pauses_duration("totalPausesDuration"), |
| 465 | total_frames_duration("totalFramesDuration"), |
| 466 | sum_squared_frame_durations("sumOfSquaredFramesDuration") { |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 467 | RTC_DCHECK(kind == RTCMediaStreamTrackKind::kAudio || |
| 468 | kind == RTCMediaStreamTrackKind::kVideo); |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 469 | } |
| 470 | |
| 471 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( |
| 472 | const RTCMediaStreamTrackStats& other) |
| 473 | : RTCStats(other.id(), other.timestamp_us()), |
| 474 | track_identifier(other.track_identifier), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 475 | media_source_id(other.media_source_id), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 476 | remote_source(other.remote_source), |
| 477 | ended(other.ended), |
| 478 | detached(other.detached), |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 479 | kind(other.kind), |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 480 | jitter_buffer_delay(other.jitter_buffer_delay), |
Chen Xing | 0acffb5 | 2019-01-15 15:46:29 +0100 | [diff] [blame] | 481 | jitter_buffer_emitted_count(other.jitter_buffer_emitted_count), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 482 | frame_width(other.frame_width), |
| 483 | frame_height(other.frame_height), |
| 484 | frames_per_second(other.frames_per_second), |
| 485 | frames_sent(other.frames_sent), |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 486 | huge_frames_sent(other.huge_frames_sent), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 487 | frames_received(other.frames_received), |
| 488 | frames_decoded(other.frames_decoded), |
| 489 | frames_dropped(other.frames_dropped), |
| 490 | frames_corrupted(other.frames_corrupted), |
| 491 | partial_frames_lost(other.partial_frames_lost), |
| 492 | full_frames_lost(other.full_frames_lost), |
| 493 | audio_level(other.audio_level), |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 494 | total_audio_energy(other.total_audio_energy), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 495 | echo_return_loss(other.echo_return_loss), |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 496 | echo_return_loss_enhancement(other.echo_return_loss_enhancement), |
| 497 | total_samples_received(other.total_samples_received), |
| 498 | total_samples_duration(other.total_samples_duration), |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 499 | concealed_samples(other.concealed_samples), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 500 | silent_concealed_samples(other.silent_concealed_samples), |
Ruslan Burakov | 8af8896 | 2018-11-22 17:21:10 +0100 | [diff] [blame] | 501 | concealment_events(other.concealment_events), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 502 | inserted_samples_for_deceleration( |
| 503 | other.inserted_samples_for_deceleration), |
| 504 | removed_samples_for_acceleration(other.removed_samples_for_acceleration), |
Jakob Ivarsson | 352ce5c | 2018-11-27 12:52:16 +0100 | [diff] [blame] | 505 | jitter_buffer_flushes(other.jitter_buffer_flushes), |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 506 | delayed_packet_outage_samples(other.delayed_packet_outage_samples), |
Jakob Ivarsson | 232b3fd | 2019-03-06 09:18:40 +0100 | [diff] [blame] | 507 | relative_packet_arrival_delay(other.relative_packet_arrival_delay), |
Artem Titov | e618cc9 | 2020-03-11 11:18:54 +0100 | [diff] [blame] | 508 | jitter_buffer_target_delay(other.jitter_buffer_target_delay), |
Henrik Lundin | 44125fa | 2019-04-29 17:00:46 +0200 | [diff] [blame] | 509 | interruption_count(other.interruption_count), |
| 510 | total_interruption_duration(other.total_interruption_duration), |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 511 | freeze_count(other.freeze_count), |
| 512 | pause_count(other.pause_count), |
| 513 | total_freezes_duration(other.total_freezes_duration), |
| 514 | total_pauses_duration(other.total_pauses_duration), |
| 515 | total_frames_duration(other.total_frames_duration), |
| 516 | sum_squared_frame_durations(other.sum_squared_frame_durations) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 517 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 518 | RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 519 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 520 | // clang-format off |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 521 | WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection", |
| 522 | &data_channels_opened, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 523 | &data_channels_closed) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 524 | // clang-format on |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 525 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 526 | RTCPeerConnectionStats::RTCPeerConnectionStats(const std::string& id, |
| 527 | int64_t timestamp_us) |
| 528 | : RTCPeerConnectionStats(std::string(id), timestamp_us) {} |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 529 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 530 | RTCPeerConnectionStats::RTCPeerConnectionStats(std::string&& id, |
| 531 | int64_t timestamp_us) |
hbos | 0e6758d | 2016-08-31 07:57:36 -0700 | [diff] [blame] | 532 | : RTCStats(std::move(id), timestamp_us), |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 533 | data_channels_opened("dataChannelsOpened"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 534 | data_channels_closed("dataChannelsClosed") {} |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 535 | |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 536 | RTCPeerConnectionStats::RTCPeerConnectionStats( |
| 537 | const RTCPeerConnectionStats& other) |
| 538 | : RTCStats(other.id(), other.timestamp_us()), |
| 539 | data_channels_opened(other.data_channels_opened), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 540 | data_channels_closed(other.data_channels_closed) {} |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 541 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 542 | RTCPeerConnectionStats::~RTCPeerConnectionStats() {} |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 543 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 544 | // clang-format off |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 545 | WEBRTC_RTCSTATS_IMPL(RTCRTPStreamStats, RTCStats, "rtp", |
| 546 | &ssrc, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 547 | &is_remote, |
| 548 | &media_type, |
Philipp Hancke | 3bc0166 | 2018-08-28 14:55:03 +0200 | [diff] [blame] | 549 | &kind, |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 550 | &track_id, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 551 | &transport_id, |
| 552 | &codec_id, |
| 553 | &fir_count, |
| 554 | &pli_count, |
| 555 | &nack_count, |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 556 | &sli_count, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 557 | &qp_sum) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 558 | // clang-format on |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 559 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 560 | RTCRTPStreamStats::RTCRTPStreamStats(const std::string& id, |
| 561 | int64_t timestamp_us) |
| 562 | : RTCRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 563 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 564 | RTCRTPStreamStats::RTCRTPStreamStats(std::string&& id, int64_t timestamp_us) |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 565 | : RTCStats(std::move(id), timestamp_us), |
| 566 | ssrc("ssrc"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 567 | is_remote("isRemote", false), |
| 568 | media_type("mediaType"), |
Philipp Hancke | 3bc0166 | 2018-08-28 14:55:03 +0200 | [diff] [blame] | 569 | kind("kind"), |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 570 | track_id("trackId"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 571 | transport_id("transportId"), |
| 572 | codec_id("codecId"), |
| 573 | fir_count("firCount"), |
| 574 | pli_count("pliCount"), |
| 575 | nack_count("nackCount"), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 576 | sli_count("sliCount"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 577 | qp_sum("qpSum") {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 578 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 579 | RTCRTPStreamStats::RTCRTPStreamStats(const RTCRTPStreamStats& other) |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 580 | : RTCStats(other.id(), other.timestamp_us()), |
| 581 | ssrc(other.ssrc), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 582 | is_remote(other.is_remote), |
| 583 | media_type(other.media_type), |
Philipp Hancke | 3bc0166 | 2018-08-28 14:55:03 +0200 | [diff] [blame] | 584 | kind(other.kind), |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 585 | track_id(other.track_id), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 586 | transport_id(other.transport_id), |
| 587 | codec_id(other.codec_id), |
| 588 | fir_count(other.fir_count), |
| 589 | pli_count(other.pli_count), |
| 590 | nack_count(other.nack_count), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 591 | sli_count(other.sli_count), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 592 | qp_sum(other.qp_sum) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 593 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 594 | RTCRTPStreamStats::~RTCRTPStreamStats() {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 595 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 596 | // clang-format off |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 597 | WEBRTC_RTCSTATS_IMPL( |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 598 | RTCInboundRTPStreamStats, RTCRTPStreamStats, "inbound-rtp", |
| 599 | &packets_received, |
Henrik Boström | 4a5dab0 | 2020-01-28 11:15:35 +0100 | [diff] [blame] | 600 | &fec_packets_received, |
| 601 | &fec_packets_discarded, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 602 | &bytes_received, |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 603 | &header_bytes_received, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 604 | &packets_lost, |
Henrik Boström | 01738c6 | 2019-04-15 17:32:00 +0200 | [diff] [blame] | 605 | &last_packet_received_timestamp, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 606 | &jitter, |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 607 | &round_trip_time, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 608 | &packets_discarded, |
| 609 | &packets_repaired, |
| 610 | &burst_packets_lost, |
| 611 | &burst_packets_discarded, |
| 612 | &burst_loss_count, |
| 613 | &burst_discard_count, |
| 614 | &burst_loss_rate, |
| 615 | &burst_discard_rate, |
| 616 | &gap_loss_rate, |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 617 | &gap_discard_rate, |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 618 | &frames_decoded, |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 619 | &key_frames_decoded, |
Johannes Kron | bfd343b | 2019-07-01 10:07:50 +0200 | [diff] [blame] | 620 | &total_decode_time, |
Johannes Kron | 00376e1 | 2019-11-25 10:25:42 +0100 | [diff] [blame] | 621 | &total_inter_frame_delay, |
| 622 | &total_squared_inter_frame_delay, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 623 | &content_type, |
Åsa Persson | fcf79cc | 2019-10-22 15:23:44 +0200 | [diff] [blame] | 624 | &estimated_playout_timestamp, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 625 | &decoder_implementation) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 626 | // clang-format on |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 627 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 628 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(const std::string& id, |
| 629 | int64_t timestamp_us) |
| 630 | : RTCInboundRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 631 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 632 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(std::string&& id, |
| 633 | int64_t timestamp_us) |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 634 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
| 635 | packets_received("packetsReceived"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 636 | fec_packets_received("fecPacketsReceived"), |
| 637 | fec_packets_discarded("fecPacketsDiscarded"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 638 | bytes_received("bytesReceived"), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 639 | header_bytes_received("headerBytesReceived"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 640 | packets_lost("packetsLost"), |
Henrik Boström | 01738c6 | 2019-04-15 17:32:00 +0200 | [diff] [blame] | 641 | last_packet_received_timestamp("lastPacketReceivedTimestamp"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 642 | jitter("jitter"), |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 643 | round_trip_time("roundTripTime"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 644 | packets_discarded("packetsDiscarded"), |
| 645 | packets_repaired("packetsRepaired"), |
| 646 | burst_packets_lost("burstPacketsLost"), |
| 647 | burst_packets_discarded("burstPacketsDiscarded"), |
| 648 | burst_loss_count("burstLossCount"), |
| 649 | burst_discard_count("burstDiscardCount"), |
| 650 | burst_loss_rate("burstLossRate"), |
| 651 | burst_discard_rate("burstDiscardRate"), |
| 652 | gap_loss_rate("gapLossRate"), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 653 | gap_discard_rate("gapDiscardRate"), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 654 | frames_decoded("framesDecoded"), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 655 | key_frames_decoded("keyFramesDecoded"), |
Johannes Kron | bfd343b | 2019-07-01 10:07:50 +0200 | [diff] [blame] | 656 | total_decode_time("totalDecodeTime"), |
Johannes Kron | 00376e1 | 2019-11-25 10:25:42 +0100 | [diff] [blame] | 657 | total_inter_frame_delay("totalInterFrameDelay"), |
| 658 | total_squared_inter_frame_delay("totalSquaredInterFrameDelay"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 659 | content_type("contentType"), |
Åsa Persson | fcf79cc | 2019-10-22 15:23:44 +0200 | [diff] [blame] | 660 | estimated_playout_timestamp("estimatedPlayoutTimestamp"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 661 | decoder_implementation("decoderImplementation") {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 662 | |
| 663 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats( |
| 664 | const RTCInboundRTPStreamStats& other) |
| 665 | : RTCRTPStreamStats(other), |
| 666 | packets_received(other.packets_received), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 667 | fec_packets_received(other.fec_packets_received), |
| 668 | fec_packets_discarded(other.fec_packets_discarded), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 669 | bytes_received(other.bytes_received), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 670 | header_bytes_received(other.header_bytes_received), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 671 | packets_lost(other.packets_lost), |
Henrik Boström | 01738c6 | 2019-04-15 17:32:00 +0200 | [diff] [blame] | 672 | last_packet_received_timestamp(other.last_packet_received_timestamp), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 673 | jitter(other.jitter), |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 674 | round_trip_time(other.round_trip_time), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 675 | packets_discarded(other.packets_discarded), |
| 676 | packets_repaired(other.packets_repaired), |
| 677 | burst_packets_lost(other.burst_packets_lost), |
| 678 | burst_packets_discarded(other.burst_packets_discarded), |
| 679 | burst_loss_count(other.burst_loss_count), |
| 680 | burst_discard_count(other.burst_discard_count), |
| 681 | burst_loss_rate(other.burst_loss_rate), |
| 682 | burst_discard_rate(other.burst_discard_rate), |
| 683 | gap_loss_rate(other.gap_loss_rate), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 684 | gap_discard_rate(other.gap_discard_rate), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 685 | frames_decoded(other.frames_decoded), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 686 | key_frames_decoded(other.key_frames_decoded), |
Johannes Kron | bfd343b | 2019-07-01 10:07:50 +0200 | [diff] [blame] | 687 | total_decode_time(other.total_decode_time), |
Johannes Kron | 00376e1 | 2019-11-25 10:25:42 +0100 | [diff] [blame] | 688 | total_inter_frame_delay(other.total_inter_frame_delay), |
| 689 | total_squared_inter_frame_delay(other.total_squared_inter_frame_delay), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 690 | content_type(other.content_type), |
Åsa Persson | fcf79cc | 2019-10-22 15:23:44 +0200 | [diff] [blame] | 691 | estimated_playout_timestamp(other.estimated_playout_timestamp), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 692 | decoder_implementation(other.decoder_implementation) {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 693 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 694 | RTCInboundRTPStreamStats::~RTCInboundRTPStreamStats() {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 695 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 696 | // clang-format off |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 697 | WEBRTC_RTCSTATS_IMPL( |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 698 | RTCOutboundRTPStreamStats, RTCRTPStreamStats, "outbound-rtp", |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 699 | &media_source_id, |
Henrik Boström | 4f40fa5 | 2019-12-19 13:27:27 +0100 | [diff] [blame] | 700 | &remote_id, |
Eldar Rello | da6cda8 | 2020-04-17 13:44:28 +0300 | [diff] [blame] | 701 | &rid, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 702 | &packets_sent, |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 703 | &retransmitted_packets_sent, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 704 | &bytes_sent, |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 705 | &header_bytes_sent, |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 706 | &retransmitted_bytes_sent, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 707 | &target_bitrate, |
Henrik Boström | f71362f | 2019-04-08 16:14:23 +0200 | [diff] [blame] | 708 | &frames_encoded, |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 709 | &key_frames_encoded, |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 710 | &total_encode_time, |
Henrik Boström | 23aff9b | 2019-05-20 15:15:38 +0200 | [diff] [blame] | 711 | &total_encoded_bytes_target, |
Eldar Rello | da6cda8 | 2020-04-17 13:44:28 +0300 | [diff] [blame] | 712 | &frame_width, |
| 713 | &frame_height, |
| 714 | &frames_per_second, |
| 715 | &frames_sent, |
| 716 | &huge_frames_sent, |
Henrik Boström | 9fe1834 | 2019-05-16 18:38:20 +0200 | [diff] [blame] | 717 | &total_packet_send_delay, |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 718 | &quality_limitation_reason, |
Evan Shrubsole | cc62b16 | 2019-09-09 11:26:45 +0200 | [diff] [blame] | 719 | &quality_limitation_resolution_changes, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 720 | &content_type, |
| 721 | &encoder_implementation) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 722 | // clang-format on |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 723 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 724 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(const std::string& id, |
| 725 | int64_t timestamp_us) |
| 726 | : RTCOutboundRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 727 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 728 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(std::string&& id, |
| 729 | int64_t timestamp_us) |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 730 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 731 | media_source_id("mediaSourceId"), |
Henrik Boström | 4f40fa5 | 2019-12-19 13:27:27 +0100 | [diff] [blame] | 732 | remote_id("remoteId"), |
Eldar Rello | da6cda8 | 2020-04-17 13:44:28 +0300 | [diff] [blame] | 733 | rid("rid"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 734 | packets_sent("packetsSent"), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 735 | retransmitted_packets_sent("retransmittedPacketsSent"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 736 | bytes_sent("bytesSent"), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 737 | header_bytes_sent("headerBytesSent"), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 738 | retransmitted_bytes_sent("retransmittedBytesSent"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 739 | target_bitrate("targetBitrate"), |
Henrik Boström | f71362f | 2019-04-08 16:14:23 +0200 | [diff] [blame] | 740 | frames_encoded("framesEncoded"), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 741 | key_frames_encoded("keyFramesEncoded"), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 742 | total_encode_time("totalEncodeTime"), |
Henrik Boström | 23aff9b | 2019-05-20 15:15:38 +0200 | [diff] [blame] | 743 | total_encoded_bytes_target("totalEncodedBytesTarget"), |
Eldar Rello | da6cda8 | 2020-04-17 13:44:28 +0300 | [diff] [blame] | 744 | frame_width("frameWidth"), |
| 745 | frame_height("frameHeight"), |
| 746 | frames_per_second("framesPerSecond"), |
| 747 | frames_sent("framesSent"), |
| 748 | huge_frames_sent("hugeFramesSent"), |
Henrik Boström | 9fe1834 | 2019-05-16 18:38:20 +0200 | [diff] [blame] | 749 | total_packet_send_delay("totalPacketSendDelay"), |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 750 | quality_limitation_reason("qualityLimitationReason"), |
Evan Shrubsole | cc62b16 | 2019-09-09 11:26:45 +0200 | [diff] [blame] | 751 | quality_limitation_resolution_changes( |
| 752 | "qualityLimitationResolutionChanges"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 753 | content_type("contentType"), |
| 754 | encoder_implementation("encoderImplementation") {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 755 | |
| 756 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats( |
| 757 | const RTCOutboundRTPStreamStats& other) |
| 758 | : RTCRTPStreamStats(other), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 759 | media_source_id(other.media_source_id), |
Henrik Boström | 4f40fa5 | 2019-12-19 13:27:27 +0100 | [diff] [blame] | 760 | remote_id(other.remote_id), |
Eldar Rello | da6cda8 | 2020-04-17 13:44:28 +0300 | [diff] [blame] | 761 | rid(other.rid), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 762 | packets_sent(other.packets_sent), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 763 | retransmitted_packets_sent(other.retransmitted_packets_sent), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 764 | bytes_sent(other.bytes_sent), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 765 | header_bytes_sent(other.header_bytes_sent), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 766 | retransmitted_bytes_sent(other.retransmitted_bytes_sent), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 767 | target_bitrate(other.target_bitrate), |
Henrik Boström | f71362f | 2019-04-08 16:14:23 +0200 | [diff] [blame] | 768 | frames_encoded(other.frames_encoded), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 769 | key_frames_encoded(other.key_frames_encoded), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 770 | total_encode_time(other.total_encode_time), |
Henrik Boström | 23aff9b | 2019-05-20 15:15:38 +0200 | [diff] [blame] | 771 | total_encoded_bytes_target(other.total_encoded_bytes_target), |
Eldar Rello | da6cda8 | 2020-04-17 13:44:28 +0300 | [diff] [blame] | 772 | frame_width(other.frame_width), |
| 773 | frame_height(other.frame_height), |
| 774 | frames_per_second(other.frames_per_second), |
| 775 | frames_sent(other.frames_sent), |
| 776 | huge_frames_sent(other.huge_frames_sent), |
Henrik Boström | 9fe1834 | 2019-05-16 18:38:20 +0200 | [diff] [blame] | 777 | total_packet_send_delay(other.total_packet_send_delay), |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 778 | quality_limitation_reason(other.quality_limitation_reason), |
Evan Shrubsole | cc62b16 | 2019-09-09 11:26:45 +0200 | [diff] [blame] | 779 | quality_limitation_resolution_changes( |
| 780 | other.quality_limitation_resolution_changes), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 781 | content_type(other.content_type), |
| 782 | encoder_implementation(other.encoder_implementation) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 783 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 784 | RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 785 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 786 | // clang-format off |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 787 | WEBRTC_RTCSTATS_IMPL( |
| 788 | RTCRemoteInboundRtpStreamStats, RTCStats, "remote-inbound-rtp", |
| 789 | &ssrc, |
| 790 | &kind, |
| 791 | &transport_id, |
| 792 | &codec_id, |
| 793 | &packets_lost, |
| 794 | &jitter, |
| 795 | &local_id, |
| 796 | &round_trip_time) |
| 797 | // clang-format on |
| 798 | |
| 799 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 800 | const std::string& id, |
| 801 | int64_t timestamp_us) |
| 802 | : RTCRemoteInboundRtpStreamStats(std::string(id), timestamp_us) {} |
| 803 | |
| 804 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 805 | std::string&& id, |
| 806 | int64_t timestamp_us) |
| 807 | : RTCStats(std::move(id), timestamp_us), |
| 808 | ssrc("ssrc"), |
| 809 | kind("kind"), |
| 810 | transport_id("transportId"), |
| 811 | codec_id("codecId"), |
| 812 | packets_lost("packetsLost"), |
| 813 | jitter("jitter"), |
| 814 | local_id("localId"), |
| 815 | round_trip_time("roundTripTime") {} |
| 816 | |
| 817 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 818 | const RTCRemoteInboundRtpStreamStats& other) |
| 819 | : RTCStats(other), |
| 820 | ssrc(other.ssrc), |
| 821 | kind(other.kind), |
| 822 | transport_id(other.transport_id), |
| 823 | codec_id(other.codec_id), |
| 824 | packets_lost(other.packets_lost), |
| 825 | jitter(other.jitter), |
| 826 | local_id(other.local_id), |
| 827 | round_trip_time(other.round_trip_time) {} |
| 828 | |
| 829 | RTCRemoteInboundRtpStreamStats::~RTCRemoteInboundRtpStreamStats() {} |
| 830 | |
| 831 | // clang-format off |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 832 | WEBRTC_RTCSTATS_IMPL(RTCMediaSourceStats, RTCStats, "parent-media-source", |
| 833 | &track_identifier, |
| 834 | &kind) |
| 835 | // clang-format on |
| 836 | |
| 837 | RTCMediaSourceStats::RTCMediaSourceStats(const std::string& id, |
| 838 | int64_t timestamp_us) |
| 839 | : RTCMediaSourceStats(std::string(id), timestamp_us) {} |
| 840 | |
| 841 | RTCMediaSourceStats::RTCMediaSourceStats(std::string&& id, int64_t timestamp_us) |
| 842 | : RTCStats(std::move(id), timestamp_us), |
| 843 | track_identifier("trackIdentifier"), |
| 844 | kind("kind") {} |
| 845 | |
| 846 | RTCMediaSourceStats::RTCMediaSourceStats(const RTCMediaSourceStats& other) |
| 847 | : RTCStats(other.id(), other.timestamp_us()), |
| 848 | track_identifier(other.track_identifier), |
| 849 | kind(other.kind) {} |
| 850 | |
| 851 | RTCMediaSourceStats::~RTCMediaSourceStats() {} |
| 852 | |
| 853 | // clang-format off |
Henrik Boström | d2c336f | 2019-07-03 17:11:10 +0200 | [diff] [blame] | 854 | WEBRTC_RTCSTATS_IMPL(RTCAudioSourceStats, RTCMediaSourceStats, "media-source", |
| 855 | &audio_level, |
| 856 | &total_audio_energy, |
| 857 | &total_samples_duration) |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 858 | // clang-format on |
| 859 | |
| 860 | RTCAudioSourceStats::RTCAudioSourceStats(const std::string& id, |
| 861 | int64_t timestamp_us) |
| 862 | : RTCAudioSourceStats(std::string(id), timestamp_us) {} |
| 863 | |
| 864 | RTCAudioSourceStats::RTCAudioSourceStats(std::string&& id, int64_t timestamp_us) |
Henrik Boström | d2c336f | 2019-07-03 17:11:10 +0200 | [diff] [blame] | 865 | : RTCMediaSourceStats(std::move(id), timestamp_us), |
| 866 | audio_level("audioLevel"), |
| 867 | total_audio_energy("totalAudioEnergy"), |
| 868 | total_samples_duration("totalSamplesDuration") {} |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 869 | |
| 870 | RTCAudioSourceStats::RTCAudioSourceStats(const RTCAudioSourceStats& other) |
Henrik Boström | d2c336f | 2019-07-03 17:11:10 +0200 | [diff] [blame] | 871 | : RTCMediaSourceStats(other), |
| 872 | audio_level(other.audio_level), |
| 873 | total_audio_energy(other.total_audio_energy), |
| 874 | total_samples_duration(other.total_samples_duration) {} |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 875 | |
| 876 | RTCAudioSourceStats::~RTCAudioSourceStats() {} |
| 877 | |
| 878 | // clang-format off |
| 879 | WEBRTC_RTCSTATS_IMPL(RTCVideoSourceStats, RTCMediaSourceStats, "media-source", |
| 880 | &width, |
| 881 | &height, |
| 882 | &frames, |
| 883 | &frames_per_second) |
| 884 | // clang-format on |
| 885 | |
| 886 | RTCVideoSourceStats::RTCVideoSourceStats(const std::string& id, |
| 887 | int64_t timestamp_us) |
| 888 | : RTCVideoSourceStats(std::string(id), timestamp_us) {} |
| 889 | |
| 890 | RTCVideoSourceStats::RTCVideoSourceStats(std::string&& id, int64_t timestamp_us) |
| 891 | : RTCMediaSourceStats(std::move(id), timestamp_us), |
| 892 | width("width"), |
| 893 | height("height"), |
| 894 | frames("frames"), |
| 895 | frames_per_second("framesPerSecond") {} |
| 896 | |
| 897 | RTCVideoSourceStats::RTCVideoSourceStats(const RTCVideoSourceStats& other) |
| 898 | : RTCMediaSourceStats(other), |
| 899 | width(other.width), |
| 900 | height(other.height), |
| 901 | frames(other.frames), |
| 902 | frames_per_second(other.frames_per_second) {} |
| 903 | |
| 904 | RTCVideoSourceStats::~RTCVideoSourceStats() {} |
| 905 | |
| 906 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 907 | WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport", |
| 908 | &bytes_sent, |
| 909 | &bytes_received, |
| 910 | &rtcp_transport_stats_id, |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 911 | &dtls_state, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 912 | &selected_candidate_pair_id, |
| 913 | &local_certificate_id, |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 914 | &remote_certificate_id, |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 915 | &tls_version, |
| 916 | &dtls_cipher, |
| 917 | &srtp_cipher, |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 918 | &selected_candidate_pair_changes) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 919 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 920 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 921 | RTCTransportStats::RTCTransportStats(const std::string& id, |
| 922 | int64_t timestamp_us) |
| 923 | : RTCTransportStats(std::string(id), timestamp_us) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 924 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 925 | RTCTransportStats::RTCTransportStats(std::string&& id, int64_t timestamp_us) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 926 | : RTCStats(std::move(id), timestamp_us), |
| 927 | bytes_sent("bytesSent"), |
| 928 | bytes_received("bytesReceived"), |
| 929 | rtcp_transport_stats_id("rtcpTransportStatsId"), |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 930 | dtls_state("dtlsState"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 931 | selected_candidate_pair_id("selectedCandidatePairId"), |
| 932 | local_certificate_id("localCertificateId"), |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 933 | remote_certificate_id("remoteCertificateId"), |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 934 | tls_version("tlsVersion"), |
| 935 | dtls_cipher("dtlsCipher"), |
| 936 | srtp_cipher("srtpCipher"), |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 937 | selected_candidate_pair_changes("selectedCandidatePairChanges") {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 938 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 939 | RTCTransportStats::RTCTransportStats(const RTCTransportStats& other) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 940 | : RTCStats(other.id(), other.timestamp_us()), |
| 941 | bytes_sent(other.bytes_sent), |
| 942 | bytes_received(other.bytes_received), |
| 943 | rtcp_transport_stats_id(other.rtcp_transport_stats_id), |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 944 | dtls_state(other.dtls_state), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 945 | selected_candidate_pair_id(other.selected_candidate_pair_id), |
| 946 | local_certificate_id(other.local_certificate_id), |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 947 | remote_certificate_id(other.remote_certificate_id), |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 948 | tls_version(other.tls_version), |
| 949 | dtls_cipher(other.dtls_cipher), |
| 950 | srtp_cipher(other.srtp_cipher), |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 951 | selected_candidate_pair_changes(other.selected_candidate_pair_changes) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 952 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 953 | RTCTransportStats::~RTCTransportStats() {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 954 | |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 955 | } // namespace webrtc |