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