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 | |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 103 | RTCCertificateStats::RTCCertificateStats(const RTCCertificateStats& other) = |
| 104 | default; |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 105 | RTCCertificateStats::~RTCCertificateStats() {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 106 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 107 | // clang-format off |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 108 | WEBRTC_RTCSTATS_IMPL(RTCCodecStats, RTCStats, "codec", |
Philipp Hancke | 95157a0 | 2020-11-16 20:08:27 +0100 | [diff] [blame] | 109 | &transport_id, |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 110 | &payload_type, |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 111 | &mime_type, |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 112 | &clock_rate, |
| 113 | &channels, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 114 | &sdp_fmtp_line) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 115 | // clang-format on |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 116 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 117 | RTCCodecStats::RTCCodecStats(const std::string& id, int64_t timestamp_us) |
| 118 | : RTCCodecStats(std::string(id), timestamp_us) {} |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 119 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 120 | RTCCodecStats::RTCCodecStats(std::string&& id, int64_t timestamp_us) |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 121 | : RTCStats(std::move(id), timestamp_us), |
Philipp Hancke | 95157a0 | 2020-11-16 20:08:27 +0100 | [diff] [blame] | 122 | transport_id("transportId"), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 123 | payload_type("payloadType"), |
hbos | 13f54b2 | 2017-02-28 06:56:04 -0800 | [diff] [blame] | 124 | mime_type("mimeType"), |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 125 | clock_rate("clockRate"), |
| 126 | channels("channels"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 127 | sdp_fmtp_line("sdpFmtpLine") {} |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 128 | |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 129 | RTCCodecStats::RTCCodecStats(const RTCCodecStats& other) = default; |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 130 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 131 | RTCCodecStats::~RTCCodecStats() {} |
hbos | 0adb828 | 2016-11-23 02:32:06 -0800 | [diff] [blame] | 132 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 133 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 134 | WEBRTC_RTCSTATS_IMPL(RTCDataChannelStats, RTCStats, "data-channel", |
| 135 | &label, |
| 136 | &protocol, |
Harald Alvestrand | 10ef847 | 2020-06-05 15:38:51 +0200 | [diff] [blame] | 137 | &data_channel_identifier, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 138 | &state, |
| 139 | &messages_sent, |
| 140 | &bytes_sent, |
| 141 | &messages_received, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 142 | &bytes_received) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 143 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 144 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 145 | RTCDataChannelStats::RTCDataChannelStats(const std::string& id, |
| 146 | int64_t timestamp_us) |
| 147 | : RTCDataChannelStats(std::string(id), timestamp_us) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 148 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 149 | RTCDataChannelStats::RTCDataChannelStats(std::string&& id, int64_t timestamp_us) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 150 | : RTCStats(std::move(id), timestamp_us), |
| 151 | label("label"), |
| 152 | protocol("protocol"), |
Harald Alvestrand | 10ef847 | 2020-06-05 15:38:51 +0200 | [diff] [blame] | 153 | data_channel_identifier("dataChannelIdentifier"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 154 | state("state"), |
| 155 | messages_sent("messagesSent"), |
| 156 | bytes_sent("bytesSent"), |
| 157 | messages_received("messagesReceived"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 158 | bytes_received("bytesReceived") {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 159 | |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 160 | RTCDataChannelStats::RTCDataChannelStats(const RTCDataChannelStats& other) = |
| 161 | default; |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 162 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 163 | RTCDataChannelStats::~RTCDataChannelStats() {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 164 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 165 | // clang-format off |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 166 | WEBRTC_RTCSTATS_IMPL(RTCIceCandidatePairStats, RTCStats, "candidate-pair", |
| 167 | &transport_id, |
| 168 | &local_candidate_id, |
| 169 | &remote_candidate_id, |
| 170 | &state, |
| 171 | &priority, |
| 172 | &nominated, |
| 173 | &writable, |
Taylor Brandstetter | 79326ea | 2021-09-28 15:09:53 -0700 | [diff] [blame] | 174 | &packets_sent, |
| 175 | &packets_received, |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 176 | &bytes_sent, |
| 177 | &bytes_received, |
hbos | 3168c7a | 2016-12-15 06:17:08 -0800 | [diff] [blame] | 178 | &total_round_trip_time, |
| 179 | ¤t_round_trip_time, |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 180 | &available_outgoing_bitrate, |
| 181 | &available_incoming_bitrate, |
| 182 | &requests_received, |
| 183 | &requests_sent, |
| 184 | &responses_received, |
| 185 | &responses_sent, |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 186 | &consent_requests_sent, |
Taylor Brandstetter | 79326ea | 2021-09-28 15:09:53 -0700 | [diff] [blame] | 187 | &packets_discarded_on_send, |
Philipp Hancke | 0487c57 | 2022-11-01 17:03:01 +0100 | [diff] [blame^] | 188 | &bytes_discarded_on_send, |
| 189 | &last_packet_received_timestamp, |
| 190 | &last_packet_sent_timestamp) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 191 | // clang-format on |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 192 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 193 | RTCIceCandidatePairStats::RTCIceCandidatePairStats(const std::string& id, |
| 194 | int64_t timestamp_us) |
| 195 | : RTCIceCandidatePairStats(std::string(id), timestamp_us) {} |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 196 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 197 | RTCIceCandidatePairStats::RTCIceCandidatePairStats(std::string&& id, |
| 198 | int64_t timestamp_us) |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 199 | : RTCStats(std::move(id), timestamp_us), |
| 200 | transport_id("transportId"), |
| 201 | local_candidate_id("localCandidateId"), |
| 202 | remote_candidate_id("remoteCandidateId"), |
| 203 | state("state"), |
| 204 | priority("priority"), |
| 205 | nominated("nominated"), |
| 206 | writable("writable"), |
Taylor Brandstetter | 79326ea | 2021-09-28 15:09:53 -0700 | [diff] [blame] | 207 | packets_sent("packetsSent"), |
| 208 | packets_received("packetsReceived"), |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 209 | bytes_sent("bytesSent"), |
| 210 | bytes_received("bytesReceived"), |
hbos | 3168c7a | 2016-12-15 06:17:08 -0800 | [diff] [blame] | 211 | total_round_trip_time("totalRoundTripTime"), |
| 212 | current_round_trip_time("currentRoundTripTime"), |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 213 | available_outgoing_bitrate("availableOutgoingBitrate"), |
| 214 | available_incoming_bitrate("availableIncomingBitrate"), |
| 215 | requests_received("requestsReceived"), |
| 216 | requests_sent("requestsSent"), |
| 217 | responses_received("responsesReceived"), |
| 218 | responses_sent("responsesSent"), |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 219 | consent_requests_sent("consentRequestsSent"), |
Taylor Brandstetter | 79326ea | 2021-09-28 15:09:53 -0700 | [diff] [blame] | 220 | packets_discarded_on_send("packetsDiscardedOnSend"), |
Philipp Hancke | 0487c57 | 2022-11-01 17:03:01 +0100 | [diff] [blame^] | 221 | bytes_discarded_on_send("bytesDiscardedOnSend"), |
| 222 | last_packet_received_timestamp("lastPacketReceivedTimestamp"), |
| 223 | last_packet_sent_timestamp("lastPacketSentTimestamp") {} |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 224 | |
| 225 | RTCIceCandidatePairStats::RTCIceCandidatePairStats( |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 226 | const RTCIceCandidatePairStats& other) = default; |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 227 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 228 | RTCIceCandidatePairStats::~RTCIceCandidatePairStats() {} |
hbos | c47a0c3 | 2016-10-11 14:54:49 -0700 | [diff] [blame] | 229 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 230 | // clang-format off |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 231 | WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "abstract-ice-candidate", |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 232 | &transport_id, |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 233 | &is_remote, |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 234 | &network_type, |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 235 | &ip, |
Philipp Hancke | a9ba450 | 2021-03-22 13:22:54 +0100 | [diff] [blame] | 236 | &address, |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 237 | &port, |
| 238 | &protocol, |
Philipp Hancke | 9551375 | 2018-09-27 14:40:08 +0200 | [diff] [blame] | 239 | &relay_protocol, |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 240 | &candidate_type, |
| 241 | &priority, |
Jonas Oreland | 0d13bbd | 2022-03-02 11:17:36 +0100 | [diff] [blame] | 242 | &url, |
Philipp Hancke | 0e3cd63 | 2022-09-27 10:23:09 +0200 | [diff] [blame] | 243 | &foundation, |
| 244 | &related_address, |
| 245 | &related_port, |
| 246 | &username_fragment, |
| 247 | &tcp_type, |
Jonas Oreland | 0d13bbd | 2022-03-02 11:17:36 +0100 | [diff] [blame] | 248 | &vpn, |
| 249 | &network_adapter_type) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 250 | // clang-format on |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 251 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 252 | RTCIceCandidateStats::RTCIceCandidateStats(const std::string& id, |
| 253 | int64_t timestamp_us, |
| 254 | bool is_remote) |
| 255 | : RTCIceCandidateStats(std::string(id), timestamp_us, is_remote) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 256 | |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 257 | RTCIceCandidateStats::RTCIceCandidateStats(std::string&& id, |
| 258 | int64_t timestamp_us, |
| 259 | bool is_remote) |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 260 | : RTCStats(std::move(id), timestamp_us), |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 261 | transport_id("transportId"), |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 262 | is_remote("isRemote", is_remote), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 263 | network_type("networkType"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 264 | ip("ip"), |
Philipp Hancke | a9ba450 | 2021-03-22 13:22:54 +0100 | [diff] [blame] | 265 | address("address"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 266 | port("port"), |
| 267 | protocol("protocol"), |
Philipp Hancke | 9551375 | 2018-09-27 14:40:08 +0200 | [diff] [blame] | 268 | relay_protocol("relayProtocol"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 269 | candidate_type("candidateType"), |
| 270 | priority("priority"), |
Jonas Oreland | 0d13bbd | 2022-03-02 11:17:36 +0100 | [diff] [blame] | 271 | url("url"), |
Philipp Hancke | 0e3cd63 | 2022-09-27 10:23:09 +0200 | [diff] [blame] | 272 | foundation("foundation"), |
| 273 | related_address("relatedAddress"), |
| 274 | related_port("relatedPort"), |
| 275 | username_fragment("usernameFragment"), |
| 276 | tcp_type("tcpType"), |
Jonas Oreland | 0d13bbd | 2022-03-02 11:17:36 +0100 | [diff] [blame] | 277 | vpn("vpn"), |
| 278 | network_adapter_type("networkAdapterType") {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 279 | |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 280 | RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other) = |
| 281 | default; |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 282 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 283 | RTCIceCandidateStats::~RTCIceCandidateStats() {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 284 | |
| 285 | const char RTCLocalIceCandidateStats::kType[] = "local-candidate"; |
| 286 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 287 | RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(const std::string& id, |
| 288 | int64_t timestamp_us) |
| 289 | : RTCIceCandidateStats(id, timestamp_us, false) {} |
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 | RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(std::string&& id, |
| 292 | int64_t timestamp_us) |
| 293 | : RTCIceCandidateStats(std::move(id), timestamp_us, false) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 294 | |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 295 | std::unique_ptr<RTCStats> RTCLocalIceCandidateStats::copy() const { |
Philipp Hancke | b5cf12d | 2022-09-06 11:55:31 +0200 | [diff] [blame] | 296 | return std::make_unique<RTCLocalIceCandidateStats>(*this); |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 297 | } |
| 298 | |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 299 | const char* RTCLocalIceCandidateStats::type() const { |
| 300 | return kType; |
| 301 | } |
| 302 | |
| 303 | const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate"; |
| 304 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 305 | RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(const std::string& id, |
| 306 | int64_t timestamp_us) |
| 307 | : RTCIceCandidateStats(id, timestamp_us, true) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 308 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 309 | RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(std::string&& id, |
| 310 | int64_t timestamp_us) |
| 311 | : RTCIceCandidateStats(std::move(id), timestamp_us, true) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 312 | |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 313 | std::unique_ptr<RTCStats> RTCRemoteIceCandidateStats::copy() const { |
Philipp Hancke | b5cf12d | 2022-09-06 11:55:31 +0200 | [diff] [blame] | 314 | return std::make_unique<RTCRemoteIceCandidateStats>(*this); |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 315 | } |
| 316 | |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 317 | const char* RTCRemoteIceCandidateStats::type() const { |
| 318 | return kType; |
| 319 | } |
| 320 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 321 | // clang-format off |
Henrik Boström | 15166b2 | 2022-10-19 11:06:58 +0200 | [diff] [blame] | 322 | WEBRTC_RTCSTATS_IMPL(DEPRECATED_RTCMediaStreamStats, RTCStats, "stream", |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 323 | &stream_identifier, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 324 | &track_ids) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 325 | // clang-format on |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 326 | |
Henrik Boström | 15166b2 | 2022-10-19 11:06:58 +0200 | [diff] [blame] | 327 | DEPRECATED_RTCMediaStreamStats::DEPRECATED_RTCMediaStreamStats( |
| 328 | const std::string& id, |
| 329 | int64_t timestamp_us) |
| 330 | : DEPRECATED_RTCMediaStreamStats(std::string(id), timestamp_us) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 331 | |
Henrik Boström | 15166b2 | 2022-10-19 11:06:58 +0200 | [diff] [blame] | 332 | DEPRECATED_RTCMediaStreamStats::DEPRECATED_RTCMediaStreamStats( |
| 333 | std::string&& id, |
| 334 | int64_t timestamp_us) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 335 | : RTCStats(std::move(id), timestamp_us), |
| 336 | stream_identifier("streamIdentifier"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 337 | track_ids("trackIds") {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 338 | |
Henrik Boström | 15166b2 | 2022-10-19 11:06:58 +0200 | [diff] [blame] | 339 | DEPRECATED_RTCMediaStreamStats::DEPRECATED_RTCMediaStreamStats( |
| 340 | const DEPRECATED_RTCMediaStreamStats& other) = default; |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 341 | |
Henrik Boström | 15166b2 | 2022-10-19 11:06:58 +0200 | [diff] [blame] | 342 | DEPRECATED_RTCMediaStreamStats::~DEPRECATED_RTCMediaStreamStats() {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 343 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 344 | // clang-format off |
Henrik Boström | 15166b2 | 2022-10-19 11:06:58 +0200 | [diff] [blame] | 345 | WEBRTC_RTCSTATS_IMPL(DEPRECATED_RTCMediaStreamTrackStats, RTCStats, "track", |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 346 | &track_identifier, |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 347 | &media_source_id, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 348 | &remote_source, |
| 349 | &ended, |
| 350 | &detached, |
| 351 | &kind, |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 352 | &jitter_buffer_delay, |
Chen Xing | 0acffb5 | 2019-01-15 15:46:29 +0100 | [diff] [blame] | 353 | &jitter_buffer_emitted_count, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 354 | &frame_width, |
| 355 | &frame_height, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 356 | &frames_sent, |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 357 | &huge_frames_sent, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 358 | &frames_received, |
| 359 | &frames_decoded, |
| 360 | &frames_dropped, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 361 | &audio_level, |
| 362 | &total_audio_energy, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 363 | &echo_return_loss, |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 364 | &echo_return_loss_enhancement, |
| 365 | &total_samples_received, |
| 366 | &total_samples_duration, |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 367 | &concealed_samples, |
Henrik Boström | 21e99da | 2019-08-21 12:09:51 +0200 | [diff] [blame] | 368 | &silent_concealed_samples, |
Ruslan Burakov | 8af8896 | 2018-11-22 17:21:10 +0100 | [diff] [blame] | 369 | &concealment_events, |
Henrik Boström | 21e99da | 2019-08-21 12:09:51 +0200 | [diff] [blame] | 370 | &inserted_samples_for_deceleration, |
Henrik Boström | adbcbf7 | 2022-10-31 16:31:40 +0100 | [diff] [blame] | 371 | &removed_samples_for_acceleration) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 372 | // clang-format on |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 373 | |
Henrik Boström | 15166b2 | 2022-10-19 11:06:58 +0200 | [diff] [blame] | 374 | DEPRECATED_RTCMediaStreamTrackStats::DEPRECATED_RTCMediaStreamTrackStats( |
| 375 | const std::string& id, |
| 376 | int64_t timestamp_us, |
| 377 | const char* kind) |
| 378 | : DEPRECATED_RTCMediaStreamTrackStats(std::string(id), timestamp_us, kind) { |
| 379 | } |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 380 | |
Henrik Boström | 15166b2 | 2022-10-19 11:06:58 +0200 | [diff] [blame] | 381 | DEPRECATED_RTCMediaStreamTrackStats::DEPRECATED_RTCMediaStreamTrackStats( |
| 382 | std::string&& id, |
| 383 | int64_t timestamp_us, |
| 384 | const char* kind) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 385 | : RTCStats(std::move(id), timestamp_us), |
| 386 | track_identifier("trackIdentifier"), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 387 | media_source_id("mediaSourceId"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 388 | remote_source("remoteSource"), |
| 389 | ended("ended"), |
| 390 | detached("detached"), |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 391 | kind("kind", kind), |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 392 | jitter_buffer_delay("jitterBufferDelay"), |
Chen Xing | 0acffb5 | 2019-01-15 15:46:29 +0100 | [diff] [blame] | 393 | jitter_buffer_emitted_count("jitterBufferEmittedCount"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 394 | frame_width("frameWidth"), |
| 395 | frame_height("frameHeight"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 396 | frames_sent("framesSent"), |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 397 | huge_frames_sent("hugeFramesSent"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 398 | frames_received("framesReceived"), |
| 399 | frames_decoded("framesDecoded"), |
| 400 | frames_dropped("framesDropped"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 401 | audio_level("audioLevel"), |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 402 | total_audio_energy("totalAudioEnergy"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 403 | echo_return_loss("echoReturnLoss"), |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 404 | echo_return_loss_enhancement("echoReturnLossEnhancement"), |
| 405 | total_samples_received("totalSamplesReceived"), |
| 406 | total_samples_duration("totalSamplesDuration"), |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 407 | concealed_samples("concealedSamples"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 408 | silent_concealed_samples("silentConcealedSamples"), |
Ruslan Burakov | 8af8896 | 2018-11-22 17:21:10 +0100 | [diff] [blame] | 409 | concealment_events("concealmentEvents"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 410 | inserted_samples_for_deceleration("insertedSamplesForDeceleration"), |
Henrik Boström | adbcbf7 | 2022-10-31 16:31:40 +0100 | [diff] [blame] | 411 | removed_samples_for_acceleration("removedSamplesForAcceleration") { |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 412 | RTC_DCHECK(kind == RTCMediaStreamTrackKind::kAudio || |
| 413 | kind == RTCMediaStreamTrackKind::kVideo); |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 414 | } |
| 415 | |
Henrik Boström | 15166b2 | 2022-10-19 11:06:58 +0200 | [diff] [blame] | 416 | DEPRECATED_RTCMediaStreamTrackStats::DEPRECATED_RTCMediaStreamTrackStats( |
| 417 | const DEPRECATED_RTCMediaStreamTrackStats& other) = default; |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 418 | |
Henrik Boström | 15166b2 | 2022-10-19 11:06:58 +0200 | [diff] [blame] | 419 | DEPRECATED_RTCMediaStreamTrackStats::~DEPRECATED_RTCMediaStreamTrackStats() {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 420 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 421 | // clang-format off |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 422 | WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection", |
| 423 | &data_channels_opened, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 424 | &data_channels_closed) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 425 | // clang-format on |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 426 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 427 | RTCPeerConnectionStats::RTCPeerConnectionStats(const std::string& id, |
| 428 | int64_t timestamp_us) |
| 429 | : RTCPeerConnectionStats(std::string(id), timestamp_us) {} |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 430 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 431 | RTCPeerConnectionStats::RTCPeerConnectionStats(std::string&& id, |
| 432 | int64_t timestamp_us) |
hbos | 0e6758d | 2016-08-31 07:57:36 -0700 | [diff] [blame] | 433 | : RTCStats(std::move(id), timestamp_us), |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 434 | data_channels_opened("dataChannelsOpened"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 435 | data_channels_closed("dataChannelsClosed") {} |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 436 | |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 437 | RTCPeerConnectionStats::RTCPeerConnectionStats( |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 438 | const RTCPeerConnectionStats& other) = default; |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 439 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 440 | RTCPeerConnectionStats::~RTCPeerConnectionStats() {} |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 441 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 442 | // clang-format off |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 443 | WEBRTC_RTCSTATS_IMPL(RTCRTPStreamStats, RTCStats, "rtp", |
| 444 | &ssrc, |
Philipp Hancke | 3bc0166 | 2018-08-28 14:55:03 +0200 | [diff] [blame] | 445 | &kind, |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 446 | &track_id, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 447 | &transport_id, |
| 448 | &codec_id, |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 449 | &media_type) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 450 | // clang-format on |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 451 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 452 | RTCRTPStreamStats::RTCRTPStreamStats(const std::string& id, |
| 453 | int64_t timestamp_us) |
| 454 | : RTCRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 455 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 456 | RTCRTPStreamStats::RTCRTPStreamStats(std::string&& id, int64_t timestamp_us) |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 457 | : RTCStats(std::move(id), timestamp_us), |
| 458 | ssrc("ssrc"), |
Philipp Hancke | 3bc0166 | 2018-08-28 14:55:03 +0200 | [diff] [blame] | 459 | kind("kind"), |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 460 | track_id("trackId"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 461 | transport_id("transportId"), |
| 462 | codec_id("codecId"), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 463 | media_type("mediaType") {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 464 | |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 465 | RTCRTPStreamStats::RTCRTPStreamStats(const RTCRTPStreamStats& other) = default; |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 466 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 467 | RTCRTPStreamStats::~RTCRTPStreamStats() {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 468 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 469 | // clang-format off |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 470 | WEBRTC_RTCSTATS_IMPL( |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 471 | RTCReceivedRtpStreamStats, RTCRTPStreamStats, "received-rtp", |
| 472 | &jitter, |
Henrik Boström | a494e4b | 2022-10-03 17:26:41 +0200 | [diff] [blame] | 473 | &packets_lost) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 474 | // clang-format on |
| 475 | |
| 476 | RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(const std::string&& id, |
| 477 | int64_t timestamp_us) |
| 478 | : RTCReceivedRtpStreamStats(std::string(id), timestamp_us) {} |
| 479 | |
| 480 | RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(std::string&& id, |
| 481 | int64_t timestamp_us) |
| 482 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
| 483 | jitter("jitter"), |
Henrik Boström | a494e4b | 2022-10-03 17:26:41 +0200 | [diff] [blame] | 484 | packets_lost("packetsLost") {} |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 485 | |
| 486 | RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats( |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 487 | const RTCReceivedRtpStreamStats& other) = default; |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 488 | |
| 489 | RTCReceivedRtpStreamStats::~RTCReceivedRtpStreamStats() {} |
| 490 | |
| 491 | // clang-format off |
| 492 | WEBRTC_RTCSTATS_IMPL( |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 493 | RTCSentRtpStreamStats, RTCRTPStreamStats, "sent-rtp", |
| 494 | &packets_sent, |
| 495 | &bytes_sent) |
| 496 | // clang-format on |
| 497 | |
| 498 | RTCSentRtpStreamStats::RTCSentRtpStreamStats(const std::string&& id, |
| 499 | int64_t timestamp_us) |
| 500 | : RTCSentRtpStreamStats(std::string(id), timestamp_us) {} |
| 501 | |
| 502 | RTCSentRtpStreamStats::RTCSentRtpStreamStats(std::string&& id, |
| 503 | int64_t timestamp_us) |
| 504 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
| 505 | packets_sent("packetsSent"), |
| 506 | bytes_sent("bytesSent") {} |
| 507 | |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 508 | RTCSentRtpStreamStats::RTCSentRtpStreamStats( |
| 509 | const RTCSentRtpStreamStats& other) = default; |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 510 | |
| 511 | RTCSentRtpStreamStats::~RTCSentRtpStreamStats() {} |
| 512 | |
| 513 | // clang-format off |
| 514 | WEBRTC_RTCSTATS_IMPL( |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 515 | RTCInboundRTPStreamStats, RTCReceivedRtpStreamStats, "inbound-rtp", |
Henrik Boström | a6c7d5c | 2022-06-16 16:55:31 +0200 | [diff] [blame] | 516 | &track_identifier, |
Henrik Boström | 1ab6188 | 2022-06-16 17:07:33 +0200 | [diff] [blame] | 517 | &mid, |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 518 | &remote_id, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 519 | &packets_received, |
Henrik Boström | a494e4b | 2022-10-03 17:26:41 +0200 | [diff] [blame] | 520 | &packets_discarded, |
Henrik Boström | 4a5dab0 | 2020-01-28 11:15:35 +0100 | [diff] [blame] | 521 | &fec_packets_received, |
| 522 | &fec_packets_discarded, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 523 | &bytes_received, |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 524 | &header_bytes_received, |
Henrik Boström | 01738c6 | 2019-04-15 17:32:00 +0200 | [diff] [blame] | 525 | &last_packet_received_timestamp, |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 526 | &jitter_buffer_delay, |
Ivo Creusen | 11fdb08 | 2022-07-04 14:16:39 +0200 | [diff] [blame] | 527 | &jitter_buffer_target_delay, |
Ivo Creusen | 1a84b56 | 2022-07-19 16:33:10 +0200 | [diff] [blame] | 528 | &jitter_buffer_minimum_delay, |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 529 | &jitter_buffer_emitted_count, |
| 530 | &total_samples_received, |
| 531 | &concealed_samples, |
| 532 | &silent_concealed_samples, |
| 533 | &concealment_events, |
| 534 | &inserted_samples_for_deceleration, |
| 535 | &removed_samples_for_acceleration, |
| 536 | &audio_level, |
| 537 | &total_audio_energy, |
| 538 | &total_samples_duration, |
Philipp Hancke | a16a6a6 | 2022-04-25 12:21:30 +0200 | [diff] [blame] | 539 | &frames_received, |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 540 | &frame_width, |
| 541 | &frame_height, |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 542 | &frames_per_second, |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 543 | &frames_decoded, |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 544 | &key_frames_decoded, |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 545 | &frames_dropped, |
Johannes Kron | bfd343b | 2019-07-01 10:07:50 +0200 | [diff] [blame] | 546 | &total_decode_time, |
Philipp Hancke | a16a6a6 | 2022-04-25 12:21:30 +0200 | [diff] [blame] | 547 | &total_processing_delay, |
Philipp Hancke | 0359ba2 | 2022-05-05 15:55:36 +0200 | [diff] [blame] | 548 | &total_assembly_time, |
| 549 | &frames_assembled_from_multiple_packets, |
Johannes Kron | 00376e1 | 2019-11-25 10:25:42 +0100 | [diff] [blame] | 550 | &total_inter_frame_delay, |
| 551 | &total_squared_inter_frame_delay, |
Henrik Boström | c57a28c | 2022-10-06 11:59:05 +0200 | [diff] [blame] | 552 | &pause_count, |
| 553 | &total_pauses_duration, |
| 554 | &freeze_count, |
| 555 | &total_freezes_duration, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 556 | &content_type, |
Åsa Persson | fcf79cc | 2019-10-22 15:23:44 +0200 | [diff] [blame] | 557 | &estimated_playout_timestamp, |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 558 | &decoder_implementation, |
| 559 | &fir_count, |
| 560 | &pli_count, |
| 561 | &nack_count, |
Philipp Hancke | 6fb8d1a | 2022-05-30 12:37:04 +0200 | [diff] [blame] | 562 | &qp_sum, |
Henrik Boström | c5f8f80 | 2022-10-19 17:50:09 +0200 | [diff] [blame] | 563 | &goog_timing_frame_info, |
Henrik Boström | 2fb8307 | 2022-10-06 13:37:11 +0200 | [diff] [blame] | 564 | &jitter_buffer_flushes, |
| 565 | &delayed_packet_outage_samples, |
| 566 | &relative_packet_arrival_delay, |
| 567 | &interruption_count, |
| 568 | &total_interruption_duration, |
Philipp Hancke | 6fb8d1a | 2022-05-30 12:37:04 +0200 | [diff] [blame] | 569 | &min_playout_delay) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 570 | // clang-format on |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 571 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 572 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(const std::string& id, |
| 573 | int64_t timestamp_us) |
| 574 | : RTCInboundRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 575 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 576 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(std::string&& id, |
| 577 | int64_t timestamp_us) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 578 | : RTCReceivedRtpStreamStats(std::move(id), timestamp_us), |
Henrik Boström | a6c7d5c | 2022-06-16 16:55:31 +0200 | [diff] [blame] | 579 | track_identifier("trackIdentifier"), |
Henrik Boström | 1ab6188 | 2022-06-16 17:07:33 +0200 | [diff] [blame] | 580 | mid("mid"), |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 581 | remote_id("remoteId"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 582 | packets_received("packetsReceived"), |
Henrik Boström | a494e4b | 2022-10-03 17:26:41 +0200 | [diff] [blame] | 583 | packets_discarded("packetsDiscarded"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 584 | fec_packets_received("fecPacketsReceived"), |
| 585 | fec_packets_discarded("fecPacketsDiscarded"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 586 | bytes_received("bytesReceived"), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 587 | header_bytes_received("headerBytesReceived"), |
Henrik Boström | 01738c6 | 2019-04-15 17:32:00 +0200 | [diff] [blame] | 588 | last_packet_received_timestamp("lastPacketReceivedTimestamp"), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 589 | jitter_buffer_delay("jitterBufferDelay"), |
Ivo Creusen | 11fdb08 | 2022-07-04 14:16:39 +0200 | [diff] [blame] | 590 | jitter_buffer_target_delay("jitterBufferTargetDelay"), |
Ivo Creusen | 1a84b56 | 2022-07-19 16:33:10 +0200 | [diff] [blame] | 591 | jitter_buffer_minimum_delay("jitterBufferMinimumDelay"), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 592 | jitter_buffer_emitted_count("jitterBufferEmittedCount"), |
| 593 | total_samples_received("totalSamplesReceived"), |
| 594 | concealed_samples("concealedSamples"), |
| 595 | silent_concealed_samples("silentConcealedSamples"), |
| 596 | concealment_events("concealmentEvents"), |
| 597 | inserted_samples_for_deceleration("insertedSamplesForDeceleration"), |
| 598 | removed_samples_for_acceleration("removedSamplesForAcceleration"), |
| 599 | audio_level("audioLevel"), |
| 600 | total_audio_energy("totalAudioEnergy"), |
| 601 | total_samples_duration("totalSamplesDuration"), |
Philipp Hancke | a16a6a6 | 2022-04-25 12:21:30 +0200 | [diff] [blame] | 602 | frames_received("framesReceived"), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 603 | frame_width("frameWidth"), |
| 604 | frame_height("frameHeight"), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 605 | frames_per_second("framesPerSecond"), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 606 | frames_decoded("framesDecoded"), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 607 | key_frames_decoded("keyFramesDecoded"), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 608 | frames_dropped("framesDropped"), |
Johannes Kron | bfd343b | 2019-07-01 10:07:50 +0200 | [diff] [blame] | 609 | total_decode_time("totalDecodeTime"), |
Philipp Hancke | a16a6a6 | 2022-04-25 12:21:30 +0200 | [diff] [blame] | 610 | total_processing_delay("totalProcessingDelay"), |
Philipp Hancke | 0359ba2 | 2022-05-05 15:55:36 +0200 | [diff] [blame] | 611 | total_assembly_time("totalAssemblyTime"), |
| 612 | frames_assembled_from_multiple_packets( |
| 613 | "framesAssembledFromMultiplePackets"), |
Johannes Kron | 00376e1 | 2019-11-25 10:25:42 +0100 | [diff] [blame] | 614 | total_inter_frame_delay("totalInterFrameDelay"), |
| 615 | total_squared_inter_frame_delay("totalSquaredInterFrameDelay"), |
Henrik Boström | c57a28c | 2022-10-06 11:59:05 +0200 | [diff] [blame] | 616 | pause_count("pauseCount"), |
| 617 | total_pauses_duration("totalPausesDuration"), |
| 618 | freeze_count("freezeCount"), |
| 619 | total_freezes_duration("totalFreezesDuration"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 620 | content_type("contentType"), |
Åsa Persson | fcf79cc | 2019-10-22 15:23:44 +0200 | [diff] [blame] | 621 | estimated_playout_timestamp("estimatedPlayoutTimestamp"), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 622 | decoder_implementation("decoderImplementation"), |
| 623 | fir_count("firCount"), |
| 624 | pli_count("pliCount"), |
| 625 | nack_count("nackCount"), |
Philipp Hancke | 6fb8d1a | 2022-05-30 12:37:04 +0200 | [diff] [blame] | 626 | qp_sum("qpSum"), |
Henrik Boström | c5f8f80 | 2022-10-19 17:50:09 +0200 | [diff] [blame] | 627 | goog_timing_frame_info("googTimingFrameInfo"), |
Henrik Boström | 2fb8307 | 2022-10-06 13:37:11 +0200 | [diff] [blame] | 628 | jitter_buffer_flushes( |
| 629 | "jitterBufferFlushes", |
| 630 | {NonStandardGroupId::kRtcAudioJitterBufferMaxPackets}), |
| 631 | delayed_packet_outage_samples( |
| 632 | "delayedPacketOutageSamples", |
| 633 | {NonStandardGroupId::kRtcAudioJitterBufferMaxPackets, |
| 634 | NonStandardGroupId::kRtcStatsRelativePacketArrivalDelay}), |
| 635 | relative_packet_arrival_delay( |
| 636 | "relativePacketArrivalDelay", |
| 637 | {NonStandardGroupId::kRtcStatsRelativePacketArrivalDelay}), |
| 638 | interruption_count("interruptionCount"), |
| 639 | total_interruption_duration("totalInterruptionDuration"), |
Philipp Hancke | 6fb8d1a | 2022-05-30 12:37:04 +0200 | [diff] [blame] | 640 | min_playout_delay("minPlayoutDelay") {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 641 | |
| 642 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats( |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 643 | const RTCInboundRTPStreamStats& other) = default; |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 644 | RTCInboundRTPStreamStats::~RTCInboundRTPStreamStats() {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 645 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 646 | // clang-format off |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 647 | WEBRTC_RTCSTATS_IMPL( |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 648 | RTCOutboundRTPStreamStats, RTCRTPStreamStats, "outbound-rtp", |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 649 | &media_source_id, |
Henrik Boström | 4f40fa5 | 2019-12-19 13:27:27 +0100 | [diff] [blame] | 650 | &remote_id, |
Henrik Boström | 1ab6188 | 2022-06-16 17:07:33 +0200 | [diff] [blame] | 651 | &mid, |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 652 | &rid, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 653 | &packets_sent, |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 654 | &retransmitted_packets_sent, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 655 | &bytes_sent, |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 656 | &header_bytes_sent, |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 657 | &retransmitted_bytes_sent, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 658 | &target_bitrate, |
Henrik Boström | f71362f | 2019-04-08 16:14:23 +0200 | [diff] [blame] | 659 | &frames_encoded, |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 660 | &key_frames_encoded, |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 661 | &total_encode_time, |
Henrik Boström | 23aff9b | 2019-05-20 15:15:38 +0200 | [diff] [blame] | 662 | &total_encoded_bytes_target, |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 663 | &frame_width, |
| 664 | &frame_height, |
| 665 | &frames_per_second, |
| 666 | &frames_sent, |
| 667 | &huge_frames_sent, |
Henrik Boström | 9fe1834 | 2019-05-16 18:38:20 +0200 | [diff] [blame] | 668 | &total_packet_send_delay, |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 669 | &quality_limitation_reason, |
Byoungchan Lee | 7d23535 | 2021-05-28 21:32:04 +0900 | [diff] [blame] | 670 | &quality_limitation_durations, |
Evan Shrubsole | cc62b16 | 2019-09-09 11:26:45 +0200 | [diff] [blame] | 671 | &quality_limitation_resolution_changes, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 672 | &content_type, |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 673 | &encoder_implementation, |
| 674 | &fir_count, |
| 675 | &pli_count, |
| 676 | &nack_count, |
Philipp Hancke | 684e241 | 2022-07-28 12:41:00 +0200 | [diff] [blame] | 677 | &qp_sum, |
| 678 | &active) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 679 | // clang-format on |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 680 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 681 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(const std::string& id, |
| 682 | int64_t timestamp_us) |
| 683 | : RTCOutboundRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 684 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 685 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(std::string&& id, |
| 686 | int64_t timestamp_us) |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 687 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 688 | media_source_id("mediaSourceId"), |
Henrik Boström | 4f40fa5 | 2019-12-19 13:27:27 +0100 | [diff] [blame] | 689 | remote_id("remoteId"), |
Henrik Boström | 1ab6188 | 2022-06-16 17:07:33 +0200 | [diff] [blame] | 690 | mid("mid"), |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 691 | rid("rid"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 692 | packets_sent("packetsSent"), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 693 | retransmitted_packets_sent("retransmittedPacketsSent"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 694 | bytes_sent("bytesSent"), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 695 | header_bytes_sent("headerBytesSent"), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 696 | retransmitted_bytes_sent("retransmittedBytesSent"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 697 | target_bitrate("targetBitrate"), |
Henrik Boström | f71362f | 2019-04-08 16:14:23 +0200 | [diff] [blame] | 698 | frames_encoded("framesEncoded"), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 699 | key_frames_encoded("keyFramesEncoded"), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 700 | total_encode_time("totalEncodeTime"), |
Henrik Boström | 23aff9b | 2019-05-20 15:15:38 +0200 | [diff] [blame] | 701 | total_encoded_bytes_target("totalEncodedBytesTarget"), |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 702 | frame_width("frameWidth"), |
| 703 | frame_height("frameHeight"), |
| 704 | frames_per_second("framesPerSecond"), |
| 705 | frames_sent("framesSent"), |
| 706 | huge_frames_sent("hugeFramesSent"), |
Henrik Boström | 9fe1834 | 2019-05-16 18:38:20 +0200 | [diff] [blame] | 707 | total_packet_send_delay("totalPacketSendDelay"), |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 708 | quality_limitation_reason("qualityLimitationReason"), |
Byoungchan Lee | 7d23535 | 2021-05-28 21:32:04 +0900 | [diff] [blame] | 709 | quality_limitation_durations("qualityLimitationDurations"), |
Evan Shrubsole | cc62b16 | 2019-09-09 11:26:45 +0200 | [diff] [blame] | 710 | quality_limitation_resolution_changes( |
| 711 | "qualityLimitationResolutionChanges"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 712 | content_type("contentType"), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 713 | encoder_implementation("encoderImplementation"), |
| 714 | fir_count("firCount"), |
| 715 | pli_count("pliCount"), |
| 716 | nack_count("nackCount"), |
Philipp Hancke | 684e241 | 2022-07-28 12:41:00 +0200 | [diff] [blame] | 717 | qp_sum("qpSum"), |
| 718 | active("active") {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 719 | |
| 720 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats( |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 721 | const RTCOutboundRTPStreamStats& other) = default; |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 722 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 723 | RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 724 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 725 | // clang-format off |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 726 | WEBRTC_RTCSTATS_IMPL( |
Henrik Boström | 2f71b61 | 2021-03-23 15:18:55 +0100 | [diff] [blame] | 727 | RTCRemoteInboundRtpStreamStats, RTCReceivedRtpStreamStats, |
| 728 | "remote-inbound-rtp", |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 729 | &local_id, |
Di Wu | 86f04ad | 2021-02-28 23:36:03 -0800 | [diff] [blame] | 730 | &round_trip_time, |
Di Wu | 88a51b2 | 2021-03-01 11:22:06 -0800 | [diff] [blame] | 731 | &fraction_lost, |
| 732 | &total_round_trip_time, |
| 733 | &round_trip_time_measurements) |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 734 | // clang-format on |
| 735 | |
| 736 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 737 | const std::string& id, |
| 738 | int64_t timestamp_us) |
| 739 | : RTCRemoteInboundRtpStreamStats(std::string(id), timestamp_us) {} |
| 740 | |
| 741 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 742 | std::string&& id, |
| 743 | int64_t timestamp_us) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 744 | : RTCReceivedRtpStreamStats(std::move(id), timestamp_us), |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 745 | local_id("localId"), |
Di Wu | 86f04ad | 2021-02-28 23:36:03 -0800 | [diff] [blame] | 746 | round_trip_time("roundTripTime"), |
Di Wu | 88a51b2 | 2021-03-01 11:22:06 -0800 | [diff] [blame] | 747 | fraction_lost("fractionLost"), |
| 748 | total_round_trip_time("totalRoundTripTime"), |
| 749 | round_trip_time_measurements("roundTripTimeMeasurements") {} |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 750 | |
| 751 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 752 | const RTCRemoteInboundRtpStreamStats& other) = default; |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 753 | |
| 754 | RTCRemoteInboundRtpStreamStats::~RTCRemoteInboundRtpStreamStats() {} |
| 755 | |
| 756 | // clang-format off |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 757 | WEBRTC_RTCSTATS_IMPL( |
| 758 | RTCRemoteOutboundRtpStreamStats, RTCSentRtpStreamStats, |
| 759 | "remote-outbound-rtp", |
| 760 | &local_id, |
| 761 | &remote_timestamp, |
Ivo Creusen | 2562cf0 | 2021-09-03 14:51:22 +0000 | [diff] [blame] | 762 | &reports_sent, |
| 763 | &round_trip_time, |
| 764 | &round_trip_time_measurements, |
| 765 | &total_round_trip_time) |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 766 | // clang-format on |
| 767 | |
| 768 | RTCRemoteOutboundRtpStreamStats::RTCRemoteOutboundRtpStreamStats( |
| 769 | const std::string& id, |
| 770 | int64_t timestamp_us) |
| 771 | : RTCRemoteOutboundRtpStreamStats(std::string(id), timestamp_us) {} |
| 772 | |
| 773 | RTCRemoteOutboundRtpStreamStats::RTCRemoteOutboundRtpStreamStats( |
| 774 | std::string&& id, |
| 775 | int64_t timestamp_us) |
| 776 | : RTCSentRtpStreamStats(std::move(id), timestamp_us), |
| 777 | local_id("localId"), |
| 778 | remote_timestamp("remoteTimestamp"), |
Ivo Creusen | 2562cf0 | 2021-09-03 14:51:22 +0000 | [diff] [blame] | 779 | reports_sent("reportsSent"), |
| 780 | round_trip_time("roundTripTime"), |
| 781 | round_trip_time_measurements("roundTripTimeMeasurements"), |
| 782 | total_round_trip_time("totalRoundTripTime") {} |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 783 | |
| 784 | RTCRemoteOutboundRtpStreamStats::RTCRemoteOutboundRtpStreamStats( |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 785 | const RTCRemoteOutboundRtpStreamStats& other) = default; |
Alessio Bazzica | f7b1b95 | 2021-03-23 17:23:04 +0100 | [diff] [blame] | 786 | |
| 787 | RTCRemoteOutboundRtpStreamStats::~RTCRemoteOutboundRtpStreamStats() {} |
| 788 | |
| 789 | // clang-format off |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 790 | WEBRTC_RTCSTATS_IMPL(RTCMediaSourceStats, RTCStats, "parent-media-source", |
| 791 | &track_identifier, |
| 792 | &kind) |
| 793 | // clang-format on |
| 794 | |
| 795 | RTCMediaSourceStats::RTCMediaSourceStats(const std::string& id, |
| 796 | int64_t timestamp_us) |
| 797 | : RTCMediaSourceStats(std::string(id), timestamp_us) {} |
| 798 | |
| 799 | RTCMediaSourceStats::RTCMediaSourceStats(std::string&& id, int64_t timestamp_us) |
| 800 | : RTCStats(std::move(id), timestamp_us), |
| 801 | track_identifier("trackIdentifier"), |
| 802 | kind("kind") {} |
| 803 | |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 804 | RTCMediaSourceStats::RTCMediaSourceStats(const RTCMediaSourceStats& other) = |
| 805 | default; |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 806 | |
| 807 | RTCMediaSourceStats::~RTCMediaSourceStats() {} |
| 808 | |
| 809 | // clang-format off |
Henrik Boström | d2c336f | 2019-07-03 17:11:10 +0200 | [diff] [blame] | 810 | WEBRTC_RTCSTATS_IMPL(RTCAudioSourceStats, RTCMediaSourceStats, "media-source", |
| 811 | &audio_level, |
| 812 | &total_audio_energy, |
Taylor Brandstetter | 64851c0 | 2021-06-24 13:32:50 -0700 | [diff] [blame] | 813 | &total_samples_duration, |
| 814 | &echo_return_loss, |
| 815 | &echo_return_loss_enhancement) |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 816 | // clang-format on |
| 817 | |
| 818 | RTCAudioSourceStats::RTCAudioSourceStats(const std::string& id, |
| 819 | int64_t timestamp_us) |
| 820 | : RTCAudioSourceStats(std::string(id), timestamp_us) {} |
| 821 | |
| 822 | RTCAudioSourceStats::RTCAudioSourceStats(std::string&& id, int64_t timestamp_us) |
Henrik Boström | d2c336f | 2019-07-03 17:11:10 +0200 | [diff] [blame] | 823 | : RTCMediaSourceStats(std::move(id), timestamp_us), |
| 824 | audio_level("audioLevel"), |
| 825 | total_audio_energy("totalAudioEnergy"), |
Taylor Brandstetter | 64851c0 | 2021-06-24 13:32:50 -0700 | [diff] [blame] | 826 | total_samples_duration("totalSamplesDuration"), |
| 827 | echo_return_loss("echoReturnLoss"), |
| 828 | echo_return_loss_enhancement("echoReturnLossEnhancement") {} |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 829 | |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 830 | RTCAudioSourceStats::RTCAudioSourceStats(const RTCAudioSourceStats& other) = |
| 831 | default; |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 832 | |
| 833 | RTCAudioSourceStats::~RTCAudioSourceStats() {} |
| 834 | |
| 835 | // clang-format off |
| 836 | WEBRTC_RTCSTATS_IMPL(RTCVideoSourceStats, RTCMediaSourceStats, "media-source", |
| 837 | &width, |
| 838 | &height, |
| 839 | &frames, |
| 840 | &frames_per_second) |
| 841 | // clang-format on |
| 842 | |
| 843 | RTCVideoSourceStats::RTCVideoSourceStats(const std::string& id, |
| 844 | int64_t timestamp_us) |
| 845 | : RTCVideoSourceStats(std::string(id), timestamp_us) {} |
| 846 | |
| 847 | RTCVideoSourceStats::RTCVideoSourceStats(std::string&& id, int64_t timestamp_us) |
| 848 | : RTCMediaSourceStats(std::move(id), timestamp_us), |
| 849 | width("width"), |
| 850 | height("height"), |
| 851 | frames("frames"), |
| 852 | frames_per_second("framesPerSecond") {} |
| 853 | |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 854 | RTCVideoSourceStats::RTCVideoSourceStats(const RTCVideoSourceStats& other) = |
| 855 | default; |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 856 | |
| 857 | RTCVideoSourceStats::~RTCVideoSourceStats() {} |
| 858 | |
| 859 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 860 | WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport", |
| 861 | &bytes_sent, |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 862 | &packets_sent, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 863 | &bytes_received, |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 864 | &packets_received, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 865 | &rtcp_transport_stats_id, |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 866 | &dtls_state, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 867 | &selected_candidate_pair_id, |
| 868 | &local_certificate_id, |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 869 | &remote_certificate_id, |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 870 | &tls_version, |
| 871 | &dtls_cipher, |
Philipp Hancke | 69c1df2 | 2022-04-22 15:46:24 +0200 | [diff] [blame] | 872 | &dtls_role, |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 873 | &srtp_cipher, |
Philipp Hancke | cc1b9b0 | 2022-05-04 18:58:26 +0200 | [diff] [blame] | 874 | &selected_candidate_pair_changes, |
Philipp Hancke | 95b1a34 | 2022-05-05 07:53:54 +0200 | [diff] [blame] | 875 | &ice_role, |
Philipp Hancke | 1f49157 | 2022-05-09 17:43:31 +0200 | [diff] [blame] | 876 | &ice_local_username_fragment, |
| 877 | &ice_state) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 878 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 879 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 880 | RTCTransportStats::RTCTransportStats(const std::string& id, |
| 881 | int64_t timestamp_us) |
| 882 | : RTCTransportStats(std::string(id), timestamp_us) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 883 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 884 | RTCTransportStats::RTCTransportStats(std::string&& id, int64_t timestamp_us) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 885 | : RTCStats(std::move(id), timestamp_us), |
| 886 | bytes_sent("bytesSent"), |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 887 | packets_sent("packetsSent"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 888 | bytes_received("bytesReceived"), |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 889 | packets_received("packetsReceived"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 890 | rtcp_transport_stats_id("rtcpTransportStatsId"), |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 891 | dtls_state("dtlsState"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 892 | selected_candidate_pair_id("selectedCandidatePairId"), |
| 893 | local_certificate_id("localCertificateId"), |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 894 | remote_certificate_id("remoteCertificateId"), |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 895 | tls_version("tlsVersion"), |
| 896 | dtls_cipher("dtlsCipher"), |
Philipp Hancke | 69c1df2 | 2022-04-22 15:46:24 +0200 | [diff] [blame] | 897 | dtls_role("dtlsRole"), |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 898 | srtp_cipher("srtpCipher"), |
Philipp Hancke | cc1b9b0 | 2022-05-04 18:58:26 +0200 | [diff] [blame] | 899 | selected_candidate_pair_changes("selectedCandidatePairChanges"), |
Philipp Hancke | 95b1a34 | 2022-05-05 07:53:54 +0200 | [diff] [blame] | 900 | ice_role("iceRole"), |
Philipp Hancke | 1f49157 | 2022-05-09 17:43:31 +0200 | [diff] [blame] | 901 | ice_local_username_fragment("iceLocalUsernameFragment"), |
| 902 | ice_state("iceState") {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 903 | |
Philipp Hancke | 6738b01 | 2022-10-11 13:04:03 +0200 | [diff] [blame] | 904 | RTCTransportStats::RTCTransportStats(const RTCTransportStats& other) = default; |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 905 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 906 | RTCTransportStats::~RTCTransportStats() {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 907 | |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 908 | } // namespace webrtc |