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