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 | |
Philipp Hancke | 69c1df2 | 2022-04-22 15:46:24 +0200 | [diff] [blame] | 65 | // https://w3c.github.io/webrtc-stats/#dom-rtcdtlsrole |
| 66 | const char* const RTCDtlsRole::kUnknown = "unknown"; |
| 67 | const char* const RTCDtlsRole::kClient = "client"; |
| 68 | const char* const RTCDtlsRole::kServer = "server"; |
| 69 | |
Philipp Hancke | cc1b9b0 | 2022-05-04 18:58:26 +0200 | [diff] [blame] | 70 | // https://www.w3.org/TR/webrtc/#rtcicerole |
| 71 | const char* const RTCIceRole::kUnknown = "unknown"; |
| 72 | const char* const RTCIceRole::kControlled = "controlled"; |
| 73 | const char* const RTCIceRole::kControlling = "controlling"; |
| 74 | |
Philipp Hancke | 1f49157 | 2022-05-09 17:43:31 +0200 | [diff] [blame] | 75 | // https://www.w3.org/TR/webrtc/#dom-rtcicetransportstate |
| 76 | const char* const RTCIceTransportState::kNew = "new"; |
| 77 | const char* const RTCIceTransportState::kChecking = "checking"; |
| 78 | const char* const RTCIceTransportState::kConnected = "connected"; |
| 79 | const char* const RTCIceTransportState::kCompleted = "completed"; |
| 80 | const char* const RTCIceTransportState::kDisconnected = "disconnected"; |
| 81 | const char* const RTCIceTransportState::kFailed = "failed"; |
| 82 | const char* const RTCIceTransportState::kClosed = "closed"; |
| 83 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 84 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 85 | WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate", |
| 86 | &fingerprint, |
| 87 | &fingerprint_algorithm, |
| 88 | &base64_certificate, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 89 | &issuer_certificate_id) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 90 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 91 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 92 | RTCCertificateStats::RTCCertificateStats(const std::string& id, |
| 93 | int64_t timestamp_us) |
| 94 | : RTCCertificateStats(std::string(id), timestamp_us) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 95 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 96 | RTCCertificateStats::RTCCertificateStats(std::string&& id, int64_t timestamp_us) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 97 | : RTCStats(std::move(id), timestamp_us), |
| 98 | fingerprint("fingerprint"), |
| 99 | fingerprint_algorithm("fingerprintAlgorithm"), |
| 100 | base64_certificate("base64Certificate"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 101 | issuer_certificate_id("issuerCertificateId") {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 102 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 103 | RTCCertificateStats::RTCCertificateStats(const RTCCertificateStats& other) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 104 | : RTCStats(other.id(), other.timestamp_us()), |
| 105 | fingerprint(other.fingerprint), |
| 106 | fingerprint_algorithm(other.fingerprint_algorithm), |
| 107 | base64_certificate(other.base64_certificate), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 108 | issuer_certificate_id(other.issuer_certificate_id) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 109 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 110 | RTCCertificateStats::~RTCCertificateStats() {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 111 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 112 | // clang-format off |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 113 | WEBRTC_RTCSTATS_IMPL(RTCCodecStats, RTCStats, "codec", |
Philipp Hancke | 95157a0 | 2020-11-16 20:08:27 +0100 | [diff] [blame] | 114 | &transport_id, |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 115 | &payload_type, |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 116 | &mime_type, |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 117 | &clock_rate, |
| 118 | &channels, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 119 | &sdp_fmtp_line) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 120 | // clang-format on |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 121 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 122 | RTCCodecStats::RTCCodecStats(const std::string& id, int64_t timestamp_us) |
| 123 | : RTCCodecStats(std::string(id), timestamp_us) {} |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 124 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 125 | RTCCodecStats::RTCCodecStats(std::string&& id, int64_t timestamp_us) |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 126 | : RTCStats(std::move(id), timestamp_us), |
Philipp Hancke | 95157a0 | 2020-11-16 20:08:27 +0100 | [diff] [blame] | 127 | transport_id("transportId"), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 128 | payload_type("payloadType"), |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 129 | mime_type("mimeType"), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 130 | clock_rate("clockRate"), |
| 131 | channels("channels"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 132 | sdp_fmtp_line("sdpFmtpLine") {} |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 133 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 134 | RTCCodecStats::RTCCodecStats(const RTCCodecStats& other) |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 135 | : RTCStats(other.id(), other.timestamp_us()), |
Philipp Hancke | 95157a0 | 2020-11-16 20:08:27 +0100 | [diff] [blame] | 136 | transport_id(other.transport_id), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 137 | payload_type(other.payload_type), |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 138 | mime_type(other.mime_type), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 139 | clock_rate(other.clock_rate), |
| 140 | channels(other.channels), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 141 | sdp_fmtp_line(other.sdp_fmtp_line) {} |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 142 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 143 | RTCCodecStats::~RTCCodecStats() {} |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 144 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 145 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 146 | WEBRTC_RTCSTATS_IMPL(RTCDataChannelStats, RTCStats, "data-channel", |
| 147 | &label, |
| 148 | &protocol, |
Harald Alvestrand | 10ef847 | 2020-06-05 15:38:51 +0200 | [diff] [blame] | 149 | &data_channel_identifier, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 150 | &state, |
| 151 | &messages_sent, |
| 152 | &bytes_sent, |
| 153 | &messages_received, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 154 | &bytes_received) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 155 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 156 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 157 | RTCDataChannelStats::RTCDataChannelStats(const std::string& id, |
| 158 | int64_t timestamp_us) |
| 159 | : RTCDataChannelStats(std::string(id), timestamp_us) {} |
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(std::string&& id, int64_t timestamp_us) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 162 | : RTCStats(std::move(id), timestamp_us), |
| 163 | label("label"), |
| 164 | protocol("protocol"), |
Harald Alvestrand | 10ef847 | 2020-06-05 15:38:51 +0200 | [diff] [blame] | 165 | data_channel_identifier("dataChannelIdentifier"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 166 | state("state"), |
| 167 | messages_sent("messagesSent"), |
| 168 | bytes_sent("bytesSent"), |
| 169 | messages_received("messagesReceived"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 170 | bytes_received("bytesReceived") {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 171 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 172 | RTCDataChannelStats::RTCDataChannelStats(const RTCDataChannelStats& other) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 173 | : RTCStats(other.id(), other.timestamp_us()), |
| 174 | label(other.label), |
| 175 | protocol(other.protocol), |
Harald Alvestrand | 10ef847 | 2020-06-05 15:38:51 +0200 | [diff] [blame] | 176 | data_channel_identifier(other.data_channel_identifier), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 177 | state(other.state), |
| 178 | messages_sent(other.messages_sent), |
| 179 | bytes_sent(other.bytes_sent), |
| 180 | messages_received(other.messages_received), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 181 | bytes_received(other.bytes_received) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 182 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 183 | RTCDataChannelStats::~RTCDataChannelStats() {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 184 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 185 | // clang-format off |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 186 | WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair", |
| 187 | &transport_id, |
| 188 | &local_candidate_id, |
| 189 | &remote_candidate_id, |
| 190 | &state, |
| 191 | &priority, |
| 192 | &nominated, |
| 193 | &writable, |
| 194 | &readable, |
Taylor Brandstetter | 79326ea | 2021-09-28 15:09:53 -0700 | [diff] [blame] | 195 | &packets_sent, |
| 196 | &packets_received, |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 197 | &bytes_sent, |
| 198 | &bytes_received, |
hbos | 3168c7a | 2016-12-15 06:17:08 -0800 | [diff] [blame] | 199 | &total_round_trip_time, |
| 200 | ¤t_round_trip_time, |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 201 | &available_outgoing_bitrate, |
| 202 | &available_incoming_bitrate, |
| 203 | &requests_received, |
| 204 | &requests_sent, |
| 205 | &responses_received, |
| 206 | &responses_sent, |
| 207 | &retransmissions_received, |
| 208 | &retransmissions_sent, |
| 209 | &consent_requests_received, |
| 210 | &consent_requests_sent, |
| 211 | &consent_responses_received, |
Taylor Brandstetter | 79326ea | 2021-09-28 15:09:53 -0700 | [diff] [blame] | 212 | &consent_responses_sent, |
| 213 | &packets_discarded_on_send, |
| 214 | &bytes_discarded_on_send) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 215 | // clang-format on |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 216 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 217 | RTCIceCandidatePairStats::RTCIceCandidatePairStats(const std::string& id, |
| 218 | int64_t timestamp_us) |
| 219 | : RTCIceCandidatePairStats(std::string(id), timestamp_us) {} |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 220 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 221 | RTCIceCandidatePairStats::RTCIceCandidatePairStats(std::string&& id, |
| 222 | int64_t timestamp_us) |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 223 | : RTCStats(std::move(id), timestamp_us), |
| 224 | transport_id("transportId"), |
| 225 | local_candidate_id("localCandidateId"), |
| 226 | remote_candidate_id("remoteCandidateId"), |
| 227 | state("state"), |
| 228 | priority("priority"), |
| 229 | nominated("nominated"), |
| 230 | writable("writable"), |
| 231 | readable("readable"), |
Taylor Brandstetter | 79326ea | 2021-09-28 15:09:53 -0700 | [diff] [blame] | 232 | packets_sent("packetsSent"), |
| 233 | packets_received("packetsReceived"), |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 234 | bytes_sent("bytesSent"), |
| 235 | bytes_received("bytesReceived"), |
hbos | 3168c7a | 2016-12-15 06:17:08 -0800 | [diff] [blame] | 236 | total_round_trip_time("totalRoundTripTime"), |
| 237 | current_round_trip_time("currentRoundTripTime"), |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 238 | available_outgoing_bitrate("availableOutgoingBitrate"), |
| 239 | available_incoming_bitrate("availableIncomingBitrate"), |
| 240 | requests_received("requestsReceived"), |
| 241 | requests_sent("requestsSent"), |
| 242 | responses_received("responsesReceived"), |
| 243 | responses_sent("responsesSent"), |
| 244 | retransmissions_received("retransmissionsReceived"), |
| 245 | retransmissions_sent("retransmissionsSent"), |
| 246 | consent_requests_received("consentRequestsReceived"), |
| 247 | consent_requests_sent("consentRequestsSent"), |
| 248 | consent_responses_received("consentResponsesReceived"), |
Taylor Brandstetter | 79326ea | 2021-09-28 15:09:53 -0700 | [diff] [blame] | 249 | consent_responses_sent("consentResponsesSent"), |
| 250 | packets_discarded_on_send("packetsDiscardedOnSend"), |
| 251 | bytes_discarded_on_send("bytesDiscardedOnSend") {} |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 252 | |
| 253 | RTCIceCandidatePairStats::RTCIceCandidatePairStats( |
| 254 | const RTCIceCandidatePairStats& other) |
| 255 | : RTCStats(other.id(), other.timestamp_us()), |
| 256 | transport_id(other.transport_id), |
| 257 | local_candidate_id(other.local_candidate_id), |
| 258 | remote_candidate_id(other.remote_candidate_id), |
| 259 | state(other.state), |
| 260 | priority(other.priority), |
| 261 | nominated(other.nominated), |
| 262 | writable(other.writable), |
| 263 | readable(other.readable), |
Taylor Brandstetter | 79326ea | 2021-09-28 15:09:53 -0700 | [diff] [blame] | 264 | packets_sent(other.packets_sent), |
| 265 | packets_received(other.packets_received), |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 266 | bytes_sent(other.bytes_sent), |
| 267 | bytes_received(other.bytes_received), |
hbos | 3168c7a | 2016-12-15 06:17:08 -0800 | [diff] [blame] | 268 | total_round_trip_time(other.total_round_trip_time), |
| 269 | current_round_trip_time(other.current_round_trip_time), |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 270 | available_outgoing_bitrate(other.available_outgoing_bitrate), |
| 271 | available_incoming_bitrate(other.available_incoming_bitrate), |
| 272 | requests_received(other.requests_received), |
| 273 | requests_sent(other.requests_sent), |
| 274 | responses_received(other.responses_received), |
| 275 | responses_sent(other.responses_sent), |
| 276 | retransmissions_received(other.retransmissions_received), |
| 277 | retransmissions_sent(other.retransmissions_sent), |
| 278 | consent_requests_received(other.consent_requests_received), |
| 279 | consent_requests_sent(other.consent_requests_sent), |
| 280 | consent_responses_received(other.consent_responses_received), |
Taylor Brandstetter | 79326ea | 2021-09-28 15:09:53 -0700 | [diff] [blame] | 281 | consent_responses_sent(other.consent_responses_sent), |
| 282 | packets_discarded_on_send(other.packets_discarded_on_send), |
| 283 | bytes_discarded_on_send(other.bytes_discarded_on_send) {} |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 284 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 285 | RTCIceCandidatePairStats::~RTCIceCandidatePairStats() {} |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 286 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 287 | // clang-format off |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 288 | WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "abstract-ice-candidate", |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 289 | &transport_id, |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 290 | &is_remote, |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 291 | &network_type, |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 292 | &ip, |
Philipp Hancke | a9ba450 | 2021-03-22 13:22:54 +0100 | [diff] [blame] | 293 | &address, |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 294 | &port, |
| 295 | &protocol, |
Philipp Hancke | 9551375 | 2018-09-27 14:40:08 +0200 | [diff] [blame] | 296 | &relay_protocol, |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 297 | &candidate_type, |
| 298 | &priority, |
Jonas Oreland | 0d13bbd | 2022-03-02 11:17:36 +0100 | [diff] [blame] | 299 | &url, |
| 300 | &vpn, |
| 301 | &network_adapter_type) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 302 | // clang-format on |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 303 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 304 | RTCIceCandidateStats::RTCIceCandidateStats(const std::string& id, |
| 305 | int64_t timestamp_us, |
| 306 | bool is_remote) |
| 307 | : RTCIceCandidateStats(std::string(id), timestamp_us, is_remote) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 308 | |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 309 | RTCIceCandidateStats::RTCIceCandidateStats(std::string&& id, |
| 310 | int64_t timestamp_us, |
| 311 | bool is_remote) |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 312 | : RTCStats(std::move(id), timestamp_us), |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 313 | transport_id("transportId"), |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 314 | is_remote("isRemote", is_remote), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 315 | network_type("networkType"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 316 | ip("ip"), |
Philipp Hancke | a9ba450 | 2021-03-22 13:22:54 +0100 | [diff] [blame] | 317 | address("address"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 318 | port("port"), |
| 319 | protocol("protocol"), |
Philipp Hancke | 9551375 | 2018-09-27 14:40:08 +0200 | [diff] [blame] | 320 | relay_protocol("relayProtocol"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 321 | candidate_type("candidateType"), |
| 322 | priority("priority"), |
Jonas Oreland | 0d13bbd | 2022-03-02 11:17:36 +0100 | [diff] [blame] | 323 | url("url"), |
| 324 | vpn("vpn"), |
| 325 | network_adapter_type("networkAdapterType") {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 326 | |
| 327 | RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other) |
| 328 | : RTCStats(other.id(), other.timestamp_us()), |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 329 | transport_id(other.transport_id), |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 330 | is_remote(other.is_remote), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 331 | network_type(other.network_type), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 332 | ip(other.ip), |
Philipp Hancke | a9ba450 | 2021-03-22 13:22:54 +0100 | [diff] [blame] | 333 | address(other.address), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 334 | port(other.port), |
| 335 | protocol(other.protocol), |
Philipp Hancke | 9551375 | 2018-09-27 14:40:08 +0200 | [diff] [blame] | 336 | relay_protocol(other.relay_protocol), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 337 | candidate_type(other.candidate_type), |
| 338 | priority(other.priority), |
Jonas Oreland | 0d13bbd | 2022-03-02 11:17:36 +0100 | [diff] [blame] | 339 | url(other.url), |
| 340 | vpn(other.vpn), |
| 341 | network_adapter_type(other.network_adapter_type) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 342 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 343 | RTCIceCandidateStats::~RTCIceCandidateStats() {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 344 | |
| 345 | const char RTCLocalIceCandidateStats::kType[] = "local-candidate"; |
| 346 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 347 | RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(const std::string& id, |
| 348 | int64_t timestamp_us) |
| 349 | : RTCIceCandidateStats(id, timestamp_us, false) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 350 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 351 | RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(std::string&& id, |
| 352 | int64_t timestamp_us) |
| 353 | : RTCIceCandidateStats(std::move(id), timestamp_us, false) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 354 | |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 355 | std::unique_ptr<RTCStats> RTCLocalIceCandidateStats::copy() const { |
| 356 | return std::unique_ptr<RTCStats>(new RTCLocalIceCandidateStats(*this)); |
| 357 | } |
| 358 | |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 359 | const char* RTCLocalIceCandidateStats::type() const { |
| 360 | return kType; |
| 361 | } |
| 362 | |
| 363 | const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate"; |
| 364 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 365 | RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(const std::string& id, |
| 366 | int64_t timestamp_us) |
| 367 | : RTCIceCandidateStats(id, timestamp_us, true) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 368 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 369 | RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(std::string&& id, |
| 370 | int64_t timestamp_us) |
| 371 | : RTCIceCandidateStats(std::move(id), timestamp_us, true) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 372 | |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 373 | std::unique_ptr<RTCStats> RTCRemoteIceCandidateStats::copy() const { |
| 374 | return std::unique_ptr<RTCStats>(new RTCRemoteIceCandidateStats(*this)); |
| 375 | } |
| 376 | |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 377 | const char* RTCRemoteIceCandidateStats::type() const { |
| 378 | return kType; |
| 379 | } |
| 380 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 381 | // clang-format off |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 382 | WEBRTC_RTCSTATS_IMPL(RTCMediaStreamStats, RTCStats, "stream", |
| 383 | &stream_identifier, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 384 | &track_ids) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 385 | // clang-format on |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 386 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 387 | RTCMediaStreamStats::RTCMediaStreamStats(const std::string& id, |
| 388 | int64_t timestamp_us) |
| 389 | : RTCMediaStreamStats(std::string(id), timestamp_us) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 390 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 391 | RTCMediaStreamStats::RTCMediaStreamStats(std::string&& id, int64_t timestamp_us) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 392 | : RTCStats(std::move(id), timestamp_us), |
| 393 | stream_identifier("streamIdentifier"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 394 | track_ids("trackIds") {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 395 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 396 | RTCMediaStreamStats::RTCMediaStreamStats(const RTCMediaStreamStats& other) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 397 | : RTCStats(other.id(), other.timestamp_us()), |
| 398 | stream_identifier(other.stream_identifier), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 399 | track_ids(other.track_ids) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 400 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 401 | RTCMediaStreamStats::~RTCMediaStreamStats() {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 402 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 403 | // clang-format off |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 404 | WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track", |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 405 | &track_identifier, |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 406 | &media_source_id, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 407 | &remote_source, |
| 408 | &ended, |
| 409 | &detached, |
| 410 | &kind, |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 411 | &jitter_buffer_delay, |
Chen Xing | 0acffb5 | 2019-01-15 15:46:29 +0100 | [diff] [blame] | 412 | &jitter_buffer_emitted_count, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 413 | &frame_width, |
| 414 | &frame_height, |
| 415 | &frames_per_second, |
| 416 | &frames_sent, |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 417 | &huge_frames_sent, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 418 | &frames_received, |
| 419 | &frames_decoded, |
| 420 | &frames_dropped, |
| 421 | &frames_corrupted, |
| 422 | &partial_frames_lost, |
| 423 | &full_frames_lost, |
| 424 | &audio_level, |
| 425 | &total_audio_energy, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 426 | &echo_return_loss, |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 427 | &echo_return_loss_enhancement, |
| 428 | &total_samples_received, |
| 429 | &total_samples_duration, |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 430 | &concealed_samples, |
Henrik Boström | 21e99da | 2019-08-21 12:09:51 +0200 | [diff] [blame] | 431 | &silent_concealed_samples, |
Ruslan Burakov | 8af8896 | 2018-11-22 17:21:10 +0100 | [diff] [blame] | 432 | &concealment_events, |
Henrik Boström | 21e99da | 2019-08-21 12:09:51 +0200 | [diff] [blame] | 433 | &inserted_samples_for_deceleration, |
| 434 | &removed_samples_for_acceleration, |
Jakob Ivarsson | 352ce5c | 2018-11-27 12:52:16 +0100 | [diff] [blame] | 435 | &jitter_buffer_flushes, |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 436 | &delayed_packet_outage_samples, |
Jakob Ivarsson | 232b3fd | 2019-03-06 09:18:40 +0100 | [diff] [blame] | 437 | &relative_packet_arrival_delay, |
Artem Titov | e618cc9 | 2020-03-11 11:18:54 +0100 | [diff] [blame] | 438 | &jitter_buffer_target_delay, |
Henrik Lundin | 44125fa | 2019-04-29 17:00:46 +0200 | [diff] [blame] | 439 | &interruption_count, |
| 440 | &total_interruption_duration, |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 441 | &freeze_count, |
| 442 | &pause_count, |
| 443 | &total_freezes_duration, |
| 444 | &total_pauses_duration, |
| 445 | &total_frames_duration, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 446 | &sum_squared_frame_durations) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 447 | // clang-format on |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 448 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 449 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(const std::string& id, |
| 450 | int64_t timestamp_us, |
| 451 | const char* kind) |
| 452 | : RTCMediaStreamTrackStats(std::string(id), timestamp_us, kind) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 453 | |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 454 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(std::string&& id, |
| 455 | int64_t timestamp_us, |
| 456 | const char* kind) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 457 | : RTCStats(std::move(id), timestamp_us), |
| 458 | track_identifier("trackIdentifier"), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 459 | media_source_id("mediaSourceId"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 460 | remote_source("remoteSource"), |
| 461 | ended("ended"), |
| 462 | detached("detached"), |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 463 | kind("kind", kind), |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 464 | jitter_buffer_delay("jitterBufferDelay"), |
Chen Xing | 0acffb5 | 2019-01-15 15:46:29 +0100 | [diff] [blame] | 465 | jitter_buffer_emitted_count("jitterBufferEmittedCount"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 466 | frame_width("frameWidth"), |
| 467 | frame_height("frameHeight"), |
| 468 | frames_per_second("framesPerSecond"), |
| 469 | frames_sent("framesSent"), |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 470 | huge_frames_sent("hugeFramesSent"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 471 | frames_received("framesReceived"), |
| 472 | frames_decoded("framesDecoded"), |
| 473 | frames_dropped("framesDropped"), |
| 474 | frames_corrupted("framesCorrupted"), |
| 475 | partial_frames_lost("partialFramesLost"), |
| 476 | full_frames_lost("fullFramesLost"), |
| 477 | audio_level("audioLevel"), |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 478 | total_audio_energy("totalAudioEnergy"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 479 | echo_return_loss("echoReturnLoss"), |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 480 | echo_return_loss_enhancement("echoReturnLossEnhancement"), |
| 481 | total_samples_received("totalSamplesReceived"), |
| 482 | total_samples_duration("totalSamplesDuration"), |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 483 | concealed_samples("concealedSamples"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 484 | silent_concealed_samples("silentConcealedSamples"), |
Ruslan Burakov | 8af8896 | 2018-11-22 17:21:10 +0100 | [diff] [blame] | 485 | concealment_events("concealmentEvents"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 486 | inserted_samples_for_deceleration("insertedSamplesForDeceleration"), |
| 487 | removed_samples_for_acceleration("removedSamplesForAcceleration"), |
Jakob Ivarsson | 758d946 | 2019-03-19 15:38:49 +0100 | [diff] [blame] | 488 | jitter_buffer_flushes( |
| 489 | "jitterBufferFlushes", |
| 490 | {NonStandardGroupId::kRtcAudioJitterBufferMaxPackets}), |
| 491 | delayed_packet_outage_samples( |
| 492 | "delayedPacketOutageSamples", |
| 493 | {NonStandardGroupId::kRtcAudioJitterBufferMaxPackets, |
| 494 | NonStandardGroupId::kRtcStatsRelativePacketArrivalDelay}), |
| 495 | relative_packet_arrival_delay( |
| 496 | "relativePacketArrivalDelay", |
| 497 | {NonStandardGroupId::kRtcStatsRelativePacketArrivalDelay}), |
Artem Titov | e618cc9 | 2020-03-11 11:18:54 +0100 | [diff] [blame] | 498 | jitter_buffer_target_delay("jitterBufferTargetDelay"), |
Henrik Lundin | 44125fa | 2019-04-29 17:00:46 +0200 | [diff] [blame] | 499 | interruption_count("interruptionCount"), |
| 500 | total_interruption_duration("totalInterruptionDuration"), |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 501 | freeze_count("freezeCount"), |
| 502 | pause_count("pauseCount"), |
| 503 | total_freezes_duration("totalFreezesDuration"), |
| 504 | total_pauses_duration("totalPausesDuration"), |
| 505 | total_frames_duration("totalFramesDuration"), |
| 506 | sum_squared_frame_durations("sumOfSquaredFramesDuration") { |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 507 | RTC_DCHECK(kind == RTCMediaStreamTrackKind::kAudio || |
| 508 | kind == RTCMediaStreamTrackKind::kVideo); |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 509 | } |
| 510 | |
| 511 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( |
| 512 | const RTCMediaStreamTrackStats& other) |
| 513 | : RTCStats(other.id(), other.timestamp_us()), |
| 514 | track_identifier(other.track_identifier), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 515 | media_source_id(other.media_source_id), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 516 | remote_source(other.remote_source), |
| 517 | ended(other.ended), |
| 518 | detached(other.detached), |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 519 | kind(other.kind), |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 520 | jitter_buffer_delay(other.jitter_buffer_delay), |
Chen Xing | 0acffb5 | 2019-01-15 15:46:29 +0100 | [diff] [blame] | 521 | jitter_buffer_emitted_count(other.jitter_buffer_emitted_count), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 522 | frame_width(other.frame_width), |
| 523 | frame_height(other.frame_height), |
| 524 | frames_per_second(other.frames_per_second), |
| 525 | frames_sent(other.frames_sent), |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 526 | huge_frames_sent(other.huge_frames_sent), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 527 | frames_received(other.frames_received), |
| 528 | frames_decoded(other.frames_decoded), |
| 529 | frames_dropped(other.frames_dropped), |
| 530 | frames_corrupted(other.frames_corrupted), |
| 531 | partial_frames_lost(other.partial_frames_lost), |
| 532 | full_frames_lost(other.full_frames_lost), |
| 533 | audio_level(other.audio_level), |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 534 | total_audio_energy(other.total_audio_energy), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 535 | echo_return_loss(other.echo_return_loss), |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 536 | echo_return_loss_enhancement(other.echo_return_loss_enhancement), |
| 537 | total_samples_received(other.total_samples_received), |
| 538 | total_samples_duration(other.total_samples_duration), |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 539 | concealed_samples(other.concealed_samples), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 540 | silent_concealed_samples(other.silent_concealed_samples), |
Ruslan Burakov | 8af8896 | 2018-11-22 17:21:10 +0100 | [diff] [blame] | 541 | concealment_events(other.concealment_events), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 542 | inserted_samples_for_deceleration( |
| 543 | other.inserted_samples_for_deceleration), |
| 544 | removed_samples_for_acceleration(other.removed_samples_for_acceleration), |
Jakob Ivarsson | 352ce5c | 2018-11-27 12:52:16 +0100 | [diff] [blame] | 545 | jitter_buffer_flushes(other.jitter_buffer_flushes), |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 546 | delayed_packet_outage_samples(other.delayed_packet_outage_samples), |
Jakob Ivarsson | 232b3fd | 2019-03-06 09:18:40 +0100 | [diff] [blame] | 547 | relative_packet_arrival_delay(other.relative_packet_arrival_delay), |
Artem Titov | e618cc9 | 2020-03-11 11:18:54 +0100 | [diff] [blame] | 548 | jitter_buffer_target_delay(other.jitter_buffer_target_delay), |
Henrik Lundin | 44125fa | 2019-04-29 17:00:46 +0200 | [diff] [blame] | 549 | interruption_count(other.interruption_count), |
| 550 | total_interruption_duration(other.total_interruption_duration), |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 551 | freeze_count(other.freeze_count), |
| 552 | pause_count(other.pause_count), |
| 553 | total_freezes_duration(other.total_freezes_duration), |
| 554 | total_pauses_duration(other.total_pauses_duration), |
| 555 | total_frames_duration(other.total_frames_duration), |
| 556 | sum_squared_frame_durations(other.sum_squared_frame_durations) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 557 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 558 | RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 559 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 560 | // clang-format off |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 561 | WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection", |
| 562 | &data_channels_opened, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 563 | &data_channels_closed) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 564 | // clang-format on |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 565 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 566 | RTCPeerConnectionStats::RTCPeerConnectionStats(const std::string& id, |
| 567 | int64_t timestamp_us) |
| 568 | : RTCPeerConnectionStats(std::string(id), timestamp_us) {} |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 569 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 570 | RTCPeerConnectionStats::RTCPeerConnectionStats(std::string&& id, |
| 571 | int64_t timestamp_us) |
hbos | 0e6758d | 2016-08-31 07:57:36 -0700 | [diff] [blame] | 572 | : RTCStats(std::move(id), timestamp_us), |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 573 | data_channels_opened("dataChannelsOpened"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 574 | data_channels_closed("dataChannelsClosed") {} |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 575 | |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 576 | RTCPeerConnectionStats::RTCPeerConnectionStats( |
| 577 | const RTCPeerConnectionStats& other) |
| 578 | : RTCStats(other.id(), other.timestamp_us()), |
| 579 | data_channels_opened(other.data_channels_opened), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 580 | data_channels_closed(other.data_channels_closed) {} |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 581 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 582 | RTCPeerConnectionStats::~RTCPeerConnectionStats() {} |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 583 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 584 | // clang-format off |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 585 | WEBRTC_RTCSTATS_IMPL(RTCRTPStreamStats, RTCStats, "rtp", |
| 586 | &ssrc, |
Philipp Hancke | 3bc0166 | 2018-08-28 14:55:03 +0200 | [diff] [blame] | 587 | &kind, |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 588 | &track_id, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 589 | &transport_id, |
| 590 | &codec_id, |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 591 | &media_type) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 592 | // clang-format on |
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(const std::string& id, |
| 595 | int64_t timestamp_us) |
| 596 | : RTCRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 597 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 598 | RTCRTPStreamStats::RTCRTPStreamStats(std::string&& id, int64_t timestamp_us) |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 599 | : RTCStats(std::move(id), timestamp_us), |
| 600 | ssrc("ssrc"), |
Philipp Hancke | 3bc0166 | 2018-08-28 14:55:03 +0200 | [diff] [blame] | 601 | kind("kind"), |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 602 | track_id("trackId"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 603 | transport_id("transportId"), |
| 604 | codec_id("codecId"), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 605 | media_type("mediaType") {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 606 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 607 | RTCRTPStreamStats::RTCRTPStreamStats(const RTCRTPStreamStats& other) |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 608 | : RTCStats(other.id(), other.timestamp_us()), |
| 609 | ssrc(other.ssrc), |
Philipp Hancke | 3bc0166 | 2018-08-28 14:55:03 +0200 | [diff] [blame] | 610 | kind(other.kind), |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 611 | track_id(other.track_id), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 612 | transport_id(other.transport_id), |
| 613 | codec_id(other.codec_id), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 614 | media_type(other.media_type) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 615 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 616 | RTCRTPStreamStats::~RTCRTPStreamStats() {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 617 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 618 | // clang-format off |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 619 | WEBRTC_RTCSTATS_IMPL( |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 620 | RTCReceivedRtpStreamStats, RTCRTPStreamStats, "received-rtp", |
| 621 | &jitter, |
Minyue Li | 28a2c63 | 2021-07-07 15:53:38 +0200 | [diff] [blame] | 622 | &packets_lost, |
| 623 | &packets_discarded) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 624 | // clang-format on |
| 625 | |
| 626 | RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(const std::string&& id, |
| 627 | int64_t timestamp_us) |
| 628 | : RTCReceivedRtpStreamStats(std::string(id), timestamp_us) {} |
| 629 | |
| 630 | RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(std::string&& id, |
| 631 | int64_t timestamp_us) |
| 632 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
| 633 | jitter("jitter"), |
Minyue Li | 28a2c63 | 2021-07-07 15:53:38 +0200 | [diff] [blame] | 634 | packets_lost("packetsLost"), |
| 635 | packets_discarded("packetsDiscarded") {} |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 636 | |
| 637 | RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats( |
| 638 | const RTCReceivedRtpStreamStats& other) |
| 639 | : RTCRTPStreamStats(other), |
| 640 | jitter(other.jitter), |
Minyue Li | 28a2c63 | 2021-07-07 15:53:38 +0200 | [diff] [blame] | 641 | packets_lost(other.packets_lost), |
| 642 | packets_discarded(other.packets_discarded) {} |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 643 | |
| 644 | RTCReceivedRtpStreamStats::~RTCReceivedRtpStreamStats() {} |
| 645 | |
| 646 | // clang-format off |
| 647 | WEBRTC_RTCSTATS_IMPL( |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 648 | RTCSentRtpStreamStats, RTCRTPStreamStats, "sent-rtp", |
| 649 | &packets_sent, |
| 650 | &bytes_sent) |
| 651 | // clang-format on |
| 652 | |
| 653 | RTCSentRtpStreamStats::RTCSentRtpStreamStats(const std::string&& id, |
| 654 | int64_t timestamp_us) |
| 655 | : RTCSentRtpStreamStats(std::string(id), timestamp_us) {} |
| 656 | |
| 657 | RTCSentRtpStreamStats::RTCSentRtpStreamStats(std::string&& id, |
| 658 | int64_t timestamp_us) |
| 659 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
| 660 | packets_sent("packetsSent"), |
| 661 | bytes_sent("bytesSent") {} |
| 662 | |
| 663 | RTCSentRtpStreamStats::RTCSentRtpStreamStats(const RTCSentRtpStreamStats& other) |
| 664 | : RTCRTPStreamStats(other), |
| 665 | packets_sent(other.packets_sent), |
| 666 | bytes_sent(other.bytes_sent) {} |
| 667 | |
| 668 | RTCSentRtpStreamStats::~RTCSentRtpStreamStats() {} |
| 669 | |
| 670 | // clang-format off |
| 671 | WEBRTC_RTCSTATS_IMPL( |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 672 | RTCInboundRTPStreamStats, RTCReceivedRtpStreamStats, "inbound-rtp", |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 673 | &remote_id, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 674 | &packets_received, |
Henrik Boström | 4a5dab0 | 2020-01-28 11:15:35 +0100 | [diff] [blame] | 675 | &fec_packets_received, |
| 676 | &fec_packets_discarded, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 677 | &bytes_received, |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 678 | &header_bytes_received, |
Henrik Boström | 01738c6 | 2019-04-15 17:32:00 +0200 | [diff] [blame] | 679 | &last_packet_received_timestamp, |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 680 | &jitter_buffer_delay, |
| 681 | &jitter_buffer_emitted_count, |
| 682 | &total_samples_received, |
| 683 | &concealed_samples, |
| 684 | &silent_concealed_samples, |
| 685 | &concealment_events, |
| 686 | &inserted_samples_for_deceleration, |
| 687 | &removed_samples_for_acceleration, |
| 688 | &audio_level, |
| 689 | &total_audio_energy, |
| 690 | &total_samples_duration, |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 691 | &round_trip_time, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 692 | &packets_repaired, |
| 693 | &burst_packets_lost, |
| 694 | &burst_packets_discarded, |
| 695 | &burst_loss_count, |
| 696 | &burst_discard_count, |
| 697 | &burst_loss_rate, |
| 698 | &burst_discard_rate, |
| 699 | &gap_loss_rate, |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 700 | &gap_discard_rate, |
Philipp Hancke | a16a6a6 | 2022-04-25 12:21:30 +0200 | [diff] [blame] | 701 | &frames_received, |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 702 | &frame_width, |
| 703 | &frame_height, |
| 704 | &frame_bit_depth, |
| 705 | &frames_per_second, |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 706 | &frames_decoded, |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 707 | &key_frames_decoded, |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 708 | &frames_dropped, |
Johannes Kron | bfd343b | 2019-07-01 10:07:50 +0200 | [diff] [blame] | 709 | &total_decode_time, |
Philipp Hancke | a16a6a6 | 2022-04-25 12:21:30 +0200 | [diff] [blame] | 710 | &total_processing_delay, |
Philipp Hancke | 0359ba2 | 2022-05-05 15:55:36 +0200 | [diff] [blame] | 711 | &total_assembly_time, |
| 712 | &frames_assembled_from_multiple_packets, |
Johannes Kron | 00376e1 | 2019-11-25 10:25:42 +0100 | [diff] [blame] | 713 | &total_inter_frame_delay, |
| 714 | &total_squared_inter_frame_delay, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 715 | &content_type, |
Ă…sa Persson | fcf79cc | 2019-10-22 15:23:44 +0200 | [diff] [blame] | 716 | &estimated_playout_timestamp, |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 717 | &decoder_implementation, |
| 718 | &fir_count, |
| 719 | &pli_count, |
| 720 | &nack_count, |
Di Wu | ef036cd | 2021-03-19 08:24:41 -0700 | [diff] [blame] | 721 | &qp_sum) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 722 | // clang-format on |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 723 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 724 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(const std::string& id, |
| 725 | int64_t timestamp_us) |
| 726 | : RTCInboundRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 727 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 728 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(std::string&& id, |
| 729 | int64_t timestamp_us) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 730 | : RTCReceivedRtpStreamStats(std::move(id), timestamp_us), |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 731 | remote_id("remoteId"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 732 | packets_received("packetsReceived"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 733 | fec_packets_received("fecPacketsReceived"), |
| 734 | fec_packets_discarded("fecPacketsDiscarded"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 735 | bytes_received("bytesReceived"), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 736 | header_bytes_received("headerBytesReceived"), |
Henrik Boström | 01738c6 | 2019-04-15 17:32:00 +0200 | [diff] [blame] | 737 | last_packet_received_timestamp("lastPacketReceivedTimestamp"), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 738 | jitter_buffer_delay("jitterBufferDelay"), |
| 739 | jitter_buffer_emitted_count("jitterBufferEmittedCount"), |
| 740 | total_samples_received("totalSamplesReceived"), |
| 741 | concealed_samples("concealedSamples"), |
| 742 | silent_concealed_samples("silentConcealedSamples"), |
| 743 | concealment_events("concealmentEvents"), |
| 744 | inserted_samples_for_deceleration("insertedSamplesForDeceleration"), |
| 745 | removed_samples_for_acceleration("removedSamplesForAcceleration"), |
| 746 | audio_level("audioLevel"), |
| 747 | total_audio_energy("totalAudioEnergy"), |
| 748 | total_samples_duration("totalSamplesDuration"), |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 749 | round_trip_time("roundTripTime"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 750 | packets_repaired("packetsRepaired"), |
| 751 | burst_packets_lost("burstPacketsLost"), |
| 752 | burst_packets_discarded("burstPacketsDiscarded"), |
| 753 | burst_loss_count("burstLossCount"), |
| 754 | burst_discard_count("burstDiscardCount"), |
| 755 | burst_loss_rate("burstLossRate"), |
| 756 | burst_discard_rate("burstDiscardRate"), |
| 757 | gap_loss_rate("gapLossRate"), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 758 | gap_discard_rate("gapDiscardRate"), |
Philipp Hancke | a16a6a6 | 2022-04-25 12:21:30 +0200 | [diff] [blame] | 759 | frames_received("framesReceived"), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 760 | frame_width("frameWidth"), |
| 761 | frame_height("frameHeight"), |
| 762 | frame_bit_depth("frameBitDepth"), |
| 763 | frames_per_second("framesPerSecond"), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 764 | frames_decoded("framesDecoded"), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 765 | key_frames_decoded("keyFramesDecoded"), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 766 | frames_dropped("framesDropped"), |
Johannes Kron | bfd343b | 2019-07-01 10:07:50 +0200 | [diff] [blame] | 767 | total_decode_time("totalDecodeTime"), |
Philipp Hancke | a16a6a6 | 2022-04-25 12:21:30 +0200 | [diff] [blame] | 768 | total_processing_delay("totalProcessingDelay"), |
Philipp Hancke | 0359ba2 | 2022-05-05 15:55:36 +0200 | [diff] [blame] | 769 | total_assembly_time("totalAssemblyTime"), |
| 770 | frames_assembled_from_multiple_packets( |
| 771 | "framesAssembledFromMultiplePackets"), |
Johannes Kron | 00376e1 | 2019-11-25 10:25:42 +0100 | [diff] [blame] | 772 | total_inter_frame_delay("totalInterFrameDelay"), |
| 773 | total_squared_inter_frame_delay("totalSquaredInterFrameDelay"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 774 | content_type("contentType"), |
Ă…sa Persson | fcf79cc | 2019-10-22 15:23:44 +0200 | [diff] [blame] | 775 | estimated_playout_timestamp("estimatedPlayoutTimestamp"), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 776 | decoder_implementation("decoderImplementation"), |
| 777 | fir_count("firCount"), |
| 778 | pli_count("pliCount"), |
| 779 | nack_count("nackCount"), |
Di Wu | ef036cd | 2021-03-19 08:24:41 -0700 | [diff] [blame] | 780 | qp_sum("qpSum") {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 781 | |
| 782 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats( |
| 783 | const RTCInboundRTPStreamStats& other) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 784 | : RTCReceivedRtpStreamStats(other), |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 785 | remote_id(other.remote_id), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 786 | packets_received(other.packets_received), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 787 | fec_packets_received(other.fec_packets_received), |
| 788 | fec_packets_discarded(other.fec_packets_discarded), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 789 | bytes_received(other.bytes_received), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 790 | header_bytes_received(other.header_bytes_received), |
Henrik Boström | 01738c6 | 2019-04-15 17:32:00 +0200 | [diff] [blame] | 791 | last_packet_received_timestamp(other.last_packet_received_timestamp), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 792 | jitter_buffer_delay(other.jitter_buffer_delay), |
| 793 | jitter_buffer_emitted_count(other.jitter_buffer_emitted_count), |
| 794 | total_samples_received(other.total_samples_received), |
| 795 | concealed_samples(other.concealed_samples), |
| 796 | silent_concealed_samples(other.silent_concealed_samples), |
| 797 | concealment_events(other.concealment_events), |
| 798 | inserted_samples_for_deceleration( |
| 799 | other.inserted_samples_for_deceleration), |
| 800 | removed_samples_for_acceleration(other.removed_samples_for_acceleration), |
| 801 | audio_level(other.audio_level), |
| 802 | total_audio_energy(other.total_audio_energy), |
| 803 | total_samples_duration(other.total_samples_duration), |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 804 | round_trip_time(other.round_trip_time), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 805 | packets_repaired(other.packets_repaired), |
| 806 | burst_packets_lost(other.burst_packets_lost), |
| 807 | burst_packets_discarded(other.burst_packets_discarded), |
| 808 | burst_loss_count(other.burst_loss_count), |
| 809 | burst_discard_count(other.burst_discard_count), |
| 810 | burst_loss_rate(other.burst_loss_rate), |
| 811 | burst_discard_rate(other.burst_discard_rate), |
| 812 | gap_loss_rate(other.gap_loss_rate), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 813 | gap_discard_rate(other.gap_discard_rate), |
Philipp Hancke | a16a6a6 | 2022-04-25 12:21:30 +0200 | [diff] [blame] | 814 | frames_received(other.frames_received), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 815 | frame_width(other.frame_width), |
| 816 | frame_height(other.frame_height), |
| 817 | frame_bit_depth(other.frame_bit_depth), |
| 818 | frames_per_second(other.frames_per_second), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 819 | frames_decoded(other.frames_decoded), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 820 | key_frames_decoded(other.key_frames_decoded), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 821 | frames_dropped(other.frames_dropped), |
Johannes Kron | bfd343b | 2019-07-01 10:07:50 +0200 | [diff] [blame] | 822 | total_decode_time(other.total_decode_time), |
Philipp Hancke | a16a6a6 | 2022-04-25 12:21:30 +0200 | [diff] [blame] | 823 | total_processing_delay(other.total_processing_delay), |
Philipp Hancke | 0359ba2 | 2022-05-05 15:55:36 +0200 | [diff] [blame] | 824 | total_assembly_time(other.total_assembly_time), |
| 825 | frames_assembled_from_multiple_packets( |
| 826 | other.frames_assembled_from_multiple_packets), |
Johannes Kron | 00376e1 | 2019-11-25 10:25:42 +0100 | [diff] [blame] | 827 | total_inter_frame_delay(other.total_inter_frame_delay), |
| 828 | total_squared_inter_frame_delay(other.total_squared_inter_frame_delay), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 829 | content_type(other.content_type), |
Ă…sa Persson | fcf79cc | 2019-10-22 15:23:44 +0200 | [diff] [blame] | 830 | estimated_playout_timestamp(other.estimated_playout_timestamp), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 831 | decoder_implementation(other.decoder_implementation), |
| 832 | fir_count(other.fir_count), |
| 833 | pli_count(other.pli_count), |
| 834 | nack_count(other.nack_count), |
Di Wu | ef036cd | 2021-03-19 08:24:41 -0700 | [diff] [blame] | 835 | qp_sum(other.qp_sum) {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 836 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 837 | RTCInboundRTPStreamStats::~RTCInboundRTPStreamStats() {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 838 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 839 | // clang-format off |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 840 | WEBRTC_RTCSTATS_IMPL( |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 841 | RTCOutboundRTPStreamStats, RTCRTPStreamStats, "outbound-rtp", |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 842 | &media_source_id, |
Henrik Boström | 4f40fa5 | 2019-12-19 13:27:27 +0100 | [diff] [blame] | 843 | &remote_id, |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 844 | &rid, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 845 | &packets_sent, |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 846 | &retransmitted_packets_sent, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 847 | &bytes_sent, |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 848 | &header_bytes_sent, |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 849 | &retransmitted_bytes_sent, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 850 | &target_bitrate, |
Henrik Boström | f71362f | 2019-04-08 16:14:23 +0200 | [diff] [blame] | 851 | &frames_encoded, |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 852 | &key_frames_encoded, |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 853 | &total_encode_time, |
Henrik Boström | 23aff9b | 2019-05-20 15:15:38 +0200 | [diff] [blame] | 854 | &total_encoded_bytes_target, |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 855 | &frame_width, |
| 856 | &frame_height, |
| 857 | &frames_per_second, |
| 858 | &frames_sent, |
| 859 | &huge_frames_sent, |
Henrik Boström | 9fe1834 | 2019-05-16 18:38:20 +0200 | [diff] [blame] | 860 | &total_packet_send_delay, |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 861 | &quality_limitation_reason, |
Byoungchan Lee | 7d23535 | 2021-05-28 21:32:04 +0900 | [diff] [blame] | 862 | &quality_limitation_durations, |
Evan Shrubsole | cc62b16 | 2019-09-09 11:26:45 +0200 | [diff] [blame] | 863 | &quality_limitation_resolution_changes, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 864 | &content_type, |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 865 | &encoder_implementation, |
| 866 | &fir_count, |
| 867 | &pli_count, |
| 868 | &nack_count, |
Di Wu | ef036cd | 2021-03-19 08:24:41 -0700 | [diff] [blame] | 869 | &qp_sum) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 870 | // clang-format on |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 871 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 872 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(const std::string& id, |
| 873 | int64_t timestamp_us) |
| 874 | : RTCOutboundRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 875 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 876 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(std::string&& id, |
| 877 | int64_t timestamp_us) |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 878 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 879 | media_source_id("mediaSourceId"), |
Henrik Boström | 4f40fa5 | 2019-12-19 13:27:27 +0100 | [diff] [blame] | 880 | remote_id("remoteId"), |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 881 | rid("rid"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 882 | packets_sent("packetsSent"), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 883 | retransmitted_packets_sent("retransmittedPacketsSent"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 884 | bytes_sent("bytesSent"), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 885 | header_bytes_sent("headerBytesSent"), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 886 | retransmitted_bytes_sent("retransmittedBytesSent"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 887 | target_bitrate("targetBitrate"), |
Henrik Boström | f71362f | 2019-04-08 16:14:23 +0200 | [diff] [blame] | 888 | frames_encoded("framesEncoded"), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 889 | key_frames_encoded("keyFramesEncoded"), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 890 | total_encode_time("totalEncodeTime"), |
Henrik Boström | 23aff9b | 2019-05-20 15:15:38 +0200 | [diff] [blame] | 891 | total_encoded_bytes_target("totalEncodedBytesTarget"), |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 892 | frame_width("frameWidth"), |
| 893 | frame_height("frameHeight"), |
| 894 | frames_per_second("framesPerSecond"), |
| 895 | frames_sent("framesSent"), |
| 896 | huge_frames_sent("hugeFramesSent"), |
Henrik Boström | 9fe1834 | 2019-05-16 18:38:20 +0200 | [diff] [blame] | 897 | total_packet_send_delay("totalPacketSendDelay"), |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 898 | quality_limitation_reason("qualityLimitationReason"), |
Byoungchan Lee | 7d23535 | 2021-05-28 21:32:04 +0900 | [diff] [blame] | 899 | quality_limitation_durations("qualityLimitationDurations"), |
Evan Shrubsole | cc62b16 | 2019-09-09 11:26:45 +0200 | [diff] [blame] | 900 | quality_limitation_resolution_changes( |
| 901 | "qualityLimitationResolutionChanges"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 902 | content_type("contentType"), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 903 | encoder_implementation("encoderImplementation"), |
| 904 | fir_count("firCount"), |
| 905 | pli_count("pliCount"), |
| 906 | nack_count("nackCount"), |
Di Wu | ef036cd | 2021-03-19 08:24:41 -0700 | [diff] [blame] | 907 | qp_sum("qpSum") {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 908 | |
| 909 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats( |
| 910 | const RTCOutboundRTPStreamStats& other) |
| 911 | : RTCRTPStreamStats(other), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 912 | media_source_id(other.media_source_id), |
Henrik Boström | 4f40fa5 | 2019-12-19 13:27:27 +0100 | [diff] [blame] | 913 | remote_id(other.remote_id), |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 914 | rid(other.rid), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 915 | packets_sent(other.packets_sent), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 916 | retransmitted_packets_sent(other.retransmitted_packets_sent), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 917 | bytes_sent(other.bytes_sent), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 918 | header_bytes_sent(other.header_bytes_sent), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 919 | retransmitted_bytes_sent(other.retransmitted_bytes_sent), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 920 | target_bitrate(other.target_bitrate), |
Henrik Boström | f71362f | 2019-04-08 16:14:23 +0200 | [diff] [blame] | 921 | frames_encoded(other.frames_encoded), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 922 | key_frames_encoded(other.key_frames_encoded), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 923 | total_encode_time(other.total_encode_time), |
Henrik Boström | 23aff9b | 2019-05-20 15:15:38 +0200 | [diff] [blame] | 924 | total_encoded_bytes_target(other.total_encoded_bytes_target), |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 925 | frame_width(other.frame_width), |
| 926 | frame_height(other.frame_height), |
| 927 | frames_per_second(other.frames_per_second), |
| 928 | frames_sent(other.frames_sent), |
| 929 | huge_frames_sent(other.huge_frames_sent), |
Henrik Boström | 9fe1834 | 2019-05-16 18:38:20 +0200 | [diff] [blame] | 930 | total_packet_send_delay(other.total_packet_send_delay), |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 931 | quality_limitation_reason(other.quality_limitation_reason), |
Byoungchan Lee | 7d23535 | 2021-05-28 21:32:04 +0900 | [diff] [blame] | 932 | quality_limitation_durations(other.quality_limitation_durations), |
Evan Shrubsole | cc62b16 | 2019-09-09 11:26:45 +0200 | [diff] [blame] | 933 | quality_limitation_resolution_changes( |
| 934 | other.quality_limitation_resolution_changes), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 935 | content_type(other.content_type), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 936 | encoder_implementation(other.encoder_implementation), |
| 937 | fir_count(other.fir_count), |
| 938 | pli_count(other.pli_count), |
| 939 | nack_count(other.nack_count), |
Di Wu | ef036cd | 2021-03-19 08:24:41 -0700 | [diff] [blame] | 940 | qp_sum(other.qp_sum) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 941 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 942 | RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 943 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 944 | // clang-format off |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 945 | WEBRTC_RTCSTATS_IMPL( |
Henrik Boström | 2f71b61 | 2021-03-23 15:18:55 +0100 | [diff] [blame] | 946 | RTCRemoteInboundRtpStreamStats, RTCReceivedRtpStreamStats, |
| 947 | "remote-inbound-rtp", |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 948 | &local_id, |
Di Wu | 86f04ad | 2021-02-28 23:36:03 -0800 | [diff] [blame] | 949 | &round_trip_time, |
Di Wu | 88a51b2 | 2021-03-01 11:22:06 -0800 | [diff] [blame] | 950 | &fraction_lost, |
| 951 | &total_round_trip_time, |
| 952 | &round_trip_time_measurements) |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 953 | // clang-format on |
| 954 | |
| 955 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 956 | const std::string& id, |
| 957 | int64_t timestamp_us) |
| 958 | : RTCRemoteInboundRtpStreamStats(std::string(id), timestamp_us) {} |
| 959 | |
| 960 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 961 | std::string&& id, |
| 962 | int64_t timestamp_us) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 963 | : RTCReceivedRtpStreamStats(std::move(id), timestamp_us), |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 964 | local_id("localId"), |
Di Wu | 86f04ad | 2021-02-28 23:36:03 -0800 | [diff] [blame] | 965 | round_trip_time("roundTripTime"), |
Di Wu | 88a51b2 | 2021-03-01 11:22:06 -0800 | [diff] [blame] | 966 | fraction_lost("fractionLost"), |
| 967 | total_round_trip_time("totalRoundTripTime"), |
| 968 | round_trip_time_measurements("roundTripTimeMeasurements") {} |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 969 | |
| 970 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 971 | const RTCRemoteInboundRtpStreamStats& other) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 972 | : RTCReceivedRtpStreamStats(other), |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 973 | local_id(other.local_id), |
Di Wu | 86f04ad | 2021-02-28 23:36:03 -0800 | [diff] [blame] | 974 | round_trip_time(other.round_trip_time), |
Di Wu | 88a51b2 | 2021-03-01 11:22:06 -0800 | [diff] [blame] | 975 | fraction_lost(other.fraction_lost), |
| 976 | total_round_trip_time(other.total_round_trip_time), |
| 977 | round_trip_time_measurements(other.round_trip_time_measurements) {} |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 978 | |
| 979 | RTCRemoteInboundRtpStreamStats::~RTCRemoteInboundRtpStreamStats() {} |
| 980 | |
| 981 | // clang-format off |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 982 | WEBRTC_RTCSTATS_IMPL( |
| 983 | RTCRemoteOutboundRtpStreamStats, RTCSentRtpStreamStats, |
| 984 | "remote-outbound-rtp", |
| 985 | &local_id, |
| 986 | &remote_timestamp, |
Ivo Creusen | 2562cf0 | 2021-09-03 14:51:22 +0000 | [diff] [blame] | 987 | &reports_sent, |
| 988 | &round_trip_time, |
| 989 | &round_trip_time_measurements, |
| 990 | &total_round_trip_time) |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 991 | // clang-format on |
| 992 | |
| 993 | RTCRemoteOutboundRtpStreamStats::RTCRemoteOutboundRtpStreamStats( |
| 994 | const std::string& id, |
| 995 | int64_t timestamp_us) |
| 996 | : RTCRemoteOutboundRtpStreamStats(std::string(id), timestamp_us) {} |
| 997 | |
| 998 | RTCRemoteOutboundRtpStreamStats::RTCRemoteOutboundRtpStreamStats( |
| 999 | std::string&& id, |
| 1000 | int64_t timestamp_us) |
| 1001 | : RTCSentRtpStreamStats(std::move(id), timestamp_us), |
| 1002 | local_id("localId"), |
| 1003 | remote_timestamp("remoteTimestamp"), |
Ivo Creusen | 2562cf0 | 2021-09-03 14:51:22 +0000 | [diff] [blame] | 1004 | reports_sent("reportsSent"), |
| 1005 | round_trip_time("roundTripTime"), |
| 1006 | round_trip_time_measurements("roundTripTimeMeasurements"), |
| 1007 | total_round_trip_time("totalRoundTripTime") {} |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 1008 | |
| 1009 | RTCRemoteOutboundRtpStreamStats::RTCRemoteOutboundRtpStreamStats( |
| 1010 | const RTCRemoteOutboundRtpStreamStats& other) |
| 1011 | : RTCSentRtpStreamStats(other), |
| 1012 | local_id(other.local_id), |
| 1013 | remote_timestamp(other.remote_timestamp), |
Ivo Creusen | 2562cf0 | 2021-09-03 14:51:22 +0000 | [diff] [blame] | 1014 | reports_sent(other.reports_sent), |
| 1015 | round_trip_time(other.round_trip_time), |
| 1016 | round_trip_time_measurements(other.round_trip_time_measurements), |
| 1017 | total_round_trip_time(other.total_round_trip_time) {} |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 1018 | |
| 1019 | RTCRemoteOutboundRtpStreamStats::~RTCRemoteOutboundRtpStreamStats() {} |
| 1020 | |
| 1021 | // clang-format off |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 1022 | WEBRTC_RTCSTATS_IMPL(RTCMediaSourceStats, RTCStats, "parent-media-source", |
| 1023 | &track_identifier, |
| 1024 | &kind) |
| 1025 | // clang-format on |
| 1026 | |
| 1027 | RTCMediaSourceStats::RTCMediaSourceStats(const std::string& id, |
| 1028 | int64_t timestamp_us) |
| 1029 | : RTCMediaSourceStats(std::string(id), timestamp_us) {} |
| 1030 | |
| 1031 | RTCMediaSourceStats::RTCMediaSourceStats(std::string&& id, int64_t timestamp_us) |
| 1032 | : RTCStats(std::move(id), timestamp_us), |
| 1033 | track_identifier("trackIdentifier"), |
| 1034 | kind("kind") {} |
| 1035 | |
| 1036 | RTCMediaSourceStats::RTCMediaSourceStats(const RTCMediaSourceStats& other) |
| 1037 | : RTCStats(other.id(), other.timestamp_us()), |
| 1038 | track_identifier(other.track_identifier), |
| 1039 | kind(other.kind) {} |
| 1040 | |
| 1041 | RTCMediaSourceStats::~RTCMediaSourceStats() {} |
| 1042 | |
| 1043 | // clang-format off |
Henrik Boström | d2c336f | 2019-07-03 17:11:10 +0200 | [diff] [blame] | 1044 | WEBRTC_RTCSTATS_IMPL(RTCAudioSourceStats, RTCMediaSourceStats, "media-source", |
| 1045 | &audio_level, |
| 1046 | &total_audio_energy, |
Taylor Brandstetter | 64851c0 | 2021-06-24 13:32:50 -0700 | [diff] [blame] | 1047 | &total_samples_duration, |
| 1048 | &echo_return_loss, |
| 1049 | &echo_return_loss_enhancement) |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 1050 | // clang-format on |
| 1051 | |
| 1052 | RTCAudioSourceStats::RTCAudioSourceStats(const std::string& id, |
| 1053 | int64_t timestamp_us) |
| 1054 | : RTCAudioSourceStats(std::string(id), timestamp_us) {} |
| 1055 | |
| 1056 | RTCAudioSourceStats::RTCAudioSourceStats(std::string&& id, int64_t timestamp_us) |
Henrik Boström | d2c336f | 2019-07-03 17:11:10 +0200 | [diff] [blame] | 1057 | : RTCMediaSourceStats(std::move(id), timestamp_us), |
| 1058 | audio_level("audioLevel"), |
| 1059 | total_audio_energy("totalAudioEnergy"), |
Taylor Brandstetter | 64851c0 | 2021-06-24 13:32:50 -0700 | [diff] [blame] | 1060 | total_samples_duration("totalSamplesDuration"), |
| 1061 | echo_return_loss("echoReturnLoss"), |
| 1062 | echo_return_loss_enhancement("echoReturnLossEnhancement") {} |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 1063 | |
| 1064 | RTCAudioSourceStats::RTCAudioSourceStats(const RTCAudioSourceStats& other) |
Henrik Boström | d2c336f | 2019-07-03 17:11:10 +0200 | [diff] [blame] | 1065 | : RTCMediaSourceStats(other), |
| 1066 | audio_level(other.audio_level), |
| 1067 | total_audio_energy(other.total_audio_energy), |
Taylor Brandstetter | 64851c0 | 2021-06-24 13:32:50 -0700 | [diff] [blame] | 1068 | total_samples_duration(other.total_samples_duration), |
| 1069 | echo_return_loss(other.echo_return_loss), |
| 1070 | echo_return_loss_enhancement(other.echo_return_loss_enhancement) {} |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 1071 | |
| 1072 | RTCAudioSourceStats::~RTCAudioSourceStats() {} |
| 1073 | |
| 1074 | // clang-format off |
| 1075 | WEBRTC_RTCSTATS_IMPL(RTCVideoSourceStats, RTCMediaSourceStats, "media-source", |
| 1076 | &width, |
| 1077 | &height, |
| 1078 | &frames, |
| 1079 | &frames_per_second) |
| 1080 | // clang-format on |
| 1081 | |
| 1082 | RTCVideoSourceStats::RTCVideoSourceStats(const std::string& id, |
| 1083 | int64_t timestamp_us) |
| 1084 | : RTCVideoSourceStats(std::string(id), timestamp_us) {} |
| 1085 | |
| 1086 | RTCVideoSourceStats::RTCVideoSourceStats(std::string&& id, int64_t timestamp_us) |
| 1087 | : RTCMediaSourceStats(std::move(id), timestamp_us), |
| 1088 | width("width"), |
| 1089 | height("height"), |
| 1090 | frames("frames"), |
| 1091 | frames_per_second("framesPerSecond") {} |
| 1092 | |
| 1093 | RTCVideoSourceStats::RTCVideoSourceStats(const RTCVideoSourceStats& other) |
| 1094 | : RTCMediaSourceStats(other), |
| 1095 | width(other.width), |
| 1096 | height(other.height), |
| 1097 | frames(other.frames), |
| 1098 | frames_per_second(other.frames_per_second) {} |
| 1099 | |
| 1100 | RTCVideoSourceStats::~RTCVideoSourceStats() {} |
| 1101 | |
| 1102 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1103 | WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport", |
| 1104 | &bytes_sent, |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 1105 | &packets_sent, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1106 | &bytes_received, |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 1107 | &packets_received, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1108 | &rtcp_transport_stats_id, |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 1109 | &dtls_state, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1110 | &selected_candidate_pair_id, |
| 1111 | &local_certificate_id, |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 1112 | &remote_certificate_id, |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 1113 | &tls_version, |
| 1114 | &dtls_cipher, |
Philipp Hancke | 69c1df2 | 2022-04-22 15:46:24 +0200 | [diff] [blame] | 1115 | &dtls_role, |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 1116 | &srtp_cipher, |
Philipp Hancke | cc1b9b0 | 2022-05-04 18:58:26 +0200 | [diff] [blame] | 1117 | &selected_candidate_pair_changes, |
Philipp Hancke | 95b1a34 | 2022-05-05 07:53:54 +0200 | [diff] [blame] | 1118 | &ice_role, |
Philipp Hancke | 1f49157 | 2022-05-09 17:43:31 +0200 | [diff] [blame] | 1119 | &ice_local_username_fragment, |
| 1120 | &ice_state) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 1121 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1122 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 1123 | RTCTransportStats::RTCTransportStats(const std::string& id, |
| 1124 | int64_t timestamp_us) |
| 1125 | : RTCTransportStats(std::string(id), timestamp_us) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1126 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 1127 | RTCTransportStats::RTCTransportStats(std::string&& id, int64_t timestamp_us) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1128 | : RTCStats(std::move(id), timestamp_us), |
| 1129 | bytes_sent("bytesSent"), |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 1130 | packets_sent("packetsSent"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1131 | bytes_received("bytesReceived"), |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 1132 | packets_received("packetsReceived"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1133 | rtcp_transport_stats_id("rtcpTransportStatsId"), |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 1134 | dtls_state("dtlsState"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1135 | selected_candidate_pair_id("selectedCandidatePairId"), |
| 1136 | local_certificate_id("localCertificateId"), |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 1137 | remote_certificate_id("remoteCertificateId"), |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 1138 | tls_version("tlsVersion"), |
| 1139 | dtls_cipher("dtlsCipher"), |
Philipp Hancke | 69c1df2 | 2022-04-22 15:46:24 +0200 | [diff] [blame] | 1140 | dtls_role("dtlsRole"), |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 1141 | srtp_cipher("srtpCipher"), |
Philipp Hancke | cc1b9b0 | 2022-05-04 18:58:26 +0200 | [diff] [blame] | 1142 | selected_candidate_pair_changes("selectedCandidatePairChanges"), |
Philipp Hancke | 95b1a34 | 2022-05-05 07:53:54 +0200 | [diff] [blame] | 1143 | ice_role("iceRole"), |
Philipp Hancke | 1f49157 | 2022-05-09 17:43:31 +0200 | [diff] [blame] | 1144 | ice_local_username_fragment("iceLocalUsernameFragment"), |
| 1145 | ice_state("iceState") {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1146 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 1147 | RTCTransportStats::RTCTransportStats(const RTCTransportStats& other) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1148 | : RTCStats(other.id(), other.timestamp_us()), |
| 1149 | bytes_sent(other.bytes_sent), |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 1150 | packets_sent(other.packets_sent), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1151 | bytes_received(other.bytes_received), |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 1152 | packets_received(other.packets_received), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1153 | rtcp_transport_stats_id(other.rtcp_transport_stats_id), |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 1154 | dtls_state(other.dtls_state), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1155 | selected_candidate_pair_id(other.selected_candidate_pair_id), |
| 1156 | local_certificate_id(other.local_certificate_id), |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 1157 | remote_certificate_id(other.remote_certificate_id), |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 1158 | tls_version(other.tls_version), |
| 1159 | dtls_cipher(other.dtls_cipher), |
Philipp Hancke | 69c1df2 | 2022-04-22 15:46:24 +0200 | [diff] [blame] | 1160 | dtls_role(other.dtls_role), |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 1161 | srtp_cipher(other.srtp_cipher), |
Philipp Hancke | cc1b9b0 | 2022-05-04 18:58:26 +0200 | [diff] [blame] | 1162 | selected_candidate_pair_changes(other.selected_candidate_pair_changes), |
Philipp Hancke | 95b1a34 | 2022-05-05 07:53:54 +0200 | [diff] [blame] | 1163 | ice_role(other.ice_role), |
Philipp Hancke | 1f49157 | 2022-05-09 17:43:31 +0200 | [diff] [blame] | 1164 | ice_local_username_fragment(other.ice_local_username_fragment), |
| 1165 | ice_state(other.ice_state) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1166 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 1167 | RTCTransportStats::~RTCTransportStats() {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1168 | |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 1169 | } // namespace webrtc |