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, |
hbos | d17a5a7 | 2017-01-02 08:09:59 -0800 | [diff] [blame] | 268 | &url, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 269 | &deleted) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 270 | // clang-format on |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 271 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 272 | RTCIceCandidateStats::RTCIceCandidateStats(const std::string& id, |
| 273 | int64_t timestamp_us, |
| 274 | bool is_remote) |
| 275 | : RTCIceCandidateStats(std::string(id), timestamp_us, is_remote) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 276 | |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 277 | RTCIceCandidateStats::RTCIceCandidateStats(std::string&& id, |
| 278 | int64_t timestamp_us, |
| 279 | bool is_remote) |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 280 | : RTCStats(std::move(id), timestamp_us), |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 281 | transport_id("transportId"), |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 282 | is_remote("isRemote", is_remote), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 283 | network_type("networkType"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 284 | ip("ip"), |
Philipp Hancke | a9ba450 | 2021-03-22 13:22:54 +0100 | [diff] [blame] | 285 | address("address"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 286 | port("port"), |
| 287 | protocol("protocol"), |
Philipp Hancke | 9551375 | 2018-09-27 14:40:08 +0200 | [diff] [blame] | 288 | relay_protocol("relayProtocol"), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 289 | candidate_type("candidateType"), |
| 290 | priority("priority"), |
hbos | d17a5a7 | 2017-01-02 08:09:59 -0800 | [diff] [blame] | 291 | url("url"), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 292 | deleted("deleted", false) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 293 | |
| 294 | RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other) |
| 295 | : RTCStats(other.id(), other.timestamp_us()), |
hbos | b4e426e | 2017-01-02 09:59:31 -0800 | [diff] [blame] | 296 | transport_id(other.transport_id), |
hbos | c3a2b7f | 2017-01-02 04:46:15 -0800 | [diff] [blame] | 297 | is_remote(other.is_remote), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 298 | network_type(other.network_type), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 299 | ip(other.ip), |
Philipp Hancke | a9ba450 | 2021-03-22 13:22:54 +0100 | [diff] [blame] | 300 | address(other.address), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 301 | port(other.port), |
| 302 | protocol(other.protocol), |
Philipp Hancke | 9551375 | 2018-09-27 14:40:08 +0200 | [diff] [blame] | 303 | relay_protocol(other.relay_protocol), |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 304 | candidate_type(other.candidate_type), |
| 305 | priority(other.priority), |
hbos | d17a5a7 | 2017-01-02 08:09:59 -0800 | [diff] [blame] | 306 | url(other.url), |
Gary Liu | 37e489c | 2017-11-21 10:49:36 -0800 | [diff] [blame] | 307 | deleted(other.deleted) {} |
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 | RTCIceCandidateStats::~RTCIceCandidateStats() {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 310 | |
| 311 | const char RTCLocalIceCandidateStats::kType[] = "local-candidate"; |
| 312 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 313 | RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(const std::string& id, |
| 314 | int64_t timestamp_us) |
| 315 | : RTCIceCandidateStats(id, timestamp_us, false) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 316 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 317 | RTCLocalIceCandidateStats::RTCLocalIceCandidateStats(std::string&& id, |
| 318 | int64_t timestamp_us) |
| 319 | : RTCIceCandidateStats(std::move(id), timestamp_us, false) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 320 | |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 321 | std::unique_ptr<RTCStats> RTCLocalIceCandidateStats::copy() const { |
| 322 | return std::unique_ptr<RTCStats>(new RTCLocalIceCandidateStats(*this)); |
| 323 | } |
| 324 | |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 325 | const char* RTCLocalIceCandidateStats::type() const { |
| 326 | return kType; |
| 327 | } |
| 328 | |
| 329 | const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate"; |
| 330 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 331 | RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(const std::string& id, |
| 332 | int64_t timestamp_us) |
| 333 | : RTCIceCandidateStats(id, timestamp_us, true) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 334 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 335 | RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats(std::string&& id, |
| 336 | int64_t timestamp_us) |
| 337 | : RTCIceCandidateStats(std::move(id), timestamp_us, true) {} |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 338 | |
Henrik Boström | 1df1bf8 | 2018-03-20 13:24:20 +0100 | [diff] [blame] | 339 | std::unique_ptr<RTCStats> RTCRemoteIceCandidateStats::copy() const { |
| 340 | return std::unique_ptr<RTCStats>(new RTCRemoteIceCandidateStats(*this)); |
| 341 | } |
| 342 | |
hbos | ab9f6e4 | 2016-10-07 02:18:47 -0700 | [diff] [blame] | 343 | const char* RTCRemoteIceCandidateStats::type() const { |
| 344 | return kType; |
| 345 | } |
| 346 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 347 | // clang-format off |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 348 | WEBRTC_RTCSTATS_IMPL(RTCMediaStreamStats, RTCStats, "stream", |
| 349 | &stream_identifier, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 350 | &track_ids) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 351 | // clang-format on |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 352 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 353 | RTCMediaStreamStats::RTCMediaStreamStats(const std::string& id, |
| 354 | int64_t timestamp_us) |
| 355 | : RTCMediaStreamStats(std::string(id), timestamp_us) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 356 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 357 | RTCMediaStreamStats::RTCMediaStreamStats(std::string&& id, int64_t timestamp_us) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 358 | : RTCStats(std::move(id), timestamp_us), |
| 359 | stream_identifier("streamIdentifier"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 360 | track_ids("trackIds") {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 361 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 362 | RTCMediaStreamStats::RTCMediaStreamStats(const RTCMediaStreamStats& other) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 363 | : RTCStats(other.id(), other.timestamp_us()), |
| 364 | stream_identifier(other.stream_identifier), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 365 | track_ids(other.track_ids) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 366 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 367 | RTCMediaStreamStats::~RTCMediaStreamStats() {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 368 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 369 | // clang-format off |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 370 | WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track", |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 371 | &track_identifier, |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 372 | &media_source_id, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 373 | &remote_source, |
| 374 | &ended, |
| 375 | &detached, |
| 376 | &kind, |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 377 | &jitter_buffer_delay, |
Chen Xing | 0acffb5 | 2019-01-15 15:46:29 +0100 | [diff] [blame] | 378 | &jitter_buffer_emitted_count, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 379 | &frame_width, |
| 380 | &frame_height, |
| 381 | &frames_per_second, |
| 382 | &frames_sent, |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 383 | &huge_frames_sent, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 384 | &frames_received, |
| 385 | &frames_decoded, |
| 386 | &frames_dropped, |
| 387 | &frames_corrupted, |
| 388 | &partial_frames_lost, |
| 389 | &full_frames_lost, |
| 390 | &audio_level, |
| 391 | &total_audio_energy, |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 392 | &echo_return_loss, |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 393 | &echo_return_loss_enhancement, |
| 394 | &total_samples_received, |
| 395 | &total_samples_duration, |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 396 | &concealed_samples, |
Henrik Boström | 21e99da | 2019-08-21 12:09:51 +0200 | [diff] [blame] | 397 | &silent_concealed_samples, |
Ruslan Burakov | 8af8896 | 2018-11-22 17:21:10 +0100 | [diff] [blame] | 398 | &concealment_events, |
Henrik Boström | 21e99da | 2019-08-21 12:09:51 +0200 | [diff] [blame] | 399 | &inserted_samples_for_deceleration, |
| 400 | &removed_samples_for_acceleration, |
Jakob Ivarsson | 352ce5c | 2018-11-27 12:52:16 +0100 | [diff] [blame] | 401 | &jitter_buffer_flushes, |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 402 | &delayed_packet_outage_samples, |
Jakob Ivarsson | 232b3fd | 2019-03-06 09:18:40 +0100 | [diff] [blame] | 403 | &relative_packet_arrival_delay, |
Artem Titov | e618cc9 | 2020-03-11 11:18:54 +0100 | [diff] [blame] | 404 | &jitter_buffer_target_delay, |
Henrik Lundin | 44125fa | 2019-04-29 17:00:46 +0200 | [diff] [blame] | 405 | &interruption_count, |
| 406 | &total_interruption_duration, |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 407 | &freeze_count, |
| 408 | &pause_count, |
| 409 | &total_freezes_duration, |
| 410 | &total_pauses_duration, |
| 411 | &total_frames_duration, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 412 | &sum_squared_frame_durations) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 413 | // clang-format on |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 414 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 415 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(const std::string& id, |
| 416 | int64_t timestamp_us, |
| 417 | const char* kind) |
| 418 | : RTCMediaStreamTrackStats(std::string(id), timestamp_us, kind) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 419 | |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 420 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(std::string&& id, |
| 421 | int64_t timestamp_us, |
| 422 | const char* kind) |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 423 | : RTCStats(std::move(id), timestamp_us), |
| 424 | track_identifier("trackIdentifier"), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 425 | media_source_id("mediaSourceId"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 426 | remote_source("remoteSource"), |
| 427 | ended("ended"), |
| 428 | detached("detached"), |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 429 | kind("kind", kind), |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 430 | jitter_buffer_delay("jitterBufferDelay"), |
Chen Xing | 0acffb5 | 2019-01-15 15:46:29 +0100 | [diff] [blame] | 431 | jitter_buffer_emitted_count("jitterBufferEmittedCount"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 432 | frame_width("frameWidth"), |
| 433 | frame_height("frameHeight"), |
| 434 | frames_per_second("framesPerSecond"), |
| 435 | frames_sent("framesSent"), |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 436 | huge_frames_sent("hugeFramesSent"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 437 | frames_received("framesReceived"), |
| 438 | frames_decoded("framesDecoded"), |
| 439 | frames_dropped("framesDropped"), |
| 440 | frames_corrupted("framesCorrupted"), |
| 441 | partial_frames_lost("partialFramesLost"), |
| 442 | full_frames_lost("fullFramesLost"), |
| 443 | audio_level("audioLevel"), |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 444 | total_audio_energy("totalAudioEnergy"), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 445 | echo_return_loss("echoReturnLoss"), |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 446 | echo_return_loss_enhancement("echoReturnLossEnhancement"), |
| 447 | total_samples_received("totalSamplesReceived"), |
| 448 | total_samples_duration("totalSamplesDuration"), |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 449 | concealed_samples("concealedSamples"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 450 | silent_concealed_samples("silentConcealedSamples"), |
Ruslan Burakov | 8af8896 | 2018-11-22 17:21:10 +0100 | [diff] [blame] | 451 | concealment_events("concealmentEvents"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 452 | inserted_samples_for_deceleration("insertedSamplesForDeceleration"), |
| 453 | removed_samples_for_acceleration("removedSamplesForAcceleration"), |
Jakob Ivarsson | 758d946 | 2019-03-19 15:38:49 +0100 | [diff] [blame] | 454 | jitter_buffer_flushes( |
| 455 | "jitterBufferFlushes", |
| 456 | {NonStandardGroupId::kRtcAudioJitterBufferMaxPackets}), |
| 457 | delayed_packet_outage_samples( |
| 458 | "delayedPacketOutageSamples", |
| 459 | {NonStandardGroupId::kRtcAudioJitterBufferMaxPackets, |
| 460 | NonStandardGroupId::kRtcStatsRelativePacketArrivalDelay}), |
| 461 | relative_packet_arrival_delay( |
| 462 | "relativePacketArrivalDelay", |
| 463 | {NonStandardGroupId::kRtcStatsRelativePacketArrivalDelay}), |
Artem Titov | e618cc9 | 2020-03-11 11:18:54 +0100 | [diff] [blame] | 464 | jitter_buffer_target_delay("jitterBufferTargetDelay"), |
Henrik Lundin | 44125fa | 2019-04-29 17:00:46 +0200 | [diff] [blame] | 465 | interruption_count("interruptionCount"), |
| 466 | total_interruption_duration("totalInterruptionDuration"), |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 467 | freeze_count("freezeCount"), |
| 468 | pause_count("pauseCount"), |
| 469 | total_freezes_duration("totalFreezesDuration"), |
| 470 | total_pauses_duration("totalPausesDuration"), |
| 471 | total_frames_duration("totalFramesDuration"), |
| 472 | sum_squared_frame_durations("sumOfSquaredFramesDuration") { |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 473 | RTC_DCHECK(kind == RTCMediaStreamTrackKind::kAudio || |
| 474 | kind == RTCMediaStreamTrackKind::kVideo); |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 475 | } |
| 476 | |
| 477 | RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( |
| 478 | const RTCMediaStreamTrackStats& other) |
| 479 | : RTCStats(other.id(), other.timestamp_us()), |
| 480 | track_identifier(other.track_identifier), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 481 | media_source_id(other.media_source_id), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 482 | remote_source(other.remote_source), |
| 483 | ended(other.ended), |
| 484 | detached(other.detached), |
hbos | 160e4a7 | 2017-01-17 02:53:23 -0800 | [diff] [blame] | 485 | kind(other.kind), |
Gustaf Ullberg | b0a0207 | 2017-10-02 12:00:34 +0200 | [diff] [blame] | 486 | jitter_buffer_delay(other.jitter_buffer_delay), |
Chen Xing | 0acffb5 | 2019-01-15 15:46:29 +0100 | [diff] [blame] | 487 | jitter_buffer_emitted_count(other.jitter_buffer_emitted_count), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 488 | frame_width(other.frame_width), |
| 489 | frame_height(other.frame_height), |
| 490 | frames_per_second(other.frames_per_second), |
| 491 | frames_sent(other.frames_sent), |
Ilya Nikolaevskiy | 70473fc | 2018-02-28 16:35:03 +0100 | [diff] [blame] | 492 | huge_frames_sent(other.huge_frames_sent), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 493 | frames_received(other.frames_received), |
| 494 | frames_decoded(other.frames_decoded), |
| 495 | frames_dropped(other.frames_dropped), |
| 496 | frames_corrupted(other.frames_corrupted), |
| 497 | partial_frames_lost(other.partial_frames_lost), |
| 498 | full_frames_lost(other.full_frames_lost), |
| 499 | audio_level(other.audio_level), |
zstein | e76bd3a | 2017-07-14 12:17:49 -0700 | [diff] [blame] | 500 | total_audio_energy(other.total_audio_energy), |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 501 | echo_return_loss(other.echo_return_loss), |
Steve Anton | 2dbc69f | 2017-08-24 17:15:13 -0700 | [diff] [blame] | 502 | echo_return_loss_enhancement(other.echo_return_loss_enhancement), |
| 503 | total_samples_received(other.total_samples_received), |
| 504 | total_samples_duration(other.total_samples_duration), |
Gustaf Ullberg | 9a2e906 | 2017-09-18 09:28:20 +0200 | [diff] [blame] | 505 | concealed_samples(other.concealed_samples), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 506 | silent_concealed_samples(other.silent_concealed_samples), |
Ruslan Burakov | 8af8896 | 2018-11-22 17:21:10 +0100 | [diff] [blame] | 507 | concealment_events(other.concealment_events), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 508 | inserted_samples_for_deceleration( |
| 509 | other.inserted_samples_for_deceleration), |
| 510 | removed_samples_for_acceleration(other.removed_samples_for_acceleration), |
Jakob Ivarsson | 352ce5c | 2018-11-27 12:52:16 +0100 | [diff] [blame] | 511 | jitter_buffer_flushes(other.jitter_buffer_flushes), |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 512 | delayed_packet_outage_samples(other.delayed_packet_outage_samples), |
Jakob Ivarsson | 232b3fd | 2019-03-06 09:18:40 +0100 | [diff] [blame] | 513 | relative_packet_arrival_delay(other.relative_packet_arrival_delay), |
Artem Titov | e618cc9 | 2020-03-11 11:18:54 +0100 | [diff] [blame] | 514 | jitter_buffer_target_delay(other.jitter_buffer_target_delay), |
Henrik Lundin | 44125fa | 2019-04-29 17:00:46 +0200 | [diff] [blame] | 515 | interruption_count(other.interruption_count), |
| 516 | total_interruption_duration(other.total_interruption_duration), |
Sergey Silkin | 0237106 | 2019-01-31 16:45:42 +0100 | [diff] [blame] | 517 | freeze_count(other.freeze_count), |
| 518 | pause_count(other.pause_count), |
| 519 | total_freezes_duration(other.total_freezes_duration), |
| 520 | total_pauses_duration(other.total_pauses_duration), |
| 521 | total_frames_duration(other.total_frames_duration), |
| 522 | sum_squared_frame_durations(other.sum_squared_frame_durations) {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 523 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 524 | RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() {} |
hbos | 09bc128 | 2016-11-08 06:29:22 -0800 | [diff] [blame] | 525 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 526 | // clang-format off |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 527 | WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection", |
| 528 | &data_channels_opened, |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 529 | &data_channels_closed) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 530 | // clang-format on |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 531 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 532 | RTCPeerConnectionStats::RTCPeerConnectionStats(const std::string& id, |
| 533 | int64_t timestamp_us) |
| 534 | : RTCPeerConnectionStats(std::string(id), timestamp_us) {} |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 535 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 536 | RTCPeerConnectionStats::RTCPeerConnectionStats(std::string&& id, |
| 537 | int64_t timestamp_us) |
hbos | 0e6758d | 2016-08-31 07:57:36 -0700 | [diff] [blame] | 538 | : RTCStats(std::move(id), timestamp_us), |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 539 | data_channels_opened("dataChannelsOpened"), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 540 | data_channels_closed("dataChannelsClosed") {} |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 541 | |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 542 | RTCPeerConnectionStats::RTCPeerConnectionStats( |
| 543 | const RTCPeerConnectionStats& other) |
| 544 | : RTCStats(other.id(), other.timestamp_us()), |
| 545 | data_channels_opened(other.data_channels_opened), |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 546 | data_channels_closed(other.data_channels_closed) {} |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 547 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 548 | RTCPeerConnectionStats::~RTCPeerConnectionStats() {} |
hbos | fc5e050 | 2016-10-06 02:06:10 -0700 | [diff] [blame] | 549 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 550 | // clang-format off |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 551 | WEBRTC_RTCSTATS_IMPL(RTCRTPStreamStats, RTCStats, "rtp", |
| 552 | &ssrc, |
Philipp Hancke | 3bc0166 | 2018-08-28 14:55:03 +0200 | [diff] [blame] | 553 | &kind, |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 554 | &track_id, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 555 | &transport_id, |
| 556 | &codec_id, |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 557 | &media_type) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 558 | // clang-format on |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 559 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 560 | RTCRTPStreamStats::RTCRTPStreamStats(const std::string& id, |
| 561 | int64_t timestamp_us) |
| 562 | : RTCRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 563 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 564 | RTCRTPStreamStats::RTCRTPStreamStats(std::string&& id, int64_t timestamp_us) |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 565 | : RTCStats(std::move(id), timestamp_us), |
| 566 | ssrc("ssrc"), |
Philipp Hancke | 3bc0166 | 2018-08-28 14:55:03 +0200 | [diff] [blame] | 567 | kind("kind"), |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 568 | track_id("trackId"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 569 | transport_id("transportId"), |
| 570 | codec_id("codecId"), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 571 | media_type("mediaType") {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 572 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 573 | RTCRTPStreamStats::RTCRTPStreamStats(const RTCRTPStreamStats& other) |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 574 | : RTCStats(other.id(), other.timestamp_us()), |
| 575 | ssrc(other.ssrc), |
Philipp Hancke | 3bc0166 | 2018-08-28 14:55:03 +0200 | [diff] [blame] | 576 | kind(other.kind), |
hbos | b0ae920 | 2017-01-27 06:35:16 -0800 | [diff] [blame] | 577 | track_id(other.track_id), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 578 | transport_id(other.transport_id), |
| 579 | codec_id(other.codec_id), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 580 | media_type(other.media_type) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 581 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 582 | RTCRTPStreamStats::~RTCRTPStreamStats() {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 583 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 584 | // clang-format off |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 585 | WEBRTC_RTCSTATS_IMPL( |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 586 | RTCReceivedRtpStreamStats, RTCRTPStreamStats, "received-rtp", |
| 587 | &jitter, |
| 588 | &packets_lost) |
| 589 | // clang-format on |
| 590 | |
| 591 | RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(const std::string&& id, |
| 592 | int64_t timestamp_us) |
| 593 | : RTCReceivedRtpStreamStats(std::string(id), timestamp_us) {} |
| 594 | |
| 595 | RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats(std::string&& id, |
| 596 | int64_t timestamp_us) |
| 597 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
| 598 | jitter("jitter"), |
| 599 | packets_lost("packetsLost") {} |
| 600 | |
| 601 | RTCReceivedRtpStreamStats::RTCReceivedRtpStreamStats( |
| 602 | const RTCReceivedRtpStreamStats& other) |
| 603 | : RTCRTPStreamStats(other), |
| 604 | jitter(other.jitter), |
| 605 | packets_lost(other.packets_lost) {} |
| 606 | |
| 607 | RTCReceivedRtpStreamStats::~RTCReceivedRtpStreamStats() {} |
| 608 | |
| 609 | // clang-format off |
| 610 | WEBRTC_RTCSTATS_IMPL( |
| 611 | RTCInboundRTPStreamStats, RTCReceivedRtpStreamStats, "inbound-rtp", |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 612 | &packets_received, |
Henrik Boström | 4a5dab0 | 2020-01-28 11:15:35 +0100 | [diff] [blame] | 613 | &fec_packets_received, |
| 614 | &fec_packets_discarded, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 615 | &bytes_received, |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 616 | &header_bytes_received, |
Henrik Boström | 01738c6 | 2019-04-15 17:32:00 +0200 | [diff] [blame] | 617 | &last_packet_received_timestamp, |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 618 | &jitter_buffer_delay, |
| 619 | &jitter_buffer_emitted_count, |
| 620 | &total_samples_received, |
| 621 | &concealed_samples, |
| 622 | &silent_concealed_samples, |
| 623 | &concealment_events, |
| 624 | &inserted_samples_for_deceleration, |
| 625 | &removed_samples_for_acceleration, |
| 626 | &audio_level, |
| 627 | &total_audio_energy, |
| 628 | &total_samples_duration, |
| 629 | &frames_received, |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 630 | &round_trip_time, |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 631 | &packets_discarded, |
| 632 | &packets_repaired, |
| 633 | &burst_packets_lost, |
| 634 | &burst_packets_discarded, |
| 635 | &burst_loss_count, |
| 636 | &burst_discard_count, |
| 637 | &burst_loss_rate, |
| 638 | &burst_discard_rate, |
| 639 | &gap_loss_rate, |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 640 | &gap_discard_rate, |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 641 | &frame_width, |
| 642 | &frame_height, |
| 643 | &frame_bit_depth, |
| 644 | &frames_per_second, |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 645 | &frames_decoded, |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 646 | &key_frames_decoded, |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 647 | &frames_dropped, |
Johannes Kron | bfd343b | 2019-07-01 10:07:50 +0200 | [diff] [blame] | 648 | &total_decode_time, |
Johannes Kron | 00376e1 | 2019-11-25 10:25:42 +0100 | [diff] [blame] | 649 | &total_inter_frame_delay, |
| 650 | &total_squared_inter_frame_delay, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 651 | &content_type, |
Åsa Persson | fcf79cc | 2019-10-22 15:23:44 +0200 | [diff] [blame] | 652 | &estimated_playout_timestamp, |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 653 | &decoder_implementation, |
| 654 | &fir_count, |
| 655 | &pli_count, |
| 656 | &nack_count, |
| 657 | &qp_sum, |
| 658 | &is_remote) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 659 | // clang-format on |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 660 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 661 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(const std::string& id, |
| 662 | int64_t timestamp_us) |
| 663 | : RTCInboundRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 664 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 665 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(std::string&& id, |
| 666 | int64_t timestamp_us) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 667 | : RTCReceivedRtpStreamStats(std::move(id), timestamp_us), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 668 | packets_received("packetsReceived"), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 669 | fec_packets_received("fecPacketsReceived"), |
| 670 | fec_packets_discarded("fecPacketsDiscarded"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 671 | bytes_received("bytesReceived"), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 672 | header_bytes_received("headerBytesReceived"), |
Henrik Boström | 01738c6 | 2019-04-15 17:32:00 +0200 | [diff] [blame] | 673 | last_packet_received_timestamp("lastPacketReceivedTimestamp"), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 674 | jitter_buffer_delay("jitterBufferDelay"), |
| 675 | jitter_buffer_emitted_count("jitterBufferEmittedCount"), |
| 676 | total_samples_received("totalSamplesReceived"), |
| 677 | concealed_samples("concealedSamples"), |
| 678 | silent_concealed_samples("silentConcealedSamples"), |
| 679 | concealment_events("concealmentEvents"), |
| 680 | inserted_samples_for_deceleration("insertedSamplesForDeceleration"), |
| 681 | removed_samples_for_acceleration("removedSamplesForAcceleration"), |
| 682 | audio_level("audioLevel"), |
| 683 | total_audio_energy("totalAudioEnergy"), |
| 684 | total_samples_duration("totalSamplesDuration"), |
| 685 | frames_received("framesReceived"), |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 686 | round_trip_time("roundTripTime"), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 687 | packets_discarded("packetsDiscarded"), |
| 688 | packets_repaired("packetsRepaired"), |
| 689 | burst_packets_lost("burstPacketsLost"), |
| 690 | burst_packets_discarded("burstPacketsDiscarded"), |
| 691 | burst_loss_count("burstLossCount"), |
| 692 | burst_discard_count("burstDiscardCount"), |
| 693 | burst_loss_rate("burstLossRate"), |
| 694 | burst_discard_rate("burstDiscardRate"), |
| 695 | gap_loss_rate("gapLossRate"), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 696 | gap_discard_rate("gapDiscardRate"), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 697 | frame_width("frameWidth"), |
| 698 | frame_height("frameHeight"), |
| 699 | frame_bit_depth("frameBitDepth"), |
| 700 | frames_per_second("framesPerSecond"), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 701 | frames_decoded("framesDecoded"), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 702 | key_frames_decoded("keyFramesDecoded"), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 703 | frames_dropped("framesDropped"), |
Johannes Kron | bfd343b | 2019-07-01 10:07:50 +0200 | [diff] [blame] | 704 | total_decode_time("totalDecodeTime"), |
Johannes Kron | 00376e1 | 2019-11-25 10:25:42 +0100 | [diff] [blame] | 705 | total_inter_frame_delay("totalInterFrameDelay"), |
| 706 | total_squared_inter_frame_delay("totalSquaredInterFrameDelay"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 707 | content_type("contentType"), |
Åsa Persson | fcf79cc | 2019-10-22 15:23:44 +0200 | [diff] [blame] | 708 | estimated_playout_timestamp("estimatedPlayoutTimestamp"), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 709 | decoder_implementation("decoderImplementation"), |
| 710 | fir_count("firCount"), |
| 711 | pli_count("pliCount"), |
| 712 | nack_count("nackCount"), |
| 713 | qp_sum("qpSum"), |
| 714 | is_remote("isRemote") {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 715 | |
| 716 | RTCInboundRTPStreamStats::RTCInboundRTPStreamStats( |
| 717 | const RTCInboundRTPStreamStats& other) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 718 | : RTCReceivedRtpStreamStats(other), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 719 | packets_received(other.packets_received), |
Ivo Creusen | 8d8ffdb | 2019-04-30 09:45:21 +0200 | [diff] [blame] | 720 | fec_packets_received(other.fec_packets_received), |
| 721 | fec_packets_discarded(other.fec_packets_discarded), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 722 | bytes_received(other.bytes_received), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 723 | header_bytes_received(other.header_bytes_received), |
Henrik Boström | 01738c6 | 2019-04-15 17:32:00 +0200 | [diff] [blame] | 724 | last_packet_received_timestamp(other.last_packet_received_timestamp), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 725 | jitter_buffer_delay(other.jitter_buffer_delay), |
| 726 | jitter_buffer_emitted_count(other.jitter_buffer_emitted_count), |
| 727 | total_samples_received(other.total_samples_received), |
| 728 | concealed_samples(other.concealed_samples), |
| 729 | silent_concealed_samples(other.silent_concealed_samples), |
| 730 | concealment_events(other.concealment_events), |
| 731 | inserted_samples_for_deceleration( |
| 732 | other.inserted_samples_for_deceleration), |
| 733 | removed_samples_for_acceleration(other.removed_samples_for_acceleration), |
| 734 | audio_level(other.audio_level), |
| 735 | total_audio_energy(other.total_audio_energy), |
| 736 | total_samples_duration(other.total_samples_duration), |
| 737 | frames_received(other.frames_received), |
hbos | a7a9be1 | 2017-03-01 01:02:45 -0800 | [diff] [blame] | 738 | round_trip_time(other.round_trip_time), |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 739 | packets_discarded(other.packets_discarded), |
| 740 | packets_repaired(other.packets_repaired), |
| 741 | burst_packets_lost(other.burst_packets_lost), |
| 742 | burst_packets_discarded(other.burst_packets_discarded), |
| 743 | burst_loss_count(other.burst_loss_count), |
| 744 | burst_discard_count(other.burst_discard_count), |
| 745 | burst_loss_rate(other.burst_loss_rate), |
| 746 | burst_discard_rate(other.burst_discard_rate), |
| 747 | gap_loss_rate(other.gap_loss_rate), |
hbos | 6769c49 | 2017-01-02 08:35:13 -0800 | [diff] [blame] | 748 | gap_discard_rate(other.gap_discard_rate), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 749 | frame_width(other.frame_width), |
| 750 | frame_height(other.frame_height), |
| 751 | frame_bit_depth(other.frame_bit_depth), |
| 752 | frames_per_second(other.frames_per_second), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 753 | frames_decoded(other.frames_decoded), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 754 | key_frames_decoded(other.key_frames_decoded), |
Eldar Rello | 4e5bc9f | 2020-07-06 14:18:07 +0300 | [diff] [blame] | 755 | frames_dropped(other.frames_dropped), |
Johannes Kron | bfd343b | 2019-07-01 10:07:50 +0200 | [diff] [blame] | 756 | total_decode_time(other.total_decode_time), |
Johannes Kron | 00376e1 | 2019-11-25 10:25:42 +0100 | [diff] [blame] | 757 | total_inter_frame_delay(other.total_inter_frame_delay), |
| 758 | total_squared_inter_frame_delay(other.total_squared_inter_frame_delay), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 759 | content_type(other.content_type), |
Åsa Persson | fcf79cc | 2019-10-22 15:23:44 +0200 | [diff] [blame] | 760 | estimated_playout_timestamp(other.estimated_playout_timestamp), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 761 | decoder_implementation(other.decoder_implementation), |
| 762 | fir_count(other.fir_count), |
| 763 | pli_count(other.pli_count), |
| 764 | nack_count(other.nack_count), |
| 765 | qp_sum(other.qp_sum), |
| 766 | is_remote(other.is_remote) {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 767 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 768 | RTCInboundRTPStreamStats::~RTCInboundRTPStreamStats() {} |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 769 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 770 | // clang-format off |
hbos | eeafe94 | 2016-11-01 03:00:17 -0700 | [diff] [blame] | 771 | WEBRTC_RTCSTATS_IMPL( |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 772 | RTCOutboundRTPStreamStats, RTCRTPStreamStats, "outbound-rtp", |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 773 | &media_source_id, |
Henrik Boström | 4f40fa5 | 2019-12-19 13:27:27 +0100 | [diff] [blame] | 774 | &remote_id, |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 775 | &rid, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 776 | &packets_sent, |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 777 | &retransmitted_packets_sent, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 778 | &bytes_sent, |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 779 | &header_bytes_sent, |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 780 | &retransmitted_bytes_sent, |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 781 | &target_bitrate, |
Henrik Boström | f71362f | 2019-04-08 16:14:23 +0200 | [diff] [blame] | 782 | &frames_encoded, |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 783 | &key_frames_encoded, |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 784 | &total_encode_time, |
Henrik Boström | 23aff9b | 2019-05-20 15:15:38 +0200 | [diff] [blame] | 785 | &total_encoded_bytes_target, |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 786 | &frame_width, |
| 787 | &frame_height, |
| 788 | &frames_per_second, |
| 789 | &frames_sent, |
| 790 | &huge_frames_sent, |
Henrik Boström | 9fe1834 | 2019-05-16 18:38:20 +0200 | [diff] [blame] | 791 | &total_packet_send_delay, |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 792 | &quality_limitation_reason, |
Evan Shrubsole | cc62b16 | 2019-09-09 11:26:45 +0200 | [diff] [blame] | 793 | &quality_limitation_resolution_changes, |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 794 | &content_type, |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 795 | &encoder_implementation, |
| 796 | &fir_count, |
| 797 | &pli_count, |
| 798 | &nack_count, |
| 799 | &qp_sum, |
| 800 | &is_remote) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 801 | // clang-format on |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 802 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 803 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(const std::string& id, |
| 804 | int64_t timestamp_us) |
| 805 | : RTCOutboundRTPStreamStats(std::string(id), timestamp_us) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 806 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 807 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(std::string&& id, |
| 808 | int64_t timestamp_us) |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 809 | : RTCRTPStreamStats(std::move(id), timestamp_us), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 810 | media_source_id("mediaSourceId"), |
Henrik Boström | 4f40fa5 | 2019-12-19 13:27:27 +0100 | [diff] [blame] | 811 | remote_id("remoteId"), |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 812 | rid("rid"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 813 | packets_sent("packetsSent"), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 814 | retransmitted_packets_sent("retransmittedPacketsSent"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 815 | bytes_sent("bytesSent"), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 816 | header_bytes_sent("headerBytesSent"), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 817 | retransmitted_bytes_sent("retransmittedBytesSent"), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 818 | target_bitrate("targetBitrate"), |
Henrik Boström | f71362f | 2019-04-08 16:14:23 +0200 | [diff] [blame] | 819 | frames_encoded("framesEncoded"), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 820 | key_frames_encoded("keyFramesEncoded"), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 821 | total_encode_time("totalEncodeTime"), |
Henrik Boström | 23aff9b | 2019-05-20 15:15:38 +0200 | [diff] [blame] | 822 | total_encoded_bytes_target("totalEncodedBytesTarget"), |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 823 | frame_width("frameWidth"), |
| 824 | frame_height("frameHeight"), |
| 825 | frames_per_second("framesPerSecond"), |
| 826 | frames_sent("framesSent"), |
| 827 | huge_frames_sent("hugeFramesSent"), |
Henrik Boström | 9fe1834 | 2019-05-16 18:38:20 +0200 | [diff] [blame] | 828 | total_packet_send_delay("totalPacketSendDelay"), |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 829 | quality_limitation_reason("qualityLimitationReason"), |
Evan Shrubsole | cc62b16 | 2019-09-09 11:26:45 +0200 | [diff] [blame] | 830 | quality_limitation_resolution_changes( |
| 831 | "qualityLimitationResolutionChanges"), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 832 | content_type("contentType"), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 833 | encoder_implementation("encoderImplementation"), |
| 834 | fir_count("firCount"), |
| 835 | pli_count("pliCount"), |
| 836 | nack_count("nackCount"), |
| 837 | qp_sum("qpSum"), |
| 838 | is_remote("isRemote") {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 839 | |
| 840 | RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats( |
| 841 | const RTCOutboundRTPStreamStats& other) |
| 842 | : RTCRTPStreamStats(other), |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 843 | media_source_id(other.media_source_id), |
Henrik Boström | 4f40fa5 | 2019-12-19 13:27:27 +0100 | [diff] [blame] | 844 | remote_id(other.remote_id), |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 845 | rid(other.rid), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 846 | packets_sent(other.packets_sent), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 847 | retransmitted_packets_sent(other.retransmitted_packets_sent), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 848 | bytes_sent(other.bytes_sent), |
Niels Möller | ac0a4cb | 2019-10-09 15:01:33 +0200 | [diff] [blame] | 849 | header_bytes_sent(other.header_bytes_sent), |
Henrik Boström | cf96e0f | 2019-04-17 13:51:53 +0200 | [diff] [blame] | 850 | retransmitted_bytes_sent(other.retransmitted_bytes_sent), |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 851 | target_bitrate(other.target_bitrate), |
Henrik Boström | f71362f | 2019-04-08 16:14:23 +0200 | [diff] [blame] | 852 | frames_encoded(other.frames_encoded), |
Rasmus Brandt | 2efae77 | 2019-06-27 14:29:34 +0200 | [diff] [blame] | 853 | key_frames_encoded(other.key_frames_encoded), |
Henrik Boström | 2e06926 | 2019-04-09 13:59:31 +0200 | [diff] [blame] | 854 | total_encode_time(other.total_encode_time), |
Henrik Boström | 23aff9b | 2019-05-20 15:15:38 +0200 | [diff] [blame] | 855 | total_encoded_bytes_target(other.total_encoded_bytes_target), |
Henrik Boström | a0ff50c | 2020-05-05 15:54:46 +0200 | [diff] [blame] | 856 | frame_width(other.frame_width), |
| 857 | frame_height(other.frame_height), |
| 858 | frames_per_second(other.frames_per_second), |
| 859 | frames_sent(other.frames_sent), |
| 860 | huge_frames_sent(other.huge_frames_sent), |
Henrik Boström | 9fe1834 | 2019-05-16 18:38:20 +0200 | [diff] [blame] | 861 | total_packet_send_delay(other.total_packet_send_delay), |
Henrik Boström | ce33b6a | 2019-05-28 17:42:38 +0200 | [diff] [blame] | 862 | quality_limitation_reason(other.quality_limitation_reason), |
Evan Shrubsole | cc62b16 | 2019-09-09 11:26:45 +0200 | [diff] [blame] | 863 | quality_limitation_resolution_changes( |
| 864 | other.quality_limitation_resolution_changes), |
Henrik Boström | 6b43086 | 2019-08-16 13:09:51 +0200 | [diff] [blame] | 865 | content_type(other.content_type), |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 866 | encoder_implementation(other.encoder_implementation), |
| 867 | fir_count(other.fir_count), |
| 868 | pli_count(other.pli_count), |
| 869 | nack_count(other.nack_count), |
| 870 | qp_sum(other.qp_sum), |
| 871 | is_remote(other.is_remote) {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 872 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 873 | RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() {} |
hbos | 6ded190 | 2016-11-01 01:50:46 -0700 | [diff] [blame] | 874 | |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 875 | // clang-format off |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 876 | WEBRTC_RTCSTATS_IMPL( |
Henrik Boström | 2f71b61 | 2021-03-23 15:18:55 +0100 | [diff] [blame] | 877 | RTCRemoteInboundRtpStreamStats, RTCReceivedRtpStreamStats, |
| 878 | "remote-inbound-rtp", |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 879 | &ssrc, |
| 880 | &kind, |
| 881 | &transport_id, |
| 882 | &codec_id, |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 883 | &local_id, |
Di Wu | 86f04ad | 2021-02-28 23:36:03 -0800 | [diff] [blame] | 884 | &round_trip_time, |
Di Wu | 88a51b2 | 2021-03-01 11:22:06 -0800 | [diff] [blame] | 885 | &fraction_lost, |
| 886 | &total_round_trip_time, |
| 887 | &round_trip_time_measurements) |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 888 | // clang-format on |
| 889 | |
| 890 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 891 | const std::string& id, |
| 892 | int64_t timestamp_us) |
| 893 | : RTCRemoteInboundRtpStreamStats(std::string(id), timestamp_us) {} |
| 894 | |
| 895 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 896 | std::string&& id, |
| 897 | int64_t timestamp_us) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 898 | : RTCReceivedRtpStreamStats(std::move(id), timestamp_us), |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 899 | local_id("localId"), |
Di Wu | 86f04ad | 2021-02-28 23:36:03 -0800 | [diff] [blame] | 900 | round_trip_time("roundTripTime"), |
Di Wu | 88a51b2 | 2021-03-01 11:22:06 -0800 | [diff] [blame] | 901 | fraction_lost("fractionLost"), |
| 902 | total_round_trip_time("totalRoundTripTime"), |
| 903 | round_trip_time_measurements("roundTripTimeMeasurements") {} |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 904 | |
| 905 | RTCRemoteInboundRtpStreamStats::RTCRemoteInboundRtpStreamStats( |
| 906 | const RTCRemoteInboundRtpStreamStats& other) |
Di Wu | fd1e9d1 | 2021-03-09 09:25:28 -0800 | [diff] [blame] | 907 | : RTCReceivedRtpStreamStats(other), |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 908 | local_id(other.local_id), |
Di Wu | 86f04ad | 2021-02-28 23:36:03 -0800 | [diff] [blame] | 909 | round_trip_time(other.round_trip_time), |
Di Wu | 88a51b2 | 2021-03-01 11:22:06 -0800 | [diff] [blame] | 910 | fraction_lost(other.fraction_lost), |
| 911 | total_round_trip_time(other.total_round_trip_time), |
| 912 | round_trip_time_measurements(other.round_trip_time_measurements) {} |
Henrik Boström | 883eefc | 2019-05-27 13:40:25 +0200 | [diff] [blame] | 913 | |
| 914 | RTCRemoteInboundRtpStreamStats::~RTCRemoteInboundRtpStreamStats() {} |
| 915 | |
| 916 | // clang-format off |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 917 | WEBRTC_RTCSTATS_IMPL(RTCMediaSourceStats, RTCStats, "parent-media-source", |
| 918 | &track_identifier, |
| 919 | &kind) |
| 920 | // clang-format on |
| 921 | |
| 922 | RTCMediaSourceStats::RTCMediaSourceStats(const std::string& id, |
| 923 | int64_t timestamp_us) |
| 924 | : RTCMediaSourceStats(std::string(id), timestamp_us) {} |
| 925 | |
| 926 | RTCMediaSourceStats::RTCMediaSourceStats(std::string&& id, int64_t timestamp_us) |
| 927 | : RTCStats(std::move(id), timestamp_us), |
| 928 | track_identifier("trackIdentifier"), |
| 929 | kind("kind") {} |
| 930 | |
| 931 | RTCMediaSourceStats::RTCMediaSourceStats(const RTCMediaSourceStats& other) |
| 932 | : RTCStats(other.id(), other.timestamp_us()), |
| 933 | track_identifier(other.track_identifier), |
| 934 | kind(other.kind) {} |
| 935 | |
| 936 | RTCMediaSourceStats::~RTCMediaSourceStats() {} |
| 937 | |
| 938 | // clang-format off |
Henrik Boström | d2c336f | 2019-07-03 17:11:10 +0200 | [diff] [blame] | 939 | WEBRTC_RTCSTATS_IMPL(RTCAudioSourceStats, RTCMediaSourceStats, "media-source", |
| 940 | &audio_level, |
| 941 | &total_audio_energy, |
| 942 | &total_samples_duration) |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 943 | // clang-format on |
| 944 | |
| 945 | RTCAudioSourceStats::RTCAudioSourceStats(const std::string& id, |
| 946 | int64_t timestamp_us) |
| 947 | : RTCAudioSourceStats(std::string(id), timestamp_us) {} |
| 948 | |
| 949 | RTCAudioSourceStats::RTCAudioSourceStats(std::string&& id, int64_t timestamp_us) |
Henrik Boström | d2c336f | 2019-07-03 17:11:10 +0200 | [diff] [blame] | 950 | : RTCMediaSourceStats(std::move(id), timestamp_us), |
| 951 | audio_level("audioLevel"), |
| 952 | total_audio_energy("totalAudioEnergy"), |
| 953 | total_samples_duration("totalSamplesDuration") {} |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 954 | |
| 955 | RTCAudioSourceStats::RTCAudioSourceStats(const RTCAudioSourceStats& other) |
Henrik Boström | d2c336f | 2019-07-03 17:11:10 +0200 | [diff] [blame] | 956 | : RTCMediaSourceStats(other), |
| 957 | audio_level(other.audio_level), |
| 958 | total_audio_energy(other.total_audio_energy), |
| 959 | total_samples_duration(other.total_samples_duration) {} |
Henrik Boström | 646fda0 | 2019-05-22 15:49:42 +0200 | [diff] [blame] | 960 | |
| 961 | RTCAudioSourceStats::~RTCAudioSourceStats() {} |
| 962 | |
| 963 | // clang-format off |
| 964 | WEBRTC_RTCSTATS_IMPL(RTCVideoSourceStats, RTCMediaSourceStats, "media-source", |
| 965 | &width, |
| 966 | &height, |
| 967 | &frames, |
| 968 | &frames_per_second) |
| 969 | // clang-format on |
| 970 | |
| 971 | RTCVideoSourceStats::RTCVideoSourceStats(const std::string& id, |
| 972 | int64_t timestamp_us) |
| 973 | : RTCVideoSourceStats(std::string(id), timestamp_us) {} |
| 974 | |
| 975 | RTCVideoSourceStats::RTCVideoSourceStats(std::string&& id, int64_t timestamp_us) |
| 976 | : RTCMediaSourceStats(std::move(id), timestamp_us), |
| 977 | width("width"), |
| 978 | height("height"), |
| 979 | frames("frames"), |
| 980 | frames_per_second("framesPerSecond") {} |
| 981 | |
| 982 | RTCVideoSourceStats::RTCVideoSourceStats(const RTCVideoSourceStats& other) |
| 983 | : RTCMediaSourceStats(other), |
| 984 | width(other.width), |
| 985 | height(other.height), |
| 986 | frames(other.frames), |
| 987 | frames_per_second(other.frames_per_second) {} |
| 988 | |
| 989 | RTCVideoSourceStats::~RTCVideoSourceStats() {} |
| 990 | |
| 991 | // clang-format off |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 992 | WEBRTC_RTCSTATS_IMPL(RTCTransportStats, RTCStats, "transport", |
| 993 | &bytes_sent, |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 994 | &packets_sent, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 995 | &bytes_received, |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 996 | &packets_received, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 997 | &rtcp_transport_stats_id, |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 998 | &dtls_state, |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 999 | &selected_candidate_pair_id, |
| 1000 | &local_certificate_id, |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 1001 | &remote_certificate_id, |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 1002 | &tls_version, |
| 1003 | &dtls_cipher, |
| 1004 | &srtp_cipher, |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 1005 | &selected_candidate_pair_changes) |
Steve Anton | d6a5cbd | 2017-08-18 09:40:25 -0700 | [diff] [blame] | 1006 | // clang-format on |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1007 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 1008 | RTCTransportStats::RTCTransportStats(const std::string& id, |
| 1009 | int64_t timestamp_us) |
| 1010 | : RTCTransportStats(std::string(id), timestamp_us) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1011 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 1012 | RTCTransportStats::RTCTransportStats(std::string&& id, int64_t timestamp_us) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1013 | : RTCStats(std::move(id), timestamp_us), |
| 1014 | bytes_sent("bytesSent"), |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 1015 | packets_sent("packetsSent"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1016 | bytes_received("bytesReceived"), |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 1017 | packets_received("packetsReceived"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1018 | rtcp_transport_stats_id("rtcpTransportStatsId"), |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 1019 | dtls_state("dtlsState"), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1020 | selected_candidate_pair_id("selectedCandidatePairId"), |
| 1021 | local_certificate_id("localCertificateId"), |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 1022 | remote_certificate_id("remoteCertificateId"), |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 1023 | tls_version("tlsVersion"), |
| 1024 | dtls_cipher("dtlsCipher"), |
| 1025 | srtp_cipher("srtpCipher"), |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 1026 | selected_candidate_pair_changes("selectedCandidatePairChanges") {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1027 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 1028 | RTCTransportStats::RTCTransportStats(const RTCTransportStats& other) |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1029 | : RTCStats(other.id(), other.timestamp_us()), |
| 1030 | bytes_sent(other.bytes_sent), |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 1031 | packets_sent(other.packets_sent), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1032 | bytes_received(other.bytes_received), |
Artem Titov | edacbd5 | 2020-07-06 16:06:37 +0200 | [diff] [blame] | 1033 | packets_received(other.packets_received), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1034 | rtcp_transport_stats_id(other.rtcp_transport_stats_id), |
hbos | 7064d59 | 2017-01-16 07:38:02 -0800 | [diff] [blame] | 1035 | dtls_state(other.dtls_state), |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1036 | selected_candidate_pair_id(other.selected_candidate_pair_id), |
| 1037 | local_certificate_id(other.local_certificate_id), |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 1038 | remote_certificate_id(other.remote_certificate_id), |
Harald Alvestrand | 5cb7807 | 2019-10-28 09:51:17 +0100 | [diff] [blame] | 1039 | tls_version(other.tls_version), |
| 1040 | dtls_cipher(other.dtls_cipher), |
| 1041 | srtp_cipher(other.srtp_cipher), |
Jonas Oreland | 149dc72 | 2019-08-28 08:10:27 +0200 | [diff] [blame] | 1042 | selected_candidate_pair_changes(other.selected_candidate_pair_changes) {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1043 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 1044 | RTCTransportStats::~RTCTransportStats() {} |
hbos | 2fa7c67 | 2016-10-24 04:00:05 -0700 | [diff] [blame] | 1045 | |
hbos | d565b73 | 2016-08-30 14:04:35 -0700 | [diff] [blame] | 1046 | } // namespace webrtc |