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