blob: 2030380918d5fe505d740c36f88a9d8e60d0017c [file] [log] [blame]
hbosd565b732016-08-30 14:04:35 -07001/*
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 Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef API_STATS_RTCSTATS_OBJECTS_H_
12#define API_STATS_RTCSTATS_OBJECTS_H_
hbosd565b732016-08-30 14:04:35 -070013
Yves Gerey3e707812018-11-28 16:47:49 +010014#include <stdint.h>
Jonas Olssona4d87372019-07-05 19:08:33 +020015
Byoungchan Lee7d235352021-05-28 21:32:04 +090016#include <map>
Henrik Boström1df1bf82018-03-20 13:24:20 +010017#include <memory>
hbosd565b732016-08-30 14:04:35 -070018#include <string>
oprypin803dc292017-02-01 01:55:59 -080019#include <vector>
hbosd565b732016-08-30 14:04:35 -070020
Steve Anton10542f22019-01-11 09:11:00 -080021#include "api/stats/rtc_stats.h"
Mirko Bonadei276827c2018-10-16 14:13:50 +020022#include "rtc_base/system/rtc_export.h"
hbosd565b732016-08-30 14:04:35 -070023
24namespace webrtc {
25
hboscc555c52016-10-18 12:48:31 -070026// https://w3c.github.io/webrtc-pc/#idl-def-rtcdatachannelstate
27struct RTCDataChannelState {
agrieve26622d32017-08-08 10:48:15 -070028 static const char* const kConnecting;
29 static const char* const kOpen;
30 static const char* const kClosing;
31 static const char* const kClosed;
hboscc555c52016-10-18 12:48:31 -070032};
33
hbosc47a0c32016-10-11 14:54:49 -070034// https://w3c.github.io/webrtc-stats/#dom-rtcstatsicecandidatepairstate
35struct RTCStatsIceCandidatePairState {
agrieve26622d32017-08-08 10:48:15 -070036 static const char* const kFrozen;
37 static const char* const kWaiting;
38 static const char* const kInProgress;
39 static const char* const kFailed;
40 static const char* const kSucceeded;
hbosc47a0c32016-10-11 14:54:49 -070041};
42
hboscc555c52016-10-18 12:48:31 -070043// https://w3c.github.io/webrtc-pc/#rtcicecandidatetype-enum
hbosab9f6e42016-10-07 02:18:47 -070044struct RTCIceCandidateType {
agrieve26622d32017-08-08 10:48:15 -070045 static const char* const kHost;
46 static const char* const kSrflx;
47 static const char* const kPrflx;
48 static const char* const kRelay;
hbosab9f6e42016-10-07 02:18:47 -070049};
50
hbos7064d592017-01-16 07:38:02 -080051// https://w3c.github.io/webrtc-pc/#idl-def-rtcdtlstransportstate
52struct RTCDtlsTransportState {
agrieve26622d32017-08-08 10:48:15 -070053 static const char* const kNew;
54 static const char* const kConnecting;
55 static const char* const kConnected;
56 static const char* const kClosed;
57 static const char* const kFailed;
hbos7064d592017-01-16 07:38:02 -080058};
59
hbos160e4a72017-01-17 02:53:23 -080060// |RTCMediaStreamTrackStats::kind| is not an enum in the spec but the only
61// valid values are "audio" and "video".
62// https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-kind
63struct RTCMediaStreamTrackKind {
agrieve26622d32017-08-08 10:48:15 -070064 static const char* const kAudio;
65 static const char* const kVideo;
hbos160e4a72017-01-17 02:53:23 -080066};
67
Gary Liu37e489c2017-11-21 10:49:36 -080068// https://w3c.github.io/webrtc-stats/#dom-rtcnetworktype
69struct RTCNetworkType {
70 static const char* const kBluetooth;
71 static const char* const kCellular;
72 static const char* const kEthernet;
73 static const char* const kWifi;
74 static const char* const kWimax;
75 static const char* const kVpn;
76 static const char* const kUnknown;
77};
78
Henrik Boströmce33b6a2019-05-28 17:42:38 +020079// https://w3c.github.io/webrtc-stats/#dom-rtcqualitylimitationreason
80struct RTCQualityLimitationReason {
81 static const char* const kNone;
82 static const char* const kCpu;
83 static const char* const kBandwidth;
84 static const char* const kOther;
85};
86
Henrik Boström2e069262019-04-09 13:59:31 +020087// https://webrtc.org/experiments/rtp-hdrext/video-content-type/
88struct RTCContentType {
89 static const char* const kUnspecified;
90 static const char* const kScreenshare;
91};
92
hbos2fa7c672016-10-24 04:00:05 -070093// https://w3c.github.io/webrtc-stats/#certificatestats-dict*
Mirko Bonadei276827c2018-10-16 14:13:50 +020094class RTC_EXPORT RTCCertificateStats final : public RTCStats {
hbos2fa7c672016-10-24 04:00:05 -070095 public:
96 WEBRTC_RTCSTATS_DECL();
97
98 RTCCertificateStats(const std::string& id, int64_t timestamp_us);
99 RTCCertificateStats(std::string&& id, int64_t timestamp_us);
100 RTCCertificateStats(const RTCCertificateStats& other);
101 ~RTCCertificateStats() override;
102
103 RTCStatsMember<std::string> fingerprint;
104 RTCStatsMember<std::string> fingerprint_algorithm;
105 RTCStatsMember<std::string> base64_certificate;
106 RTCStatsMember<std::string> issuer_certificate_id;
107};
108
hbos0adb8282016-11-23 02:32:06 -0800109// https://w3c.github.io/webrtc-stats/#codec-dict*
Mirko Bonadei276827c2018-10-16 14:13:50 +0200110class RTC_EXPORT RTCCodecStats final : public RTCStats {
hbos0adb8282016-11-23 02:32:06 -0800111 public:
112 WEBRTC_RTCSTATS_DECL();
113
114 RTCCodecStats(const std::string& id, int64_t timestamp_us);
115 RTCCodecStats(std::string&& id, int64_t timestamp_us);
116 RTCCodecStats(const RTCCodecStats& other);
117 ~RTCCodecStats() override;
118
Philipp Hancke95157a02020-11-16 20:08:27 +0100119 RTCStatsMember<std::string> transport_id;
hbos0adb8282016-11-23 02:32:06 -0800120 RTCStatsMember<uint32_t> payload_type;
hbos13f54b22017-02-28 06:56:04 -0800121 RTCStatsMember<std::string> mime_type;
hbos0adb8282016-11-23 02:32:06 -0800122 RTCStatsMember<uint32_t> clock_rate;
hbos0adb8282016-11-23 02:32:06 -0800123 RTCStatsMember<uint32_t> channels;
hbos13f54b22017-02-28 06:56:04 -0800124 RTCStatsMember<std::string> sdp_fmtp_line;
hbos0adb8282016-11-23 02:32:06 -0800125};
126
hbos2fa7c672016-10-24 04:00:05 -0700127// https://w3c.github.io/webrtc-stats/#dcstats-dict*
Mirko Bonadei276827c2018-10-16 14:13:50 +0200128class RTC_EXPORT RTCDataChannelStats final : public RTCStats {
hbos2fa7c672016-10-24 04:00:05 -0700129 public:
130 WEBRTC_RTCSTATS_DECL();
131
132 RTCDataChannelStats(const std::string& id, int64_t timestamp_us);
133 RTCDataChannelStats(std::string&& id, int64_t timestamp_us);
134 RTCDataChannelStats(const RTCDataChannelStats& other);
135 ~RTCDataChannelStats() override;
136
137 RTCStatsMember<std::string> label;
138 RTCStatsMember<std::string> protocol;
Harald Alvestrand10ef8472020-06-05 15:38:51 +0200139 RTCStatsMember<int32_t> data_channel_identifier;
hbos2fa7c672016-10-24 04:00:05 -0700140 // TODO(hbos): Support enum types? "RTCStatsMember<RTCDataChannelState>"?
141 RTCStatsMember<std::string> state;
142 RTCStatsMember<uint32_t> messages_sent;
143 RTCStatsMember<uint64_t> bytes_sent;
144 RTCStatsMember<uint32_t> messages_received;
145 RTCStatsMember<uint64_t> bytes_received;
146};
147
148// https://w3c.github.io/webrtc-stats/#candidatepair-dict*
hbos338f78a2017-02-07 06:41:21 -0800149// TODO(hbos): Tracking bug https://bugs.webrtc.org/7062
Mirko Bonadei276827c2018-10-16 14:13:50 +0200150class RTC_EXPORT RTCIceCandidatePairStats final : public RTCStats {
hbosc47a0c32016-10-11 14:54:49 -0700151 public:
152 WEBRTC_RTCSTATS_DECL();
153
154 RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us);
155 RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us);
156 RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other);
157 ~RTCIceCandidatePairStats() override;
158
159 RTCStatsMember<std::string> transport_id;
160 RTCStatsMember<std::string> local_candidate_id;
161 RTCStatsMember<std::string> remote_candidate_id;
162 // TODO(hbos): Support enum types?
163 // "RTCStatsMember<RTCStatsIceCandidatePairState>"?
164 RTCStatsMember<std::string> state;
Di Wuef036cd2021-03-19 08:24:41 -0700165 // Obsolete: priority
hbosc47a0c32016-10-11 14:54:49 -0700166 RTCStatsMember<uint64_t> priority;
167 RTCStatsMember<bool> nominated;
hbos338f78a2017-02-07 06:41:21 -0800168 // TODO(hbos): Collect this the way the spec describes it. We have a value for
169 // it but it is not spec-compliant. https://bugs.webrtc.org/7062
hbosc47a0c32016-10-11 14:54:49 -0700170 RTCStatsMember<bool> writable;
hbos338f78a2017-02-07 06:41:21 -0800171 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062
hbosc47a0c32016-10-11 14:54:49 -0700172 RTCStatsMember<bool> readable;
173 RTCStatsMember<uint64_t> bytes_sent;
174 RTCStatsMember<uint64_t> bytes_received;
hbos3168c7a2016-12-15 06:17:08 -0800175 RTCStatsMember<double> total_round_trip_time;
hbos3168c7a2016-12-15 06:17:08 -0800176 RTCStatsMember<double> current_round_trip_time;
hbosc47a0c32016-10-11 14:54:49 -0700177 RTCStatsMember<double> available_outgoing_bitrate;
hbos338f78a2017-02-07 06:41:21 -0800178 // TODO(hbos): Populate this value. It is wired up and collected the same way
hbosbf8d3e52017-02-28 06:34:47 -0800179 // "VideoBwe.googAvailableReceiveBandwidth" is, but that value is always
hbos338f78a2017-02-07 06:41:21 -0800180 // undefined. https://bugs.webrtc.org/7062
hbosc47a0c32016-10-11 14:54:49 -0700181 RTCStatsMember<double> available_incoming_bitrate;
182 RTCStatsMember<uint64_t> requests_received;
183 RTCStatsMember<uint64_t> requests_sent;
184 RTCStatsMember<uint64_t> responses_received;
185 RTCStatsMember<uint64_t> responses_sent;
hbos338f78a2017-02-07 06:41:21 -0800186 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062
hbosc47a0c32016-10-11 14:54:49 -0700187 RTCStatsMember<uint64_t> retransmissions_received;
hbos338f78a2017-02-07 06:41:21 -0800188 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062
hbosc47a0c32016-10-11 14:54:49 -0700189 RTCStatsMember<uint64_t> retransmissions_sent;
hbos338f78a2017-02-07 06:41:21 -0800190 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062
hbosc47a0c32016-10-11 14:54:49 -0700191 RTCStatsMember<uint64_t> consent_requests_received;
192 RTCStatsMember<uint64_t> consent_requests_sent;
hbos338f78a2017-02-07 06:41:21 -0800193 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062
hbosc47a0c32016-10-11 14:54:49 -0700194 RTCStatsMember<uint64_t> consent_responses_received;
hbos338f78a2017-02-07 06:41:21 -0800195 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7062
hbosc47a0c32016-10-11 14:54:49 -0700196 RTCStatsMember<uint64_t> consent_responses_sent;
197};
198
hbosab9f6e42016-10-07 02:18:47 -0700199// https://w3c.github.io/webrtc-stats/#icecandidate-dict*
hbos5d79a7c2016-10-24 09:27:10 -0700200// TODO(hbos): |RTCStatsCollector| only collects candidates that are part of
201// ice candidate pairs, but there could be candidates not paired with anything.
202// crbug.com/632723
Qingsi Wang72a43a12018-02-20 16:03:18 -0800203// TODO(qingsi): Add the stats of STUN binding requests (keepalives) and collect
204// them in the new PeerConnection::GetStats.
Mirko Bonadei276827c2018-10-16 14:13:50 +0200205class RTC_EXPORT RTCIceCandidateStats : public RTCStats {
hbosab9f6e42016-10-07 02:18:47 -0700206 public:
207 WEBRTC_RTCSTATS_DECL();
208
209 RTCIceCandidateStats(const RTCIceCandidateStats& other);
210 ~RTCIceCandidateStats() override;
211
hbosb4e426e2017-01-02 09:59:31 -0800212 RTCStatsMember<std::string> transport_id;
Di Wuef036cd2021-03-19 08:24:41 -0700213 // Obsolete: is_remote
hbosc3a2b7f2017-01-02 04:46:15 -0800214 RTCStatsMember<bool> is_remote;
Gary Liu37e489c2017-11-21 10:49:36 -0800215 RTCStatsMember<std::string> network_type;
hbosab9f6e42016-10-07 02:18:47 -0700216 RTCStatsMember<std::string> ip;
Philipp Hanckea9ba4502021-03-22 13:22:54 +0100217 RTCStatsMember<std::string> address;
hbosab9f6e42016-10-07 02:18:47 -0700218 RTCStatsMember<int32_t> port;
219 RTCStatsMember<std::string> protocol;
Philipp Hancke95513752018-09-27 14:40:08 +0200220 RTCStatsMember<std::string> relay_protocol;
hbosab9f6e42016-10-07 02:18:47 -0700221 // TODO(hbos): Support enum types? "RTCStatsMember<RTCIceCandidateType>"?
222 RTCStatsMember<std::string> candidate_type;
223 RTCStatsMember<int32_t> priority;
hbos5d79a7c2016-10-24 09:27:10 -0700224 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/632723
hbosab9f6e42016-10-07 02:18:47 -0700225 RTCStatsMember<std::string> url;
226
227 protected:
Yves Gerey665174f2018-06-19 15:03:05 +0200228 RTCIceCandidateStats(const std::string& id,
229 int64_t timestamp_us,
230 bool is_remote);
hbosc3a2b7f2017-01-02 04:46:15 -0800231 RTCIceCandidateStats(std::string&& id, int64_t timestamp_us, bool is_remote);
hbosab9f6e42016-10-07 02:18:47 -0700232};
233
234// In the spec both local and remote varieties are of type RTCIceCandidateStats.
235// But here we define them as subclasses of |RTCIceCandidateStats| because the
236// |kType| need to be different ("RTCStatsType type") in the local/remote case.
237// https://w3c.github.io/webrtc-stats/#rtcstatstype-str*
Henrik Boström1df1bf82018-03-20 13:24:20 +0100238// This forces us to have to override copy() and type().
Mirko Bonadei276827c2018-10-16 14:13:50 +0200239class RTC_EXPORT RTCLocalIceCandidateStats final : public RTCIceCandidateStats {
hbosab9f6e42016-10-07 02:18:47 -0700240 public:
241 static const char kType[];
242 RTCLocalIceCandidateStats(const std::string& id, int64_t timestamp_us);
243 RTCLocalIceCandidateStats(std::string&& id, int64_t timestamp_us);
Henrik Boström1df1bf82018-03-20 13:24:20 +0100244 std::unique_ptr<RTCStats> copy() const override;
hbosab9f6e42016-10-07 02:18:47 -0700245 const char* type() const override;
246};
247
Mirko Bonadei276827c2018-10-16 14:13:50 +0200248class RTC_EXPORT RTCRemoteIceCandidateStats final
249 : public RTCIceCandidateStats {
hbosab9f6e42016-10-07 02:18:47 -0700250 public:
251 static const char kType[];
252 RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us);
253 RTCRemoteIceCandidateStats(std::string&& id, int64_t timestamp_us);
Henrik Boström1df1bf82018-03-20 13:24:20 +0100254 std::unique_ptr<RTCStats> copy() const override;
hbosab9f6e42016-10-07 02:18:47 -0700255 const char* type() const override;
256};
257
hbos09bc1282016-11-08 06:29:22 -0800258// https://w3c.github.io/webrtc-stats/#msstats-dict*
hbos0adb8282016-11-23 02:32:06 -0800259// TODO(hbos): Tracking bug crbug.com/660827
Mirko Bonadei276827c2018-10-16 14:13:50 +0200260class RTC_EXPORT RTCMediaStreamStats final : public RTCStats {
hbos09bc1282016-11-08 06:29:22 -0800261 public:
262 WEBRTC_RTCSTATS_DECL();
263
264 RTCMediaStreamStats(const std::string& id, int64_t timestamp_us);
265 RTCMediaStreamStats(std::string&& id, int64_t timestamp_us);
266 RTCMediaStreamStats(const RTCMediaStreamStats& other);
267 ~RTCMediaStreamStats() override;
268
269 RTCStatsMember<std::string> stream_identifier;
270 RTCStatsMember<std::vector<std::string>> track_ids;
271};
272
273// https://w3c.github.io/webrtc-stats/#mststats-dict*
hbos0adb8282016-11-23 02:32:06 -0800274// TODO(hbos): Tracking bug crbug.com/659137
Mirko Bonadei276827c2018-10-16 14:13:50 +0200275class RTC_EXPORT RTCMediaStreamTrackStats final : public RTCStats {
hbos09bc1282016-11-08 06:29:22 -0800276 public:
277 WEBRTC_RTCSTATS_DECL();
278
Yves Gerey665174f2018-06-19 15:03:05 +0200279 RTCMediaStreamTrackStats(const std::string& id,
280 int64_t timestamp_us,
hbos160e4a72017-01-17 02:53:23 -0800281 const char* kind);
Yves Gerey665174f2018-06-19 15:03:05 +0200282 RTCMediaStreamTrackStats(std::string&& id,
283 int64_t timestamp_us,
hbos160e4a72017-01-17 02:53:23 -0800284 const char* kind);
hbos09bc1282016-11-08 06:29:22 -0800285 RTCMediaStreamTrackStats(const RTCMediaStreamTrackStats& other);
286 ~RTCMediaStreamTrackStats() override;
287
288 RTCStatsMember<std::string> track_identifier;
Henrik Boström646fda02019-05-22 15:49:42 +0200289 RTCStatsMember<std::string> media_source_id;
hbos09bc1282016-11-08 06:29:22 -0800290 RTCStatsMember<bool> remote_source;
291 RTCStatsMember<bool> ended;
292 // TODO(hbos): |RTCStatsCollector| does not return stats for detached tracks.
293 // crbug.com/659137
294 RTCStatsMember<bool> detached;
hbos160e4a72017-01-17 02:53:23 -0800295 // See |RTCMediaStreamTrackKind| for valid values.
296 RTCStatsMember<std::string> kind;
Gustaf Ullbergb0a02072017-10-02 12:00:34 +0200297 RTCStatsMember<double> jitter_buffer_delay;
Chen Xing0acffb52019-01-15 15:46:29 +0100298 RTCStatsMember<uint64_t> jitter_buffer_emitted_count;
hbos09bc1282016-11-08 06:29:22 -0800299 // Video-only members
300 RTCStatsMember<uint32_t> frame_width;
301 RTCStatsMember<uint32_t> frame_height;
302 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
303 RTCStatsMember<double> frames_per_second;
hbos09bc1282016-11-08 06:29:22 -0800304 RTCStatsMember<uint32_t> frames_sent;
Ilya Nikolaevskiy70473fc2018-02-28 16:35:03 +0100305 RTCStatsMember<uint32_t> huge_frames_sent;
hbos09bc1282016-11-08 06:29:22 -0800306 RTCStatsMember<uint32_t> frames_received;
hbos09bc1282016-11-08 06:29:22 -0800307 RTCStatsMember<uint32_t> frames_decoded;
hbos09bc1282016-11-08 06:29:22 -0800308 RTCStatsMember<uint32_t> frames_dropped;
309 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
310 RTCStatsMember<uint32_t> frames_corrupted;
311 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
312 RTCStatsMember<uint32_t> partial_frames_lost;
313 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
314 RTCStatsMember<uint32_t> full_frames_lost;
315 // Audio-only members
Henrik Boströmd2c336f2019-07-03 17:11:10 +0200316 RTCStatsMember<double> audio_level; // Receive-only
317 RTCStatsMember<double> total_audio_energy; // Receive-only
hbos09bc1282016-11-08 06:29:22 -0800318 RTCStatsMember<double> echo_return_loss;
319 RTCStatsMember<double> echo_return_loss_enhancement;
Steve Anton2dbc69f2017-08-24 17:15:13 -0700320 RTCStatsMember<uint64_t> total_samples_received;
Henrik Boströmd2c336f2019-07-03 17:11:10 +0200321 RTCStatsMember<double> total_samples_duration; // Receive-only
Steve Anton2dbc69f2017-08-24 17:15:13 -0700322 RTCStatsMember<uint64_t> concealed_samples;
Ivo Creusen8d8ffdb2019-04-30 09:45:21 +0200323 RTCStatsMember<uint64_t> silent_concealed_samples;
Gustaf Ullberg9a2e9062017-09-18 09:28:20 +0200324 RTCStatsMember<uint64_t> concealment_events;
Ivo Creusen8d8ffdb2019-04-30 09:45:21 +0200325 RTCStatsMember<uint64_t> inserted_samples_for_deceleration;
326 RTCStatsMember<uint64_t> removed_samples_for_acceleration;
Ruslan Burakov8af88962018-11-22 17:21:10 +0100327 // Non-standard audio-only member
Jakob Ivarsson352ce5c2018-11-27 12:52:16 +0100328 // TODO(kuddai): Add description to standard. crbug.com/webrtc/10042
Ruslan Burakov8af88962018-11-22 17:21:10 +0100329 RTCNonStandardStatsMember<uint64_t> jitter_buffer_flushes;
Jakob Ivarsson352ce5c2018-11-27 12:52:16 +0100330 RTCNonStandardStatsMember<uint64_t> delayed_packet_outage_samples;
Jakob Ivarsson232b3fd2019-03-06 09:18:40 +0100331 RTCNonStandardStatsMember<double> relative_packet_arrival_delay;
Artem Titove618cc92020-03-11 11:18:54 +0100332 // Non-standard metric showing target delay of jitter buffer.
333 // This value is increased by the target jitter buffer delay every time a
334 // sample is emitted by the jitter buffer. The added target is the target
335 // delay, in seconds, at the time that the sample was emitted from the jitter
336 // buffer. (https://github.com/w3c/webrtc-provisional-stats/pull/20)
337 // Currently it is implemented only for audio.
338 // TODO(titovartem) implement for video streams when will be requested.
339 RTCNonStandardStatsMember<double> jitter_buffer_target_delay;
Henrik Lundin44125fa2019-04-29 17:00:46 +0200340 // TODO(henrik.lundin): Add description of the interruption metrics at
341 // https://github.com/henbos/webrtc-provisional-stats/issues/17
342 RTCNonStandardStatsMember<uint32_t> interruption_count;
343 RTCNonStandardStatsMember<double> total_interruption_duration;
Sergey Silkin02371062019-01-31 16:45:42 +0100344 // Non-standard video-only members.
345 // https://henbos.github.io/webrtc-provisional-stats/#RTCVideoReceiverStats-dict*
346 RTCNonStandardStatsMember<uint32_t> freeze_count;
347 RTCNonStandardStatsMember<uint32_t> pause_count;
348 RTCNonStandardStatsMember<double> total_freezes_duration;
349 RTCNonStandardStatsMember<double> total_pauses_duration;
350 RTCNonStandardStatsMember<double> total_frames_duration;
351 RTCNonStandardStatsMember<double> sum_squared_frame_durations;
hbos09bc1282016-11-08 06:29:22 -0800352};
353
hbos6ab97ce2016-10-03 14:16:56 -0700354// https://w3c.github.io/webrtc-stats/#pcstats-dict*
Mirko Bonadei276827c2018-10-16 14:13:50 +0200355class RTC_EXPORT RTCPeerConnectionStats final : public RTCStats {
hbosd565b732016-08-30 14:04:35 -0700356 public:
hbosfc5e0502016-10-06 02:06:10 -0700357 WEBRTC_RTCSTATS_DECL();
358
hbos0e6758d2016-08-31 07:57:36 -0700359 RTCPeerConnectionStats(const std::string& id, int64_t timestamp_us);
360 RTCPeerConnectionStats(std::string&& id, int64_t timestamp_us);
hbosfc5e0502016-10-06 02:06:10 -0700361 RTCPeerConnectionStats(const RTCPeerConnectionStats& other);
362 ~RTCPeerConnectionStats() override;
hbosd565b732016-08-30 14:04:35 -0700363
364 RTCStatsMember<uint32_t> data_channels_opened;
365 RTCStatsMember<uint32_t> data_channels_closed;
366};
367
hbos6ded1902016-11-01 01:50:46 -0700368// https://w3c.github.io/webrtc-stats/#streamstats-dict*
hbos0adb8282016-11-23 02:32:06 -0800369// TODO(hbos): Tracking bug crbug.com/657854
Mirko Bonadei276827c2018-10-16 14:13:50 +0200370class RTC_EXPORT RTCRTPStreamStats : public RTCStats {
hbos6ded1902016-11-01 01:50:46 -0700371 public:
372 WEBRTC_RTCSTATS_DECL();
373
374 RTCRTPStreamStats(const RTCRTPStreamStats& other);
375 ~RTCRTPStreamStats() override;
376
hbos3443bb72017-02-07 06:28:11 -0800377 RTCStatsMember<uint32_t> ssrc;
Philipp Hancke3bc01662018-08-28 14:55:03 +0200378 RTCStatsMember<std::string> kind;
Di Wuef036cd2021-03-19 08:24:41 -0700379 // Obsolete: track_id
hbosb0ae9202017-01-27 06:35:16 -0800380 RTCStatsMember<std::string> track_id;
hbos6ded1902016-11-01 01:50:46 -0700381 RTCStatsMember<std::string> transport_id;
hbos6ded1902016-11-01 01:50:46 -0700382 RTCStatsMember<std::string> codec_id;
Di Wufd1e9d12021-03-09 09:25:28 -0800383
384 // Obsolete
385 RTCStatsMember<std::string> media_type; // renamed to kind.
hbos6ded1902016-11-01 01:50:46 -0700386
387 protected:
388 RTCRTPStreamStats(const std::string& id, int64_t timestamp_us);
389 RTCRTPStreamStats(std::string&& id, int64_t timestamp_us);
390};
391
Alessio Bazzicaf7b1b952021-03-23 17:23:04 +0100392// https://www.w3.org/TR/webrtc-stats/#receivedrtpstats-dict*
Di Wufd1e9d12021-03-09 09:25:28 -0800393class RTC_EXPORT RTCReceivedRtpStreamStats : public RTCRTPStreamStats {
394 public:
395 WEBRTC_RTCSTATS_DECL();
396
397 RTCReceivedRtpStreamStats(const RTCReceivedRtpStreamStats& other);
398 ~RTCReceivedRtpStreamStats() override;
399
400 // TODO(hbos) The following fields need to be added and migrated
401 // both from RTCInboundRtpStreamStats and RTCRemoteInboundRtpStreamStats:
402 // packetsReceived, packetsDiscarded, packetsRepaired, burstPacketsLost,
403 // burstPacketDiscarded, burstLossCount, burstDiscardCount, burstLossRate,
404 // burstDiscardRate, gapLossRate, gapDiscardRate, framesDropped,
405 // partialFramesLost, fullFramesLost
406 // crbug.com/webrtc/12532
407 RTCStatsMember<double> jitter;
408 RTCStatsMember<int32_t> packets_lost; // Signed per RFC 3550
409
410 protected:
411 RTCReceivedRtpStreamStats(const std::string&& id, int64_t timestamp_us);
412 RTCReceivedRtpStreamStats(std::string&& id, int64_t timestamp_us);
413};
414
Alessio Bazzicaf7b1b952021-03-23 17:23:04 +0100415// https://www.w3.org/TR/webrtc-stats/#sentrtpstats-dict*
416class RTC_EXPORT RTCSentRtpStreamStats : public RTCRTPStreamStats {
417 public:
418 WEBRTC_RTCSTATS_DECL();
419
420 RTCSentRtpStreamStats(const RTCSentRtpStreamStats& other);
421 ~RTCSentRtpStreamStats() override;
422
423 RTCStatsMember<uint32_t> packets_sent;
424 RTCStatsMember<uint64_t> bytes_sent;
425
426 protected:
427 RTCSentRtpStreamStats(const std::string&& id, int64_t timestamp_us);
428 RTCSentRtpStreamStats(std::string&& id, int64_t timestamp_us);
429};
430
hboseeafe942016-11-01 03:00:17 -0700431// https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict*
hbosa7a9be12017-03-01 01:02:45 -0800432// TODO(hbos): Support the remote case |is_remote = true|.
433// https://bugs.webrtc.org/7065
Di Wufd1e9d12021-03-09 09:25:28 -0800434class RTC_EXPORT RTCInboundRTPStreamStats final
435 : public RTCReceivedRtpStreamStats {
hboseeafe942016-11-01 03:00:17 -0700436 public:
437 WEBRTC_RTCSTATS_DECL();
438
439 RTCInboundRTPStreamStats(const std::string& id, int64_t timestamp_us);
440 RTCInboundRTPStreamStats(std::string&& id, int64_t timestamp_us);
441 RTCInboundRTPStreamStats(const RTCInboundRTPStreamStats& other);
442 ~RTCInboundRTPStreamStats() override;
443
Alessio Bazzicaf7b1b952021-03-23 17:23:04 +0100444 RTCStatsMember<std::string> remote_id;
hboseeafe942016-11-01 03:00:17 -0700445 RTCStatsMember<uint32_t> packets_received;
Ivo Creusen8d8ffdb2019-04-30 09:45:21 +0200446 RTCStatsMember<uint64_t> fec_packets_received;
447 RTCStatsMember<uint64_t> fec_packets_discarded;
hboseeafe942016-11-01 03:00:17 -0700448 RTCStatsMember<uint64_t> bytes_received;
Niels Möllerac0a4cb2019-10-09 15:01:33 +0200449 RTCStatsMember<uint64_t> header_bytes_received;
Henrik Boström01738c62019-04-15 17:32:00 +0200450 RTCStatsMember<double> last_packet_received_timestamp;
Eldar Rello4e5bc9f2020-07-06 14:18:07 +0300451 RTCStatsMember<double> jitter_buffer_delay;
452 RTCStatsMember<uint64_t> jitter_buffer_emitted_count;
453 RTCStatsMember<uint64_t> total_samples_received;
454 RTCStatsMember<uint64_t> concealed_samples;
455 RTCStatsMember<uint64_t> silent_concealed_samples;
456 RTCStatsMember<uint64_t> concealment_events;
457 RTCStatsMember<uint64_t> inserted_samples_for_deceleration;
458 RTCStatsMember<uint64_t> removed_samples_for_acceleration;
459 RTCStatsMember<double> audio_level;
460 RTCStatsMember<double> total_audio_energy;
461 RTCStatsMember<double> total_samples_duration;
462 RTCStatsMember<int32_t> frames_received;
hbosa7a9be12017-03-01 01:02:45 -0800463 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
464 RTCStatsMember<double> round_trip_time;
465 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
hboseeafe942016-11-01 03:00:17 -0700466 RTCStatsMember<uint32_t> packets_discarded;
hbosa7a9be12017-03-01 01:02:45 -0800467 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
hboseeafe942016-11-01 03:00:17 -0700468 RTCStatsMember<uint32_t> packets_repaired;
hbosa7a9be12017-03-01 01:02:45 -0800469 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
hboseeafe942016-11-01 03:00:17 -0700470 RTCStatsMember<uint32_t> burst_packets_lost;
hbosa7a9be12017-03-01 01:02:45 -0800471 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
hboseeafe942016-11-01 03:00:17 -0700472 RTCStatsMember<uint32_t> burst_packets_discarded;
hbosa7a9be12017-03-01 01:02:45 -0800473 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
hboseeafe942016-11-01 03:00:17 -0700474 RTCStatsMember<uint32_t> burst_loss_count;
hbosa7a9be12017-03-01 01:02:45 -0800475 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
hboseeafe942016-11-01 03:00:17 -0700476 RTCStatsMember<uint32_t> burst_discard_count;
hbosa7a9be12017-03-01 01:02:45 -0800477 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
hboseeafe942016-11-01 03:00:17 -0700478 RTCStatsMember<double> burst_loss_rate;
hbosa7a9be12017-03-01 01:02:45 -0800479 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
hboseeafe942016-11-01 03:00:17 -0700480 RTCStatsMember<double> burst_discard_rate;
hbosa7a9be12017-03-01 01:02:45 -0800481 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
hboseeafe942016-11-01 03:00:17 -0700482 RTCStatsMember<double> gap_loss_rate;
hbosa7a9be12017-03-01 01:02:45 -0800483 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
hboseeafe942016-11-01 03:00:17 -0700484 RTCStatsMember<double> gap_discard_rate;
Eldar Rello4e5bc9f2020-07-06 14:18:07 +0300485 RTCStatsMember<uint32_t> frame_width;
486 RTCStatsMember<uint32_t> frame_height;
487 RTCStatsMember<uint32_t> frame_bit_depth;
488 RTCStatsMember<double> frames_per_second;
hbos6769c492017-01-02 08:35:13 -0800489 RTCStatsMember<uint32_t> frames_decoded;
Rasmus Brandt2efae772019-06-27 14:29:34 +0200490 RTCStatsMember<uint32_t> key_frames_decoded;
Eldar Rello4e5bc9f2020-07-06 14:18:07 +0300491 RTCStatsMember<uint32_t> frames_dropped;
Johannes Kronbfd343b2019-07-01 10:07:50 +0200492 RTCStatsMember<double> total_decode_time;
Johannes Kron00376e12019-11-25 10:25:42 +0100493 RTCStatsMember<double> total_inter_frame_delay;
494 RTCStatsMember<double> total_squared_inter_frame_delay;
Henrik Boström2e069262019-04-09 13:59:31 +0200495 // https://henbos.github.io/webrtc-provisional-stats/#dom-rtcinboundrtpstreamstats-contenttype
496 RTCStatsMember<std::string> content_type;
Åsa Perssonfcf79cc2019-10-22 15:23:44 +0200497 // TODO(asapersson): Currently only populated if audio/video sync is enabled.
498 RTCStatsMember<double> estimated_playout_timestamp;
Henrik Boström6b430862019-08-16 13:09:51 +0200499 // TODO(hbos): This is only implemented for video; implement it for audio as
500 // well.
501 RTCStatsMember<std::string> decoder_implementation;
Di Wufd1e9d12021-03-09 09:25:28 -0800502 // FIR and PLI counts are only defined for |media_type == "video"|.
503 RTCStatsMember<uint32_t> fir_count;
504 RTCStatsMember<uint32_t> pli_count;
Di Wufd1e9d12021-03-09 09:25:28 -0800505 RTCStatsMember<uint32_t> nack_count;
506 RTCStatsMember<uint64_t> qp_sum;
hboseeafe942016-11-01 03:00:17 -0700507};
508
hbos6ded1902016-11-01 01:50:46 -0700509// https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict*
hbosa7a9be12017-03-01 01:02:45 -0800510// TODO(hbos): Support the remote case |is_remote = true|.
511// https://bugs.webrtc.org/7066
Mirko Bonadei276827c2018-10-16 14:13:50 +0200512class RTC_EXPORT RTCOutboundRTPStreamStats final : public RTCRTPStreamStats {
hbos6ded1902016-11-01 01:50:46 -0700513 public:
514 WEBRTC_RTCSTATS_DECL();
515
516 RTCOutboundRTPStreamStats(const std::string& id, int64_t timestamp_us);
517 RTCOutboundRTPStreamStats(std::string&& id, int64_t timestamp_us);
518 RTCOutboundRTPStreamStats(const RTCOutboundRTPStreamStats& other);
519 ~RTCOutboundRTPStreamStats() override;
520
Henrik Boström646fda02019-05-22 15:49:42 +0200521 RTCStatsMember<std::string> media_source_id;
Henrik Boström4f40fa52019-12-19 13:27:27 +0100522 RTCStatsMember<std::string> remote_id;
Henrik Boströma0ff50c2020-05-05 15:54:46 +0200523 RTCStatsMember<std::string> rid;
hbos6ded1902016-11-01 01:50:46 -0700524 RTCStatsMember<uint32_t> packets_sent;
Henrik Boströmcf96e0f2019-04-17 13:51:53 +0200525 RTCStatsMember<uint64_t> retransmitted_packets_sent;
hbos6ded1902016-11-01 01:50:46 -0700526 RTCStatsMember<uint64_t> bytes_sent;
Niels Möllerac0a4cb2019-10-09 15:01:33 +0200527 RTCStatsMember<uint64_t> header_bytes_sent;
Henrik Boströmcf96e0f2019-04-17 13:51:53 +0200528 RTCStatsMember<uint64_t> retransmitted_bytes_sent;
hbosa7a9be12017-03-01 01:02:45 -0800529 // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7066
hbos6ded1902016-11-01 01:50:46 -0700530 RTCStatsMember<double> target_bitrate;
hbos6769c492017-01-02 08:35:13 -0800531 RTCStatsMember<uint32_t> frames_encoded;
Rasmus Brandt2efae772019-06-27 14:29:34 +0200532 RTCStatsMember<uint32_t> key_frames_encoded;
Henrik Boströmf71362f2019-04-08 16:14:23 +0200533 RTCStatsMember<double> total_encode_time;
Henrik Boström23aff9b2019-05-20 15:15:38 +0200534 RTCStatsMember<uint64_t> total_encoded_bytes_target;
Henrik Boströma0ff50c2020-05-05 15:54:46 +0200535 RTCStatsMember<uint32_t> frame_width;
536 RTCStatsMember<uint32_t> frame_height;
537 RTCStatsMember<double> frames_per_second;
538 RTCStatsMember<uint32_t> frames_sent;
539 RTCStatsMember<uint32_t> huge_frames_sent;
Henrik Boström9fe18342019-05-16 18:38:20 +0200540 // TODO(https://crbug.com/webrtc/10635): This is only implemented for video;
541 // implement it for audio as well.
542 RTCStatsMember<double> total_packet_send_delay;
Henrik Boströmce33b6a2019-05-28 17:42:38 +0200543 // Enum type RTCQualityLimitationReason
Henrik Boströmce33b6a2019-05-28 17:42:38 +0200544 RTCStatsMember<std::string> quality_limitation_reason;
Byoungchan Lee7d235352021-05-28 21:32:04 +0900545 RTCStatsMember<std::map<std::string, double>> quality_limitation_durations;
Evan Shrubsolecc62b162019-09-09 11:26:45 +0200546 // https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-qualitylimitationresolutionchanges
547 RTCStatsMember<uint32_t> quality_limitation_resolution_changes;
Henrik Boström2e069262019-04-09 13:59:31 +0200548 // https://henbos.github.io/webrtc-provisional-stats/#dom-rtcoutboundrtpstreamstats-contenttype
549 RTCStatsMember<std::string> content_type;
Henrik Boström6b430862019-08-16 13:09:51 +0200550 // TODO(hbos): This is only implemented for video; implement it for audio as
551 // well.
552 RTCStatsMember<std::string> encoder_implementation;
Di Wufd1e9d12021-03-09 09:25:28 -0800553 // FIR and PLI counts are only defined for |media_type == "video"|.
554 RTCStatsMember<uint32_t> fir_count;
555 RTCStatsMember<uint32_t> pli_count;
Di Wufd1e9d12021-03-09 09:25:28 -0800556 RTCStatsMember<uint32_t> nack_count;
557 RTCStatsMember<uint64_t> qp_sum;
hbos6ded1902016-11-01 01:50:46 -0700558};
559
Henrik Boström883eefc2019-05-27 13:40:25 +0200560// https://w3c.github.io/webrtc-stats/#remoteinboundrtpstats-dict*
Di Wufd1e9d12021-03-09 09:25:28 -0800561class RTC_EXPORT RTCRemoteInboundRtpStreamStats final
562 : public RTCReceivedRtpStreamStats {
Henrik Boström883eefc2019-05-27 13:40:25 +0200563 public:
564 WEBRTC_RTCSTATS_DECL();
565
566 RTCRemoteInboundRtpStreamStats(const std::string& id, int64_t timestamp_us);
567 RTCRemoteInboundRtpStreamStats(std::string&& id, int64_t timestamp_us);
568 RTCRemoteInboundRtpStreamStats(const RTCRemoteInboundRtpStreamStats& other);
569 ~RTCRemoteInboundRtpStreamStats() override;
570
Henrik Boström883eefc2019-05-27 13:40:25 +0200571 // TODO(hbos): The following RTCReceivedRtpStreamStats metrics should also be
572 // implemented: packetsReceived, packetsDiscarded, packetsRepaired,
573 // burstPacketsLost, burstPacketsDiscarded, burstLossCount, burstDiscardCount,
574 // burstLossRate, burstDiscardRate, gapLossRate and gapDiscardRate.
575 // RTCRemoteInboundRtpStreamStats
576 RTCStatsMember<std::string> local_id;
577 RTCStatsMember<double> round_trip_time;
Di Wu86f04ad2021-02-28 23:36:03 -0800578 RTCStatsMember<double> fraction_lost;
Di Wu88a51b22021-03-01 11:22:06 -0800579 RTCStatsMember<double> total_round_trip_time;
580 RTCStatsMember<int32_t> round_trip_time_measurements;
Henrik Boström883eefc2019-05-27 13:40:25 +0200581};
582
Alessio Bazzicaf7b1b952021-03-23 17:23:04 +0100583// https://w3c.github.io/webrtc-stats/#remoteoutboundrtpstats-dict*
584class RTC_EXPORT RTCRemoteOutboundRtpStreamStats final
585 : public RTCSentRtpStreamStats {
586 public:
587 WEBRTC_RTCSTATS_DECL();
588
589 RTCRemoteOutboundRtpStreamStats(const std::string& id, int64_t timestamp_us);
590 RTCRemoteOutboundRtpStreamStats(std::string&& id, int64_t timestamp_us);
591 RTCRemoteOutboundRtpStreamStats(const RTCRemoteOutboundRtpStreamStats& other);
592 ~RTCRemoteOutboundRtpStreamStats() override;
593
594 RTCStatsMember<std::string> local_id;
595 RTCStatsMember<double> remote_timestamp;
596 RTCStatsMember<uint64_t> reports_sent;
597};
598
Henrik Boström646fda02019-05-22 15:49:42 +0200599// https://w3c.github.io/webrtc-stats/#dom-rtcmediasourcestats
600class RTC_EXPORT RTCMediaSourceStats : public RTCStats {
601 public:
602 WEBRTC_RTCSTATS_DECL();
603
604 RTCMediaSourceStats(const RTCMediaSourceStats& other);
605 ~RTCMediaSourceStats() override;
606
607 RTCStatsMember<std::string> track_identifier;
608 RTCStatsMember<std::string> kind;
609
610 protected:
611 RTCMediaSourceStats(const std::string& id, int64_t timestamp_us);
612 RTCMediaSourceStats(std::string&& id, int64_t timestamp_us);
613};
614
615// https://w3c.github.io/webrtc-stats/#dom-rtcaudiosourcestats
616class RTC_EXPORT RTCAudioSourceStats final : public RTCMediaSourceStats {
617 public:
618 WEBRTC_RTCSTATS_DECL();
619
620 RTCAudioSourceStats(const std::string& id, int64_t timestamp_us);
621 RTCAudioSourceStats(std::string&& id, int64_t timestamp_us);
622 RTCAudioSourceStats(const RTCAudioSourceStats& other);
623 ~RTCAudioSourceStats() override;
Henrik Boströmd2c336f2019-07-03 17:11:10 +0200624
625 RTCStatsMember<double> audio_level;
626 RTCStatsMember<double> total_audio_energy;
627 RTCStatsMember<double> total_samples_duration;
Taylor Brandstetter64851c02021-06-24 13:32:50 -0700628 RTCStatsMember<double> echo_return_loss;
629 RTCStatsMember<double> echo_return_loss_enhancement;
Henrik Boström646fda02019-05-22 15:49:42 +0200630};
631
632// https://w3c.github.io/webrtc-stats/#dom-rtcvideosourcestats
633class RTC_EXPORT RTCVideoSourceStats final : public RTCMediaSourceStats {
634 public:
635 WEBRTC_RTCSTATS_DECL();
636
637 RTCVideoSourceStats(const std::string& id, int64_t timestamp_us);
638 RTCVideoSourceStats(std::string&& id, int64_t timestamp_us);
639 RTCVideoSourceStats(const RTCVideoSourceStats& other);
640 ~RTCVideoSourceStats() override;
641
642 RTCStatsMember<uint32_t> width;
643 RTCStatsMember<uint32_t> height;
Henrik Boström646fda02019-05-22 15:49:42 +0200644 RTCStatsMember<uint32_t> frames;
645 RTCStatsMember<uint32_t> frames_per_second;
646};
647
hbos2fa7c672016-10-24 04:00:05 -0700648// https://w3c.github.io/webrtc-stats/#transportstats-dict*
Mirko Bonadei276827c2018-10-16 14:13:50 +0200649class RTC_EXPORT RTCTransportStats final : public RTCStats {
hbos2fa7c672016-10-24 04:00:05 -0700650 public:
651 WEBRTC_RTCSTATS_DECL();
652
653 RTCTransportStats(const std::string& id, int64_t timestamp_us);
654 RTCTransportStats(std::string&& id, int64_t timestamp_us);
655 RTCTransportStats(const RTCTransportStats& other);
656 ~RTCTransportStats() override;
657
658 RTCStatsMember<uint64_t> bytes_sent;
Artem Titovedacbd52020-07-06 16:06:37 +0200659 RTCStatsMember<uint64_t> packets_sent;
hbos2fa7c672016-10-24 04:00:05 -0700660 RTCStatsMember<uint64_t> bytes_received;
Artem Titovedacbd52020-07-06 16:06:37 +0200661 RTCStatsMember<uint64_t> packets_received;
hbos2fa7c672016-10-24 04:00:05 -0700662 RTCStatsMember<std::string> rtcp_transport_stats_id;
hbos7064d592017-01-16 07:38:02 -0800663 // TODO(hbos): Support enum types? "RTCStatsMember<RTCDtlsTransportState>"?
664 RTCStatsMember<std::string> dtls_state;
hbos2fa7c672016-10-24 04:00:05 -0700665 RTCStatsMember<std::string> selected_candidate_pair_id;
666 RTCStatsMember<std::string> local_certificate_id;
667 RTCStatsMember<std::string> remote_certificate_id;
Harald Alvestrand5cb78072019-10-28 09:51:17 +0100668 RTCStatsMember<std::string> tls_version;
669 RTCStatsMember<std::string> dtls_cipher;
670 RTCStatsMember<std::string> srtp_cipher;
Jonas Oreland149dc722019-08-28 08:10:27 +0200671 RTCStatsMember<uint32_t> selected_candidate_pair_changes;
hbos2fa7c672016-10-24 04:00:05 -0700672};
673
hbosd565b732016-08-30 14:04:35 -0700674} // namespace webrtc
675
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200676#endif // API_STATS_RTCSTATS_OBJECTS_H_