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