OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 RTCCertificateStats(std::string&& id, int64_t timestamp_us); | 52 RTCCertificateStats(std::string&& id, int64_t timestamp_us); |
53 RTCCertificateStats(const RTCCertificateStats& other); | 53 RTCCertificateStats(const RTCCertificateStats& other); |
54 ~RTCCertificateStats() override; | 54 ~RTCCertificateStats() override; |
55 | 55 |
56 RTCStatsMember<std::string> fingerprint; | 56 RTCStatsMember<std::string> fingerprint; |
57 RTCStatsMember<std::string> fingerprint_algorithm; | 57 RTCStatsMember<std::string> fingerprint_algorithm; |
58 RTCStatsMember<std::string> base64_certificate; | 58 RTCStatsMember<std::string> base64_certificate; |
59 RTCStatsMember<std::string> issuer_certificate_id; | 59 RTCStatsMember<std::string> issuer_certificate_id; |
60 }; | 60 }; |
61 | 61 |
| 62 // https://w3c.github.io/webrtc-stats/#codec-dict* |
| 63 // Tracking bug crbug.com/659117 |
| 64 // TODO(hbos): The present codec ID assignment is not sufficient to support |
| 65 // Unified Plan or unbundled connections in all cases. crbug.com/659117 |
| 66 class RTCCodecStats final : public RTCStats { |
| 67 public: |
| 68 WEBRTC_RTCSTATS_DECL(); |
| 69 |
| 70 RTCCodecStats(const std::string& id, int64_t timestamp_us); |
| 71 RTCCodecStats(std::string&& id, int64_t timestamp_us); |
| 72 RTCCodecStats(const RTCCodecStats& other); |
| 73 ~RTCCodecStats() override; |
| 74 |
| 75 RTCStatsMember<uint32_t> payload_type; |
| 76 RTCStatsMember<std::string> codec; |
| 77 RTCStatsMember<uint32_t> clock_rate; |
| 78 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659117 |
| 79 RTCStatsMember<uint32_t> channels; |
| 80 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659117 |
| 81 RTCStatsMember<std::string> parameters; |
| 82 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659117 |
| 83 RTCStatsMember<std::string> implementation; |
| 84 }; |
| 85 |
62 // https://w3c.github.io/webrtc-stats/#dcstats-dict* | 86 // https://w3c.github.io/webrtc-stats/#dcstats-dict* |
63 class RTCDataChannelStats final : public RTCStats { | 87 class RTCDataChannelStats final : public RTCStats { |
64 public: | 88 public: |
65 WEBRTC_RTCSTATS_DECL(); | 89 WEBRTC_RTCSTATS_DECL(); |
66 | 90 |
67 RTCDataChannelStats(const std::string& id, int64_t timestamp_us); | 91 RTCDataChannelStats(const std::string& id, int64_t timestamp_us); |
68 RTCDataChannelStats(std::string&& id, int64_t timestamp_us); | 92 RTCDataChannelStats(std::string&& id, int64_t timestamp_us); |
69 RTCDataChannelStats(const RTCDataChannelStats& other); | 93 RTCDataChannelStats(const RTCDataChannelStats& other); |
70 ~RTCDataChannelStats() override; | 94 ~RTCDataChannelStats() override; |
71 | 95 |
72 RTCStatsMember<std::string> label; | 96 RTCStatsMember<std::string> label; |
73 RTCStatsMember<std::string> protocol; | 97 RTCStatsMember<std::string> protocol; |
74 RTCStatsMember<int32_t> datachannelid; | 98 RTCStatsMember<int32_t> datachannelid; |
75 // TODO(hbos): Support enum types? "RTCStatsMember<RTCDataChannelState>"? | 99 // TODO(hbos): Support enum types? "RTCStatsMember<RTCDataChannelState>"? |
76 RTCStatsMember<std::string> state; | 100 RTCStatsMember<std::string> state; |
77 RTCStatsMember<uint32_t> messages_sent; | 101 RTCStatsMember<uint32_t> messages_sent; |
78 RTCStatsMember<uint64_t> bytes_sent; | 102 RTCStatsMember<uint64_t> bytes_sent; |
79 RTCStatsMember<uint32_t> messages_received; | 103 RTCStatsMember<uint32_t> messages_received; |
80 RTCStatsMember<uint64_t> bytes_received; | 104 RTCStatsMember<uint64_t> bytes_received; |
81 }; | 105 }; |
82 | 106 |
83 // https://w3c.github.io/webrtc-stats/#candidatepair-dict* | 107 // https://w3c.github.io/webrtc-stats/#candidatepair-dict* |
84 // TODO(hbos): Finish implementation. Tracking bug crbug.com/633550 | 108 // TODO(hbos): Tracking bug crbug.com/633550 |
85 class RTCIceCandidatePairStats final : public RTCStats { | 109 class RTCIceCandidatePairStats final : public RTCStats { |
86 public: | 110 public: |
87 WEBRTC_RTCSTATS_DECL(); | 111 WEBRTC_RTCSTATS_DECL(); |
88 | 112 |
89 RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us); | 113 RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us); |
90 RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us); | 114 RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us); |
91 RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other); | 115 RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other); |
92 ~RTCIceCandidatePairStats() override; | 116 ~RTCIceCandidatePairStats() override; |
93 | 117 |
94 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550, 653873 | 118 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550, 653873 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 201 |
178 class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats { | 202 class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats { |
179 public: | 203 public: |
180 static const char kType[]; | 204 static const char kType[]; |
181 RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us); | 205 RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us); |
182 RTCRemoteIceCandidateStats(std::string&& id, int64_t timestamp_us); | 206 RTCRemoteIceCandidateStats(std::string&& id, int64_t timestamp_us); |
183 const char* type() const override; | 207 const char* type() const override; |
184 }; | 208 }; |
185 | 209 |
186 // https://w3c.github.io/webrtc-stats/#msstats-dict* | 210 // https://w3c.github.io/webrtc-stats/#msstats-dict* |
187 // TODO(hbos): Finish implementation. Tracking bug crbug.com/660827 | 211 // TODO(hbos): Tracking bug crbug.com/660827 |
188 class RTCMediaStreamStats final : public RTCStats { | 212 class RTCMediaStreamStats final : public RTCStats { |
189 public: | 213 public: |
190 WEBRTC_RTCSTATS_DECL(); | 214 WEBRTC_RTCSTATS_DECL(); |
191 | 215 |
192 RTCMediaStreamStats(const std::string& id, int64_t timestamp_us); | 216 RTCMediaStreamStats(const std::string& id, int64_t timestamp_us); |
193 RTCMediaStreamStats(std::string&& id, int64_t timestamp_us); | 217 RTCMediaStreamStats(std::string&& id, int64_t timestamp_us); |
194 RTCMediaStreamStats(const RTCMediaStreamStats& other); | 218 RTCMediaStreamStats(const RTCMediaStreamStats& other); |
195 ~RTCMediaStreamStats() override; | 219 ~RTCMediaStreamStats() override; |
196 | 220 |
197 RTCStatsMember<std::string> stream_identifier; | 221 RTCStatsMember<std::string> stream_identifier; |
198 RTCStatsMember<std::vector<std::string>> track_ids; | 222 RTCStatsMember<std::vector<std::string>> track_ids; |
199 }; | 223 }; |
200 | 224 |
201 // https://w3c.github.io/webrtc-stats/#mststats-dict* | 225 // https://w3c.github.io/webrtc-stats/#mststats-dict* |
202 // TODO(hbos): Finish implementation. Tracking bug crbug.com/659137 | 226 // TODO(hbos): Tracking bug crbug.com/659137 |
203 class RTCMediaStreamTrackStats final : public RTCStats { | 227 class RTCMediaStreamTrackStats final : public RTCStats { |
204 public: | 228 public: |
205 WEBRTC_RTCSTATS_DECL(); | 229 WEBRTC_RTCSTATS_DECL(); |
206 | 230 |
207 RTCMediaStreamTrackStats(const std::string& id, int64_t timestamp_us); | 231 RTCMediaStreamTrackStats(const std::string& id, int64_t timestamp_us); |
208 RTCMediaStreamTrackStats(std::string&& id, int64_t timestamp_us); | 232 RTCMediaStreamTrackStats(std::string&& id, int64_t timestamp_us); |
209 RTCMediaStreamTrackStats(const RTCMediaStreamTrackStats& other); | 233 RTCMediaStreamTrackStats(const RTCMediaStreamTrackStats& other); |
210 ~RTCMediaStreamTrackStats() override; | 234 ~RTCMediaStreamTrackStats() override; |
211 | 235 |
212 RTCStatsMember<std::string> track_identifier; | 236 RTCStatsMember<std::string> track_identifier; |
(...skipping 23 matching lines...) Expand all Loading... |
236 RTCStatsMember<uint32_t> partial_frames_lost; | 260 RTCStatsMember<uint32_t> partial_frames_lost; |
237 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | 261 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 |
238 RTCStatsMember<uint32_t> full_frames_lost; | 262 RTCStatsMember<uint32_t> full_frames_lost; |
239 // Audio-only members | 263 // Audio-only members |
240 RTCStatsMember<double> audio_level; | 264 RTCStatsMember<double> audio_level; |
241 RTCStatsMember<double> echo_return_loss; | 265 RTCStatsMember<double> echo_return_loss; |
242 RTCStatsMember<double> echo_return_loss_enhancement; | 266 RTCStatsMember<double> echo_return_loss_enhancement; |
243 }; | 267 }; |
244 | 268 |
245 // https://w3c.github.io/webrtc-stats/#pcstats-dict* | 269 // https://w3c.github.io/webrtc-stats/#pcstats-dict* |
246 // TODO(hbos): Finish implementation. Tracking bug crbug.com/636818 | 270 // TODO(hbos): Tracking bug crbug.com/636818 |
247 class RTCPeerConnectionStats final : public RTCStats { | 271 class RTCPeerConnectionStats final : public RTCStats { |
248 public: | 272 public: |
249 WEBRTC_RTCSTATS_DECL(); | 273 WEBRTC_RTCSTATS_DECL(); |
250 | 274 |
251 RTCPeerConnectionStats(const std::string& id, int64_t timestamp_us); | 275 RTCPeerConnectionStats(const std::string& id, int64_t timestamp_us); |
252 RTCPeerConnectionStats(std::string&& id, int64_t timestamp_us); | 276 RTCPeerConnectionStats(std::string&& id, int64_t timestamp_us); |
253 RTCPeerConnectionStats(const RTCPeerConnectionStats& other); | 277 RTCPeerConnectionStats(const RTCPeerConnectionStats& other); |
254 ~RTCPeerConnectionStats() override; | 278 ~RTCPeerConnectionStats() override; |
255 | 279 |
256 // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec. | 280 // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec. |
257 // crbug.com/636818 | 281 // crbug.com/636818 |
258 RTCStatsMember<uint32_t> data_channels_opened; | 282 RTCStatsMember<uint32_t> data_channels_opened; |
259 // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec. | 283 // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec. |
260 // crbug.com/636818 | 284 // crbug.com/636818 |
261 RTCStatsMember<uint32_t> data_channels_closed; | 285 RTCStatsMember<uint32_t> data_channels_closed; |
262 }; | 286 }; |
263 | 287 |
264 // https://w3c.github.io/webrtc-stats/#streamstats-dict* | 288 // https://w3c.github.io/webrtc-stats/#streamstats-dict* |
265 // TODO(hbos): Finish implementation. Tracking bug crbug.com/657854 | 289 // TODO(hbos): Tracking bug crbug.com/657854 |
266 class RTCRTPStreamStats : public RTCStats { | 290 class RTCRTPStreamStats : public RTCStats { |
267 public: | 291 public: |
268 WEBRTC_RTCSTATS_DECL(); | 292 WEBRTC_RTCSTATS_DECL(); |
269 | 293 |
270 RTCRTPStreamStats(const RTCRTPStreamStats& other); | 294 RTCRTPStreamStats(const RTCRTPStreamStats& other); |
271 ~RTCRTPStreamStats() override; | 295 ~RTCRTPStreamStats() override; |
272 | 296 |
273 RTCStatsMember<std::string> ssrc; | 297 RTCStatsMember<std::string> ssrc; |
274 // TODO(hbos): When the remote case is supported |RTCStatsCollector| needs to | 298 // TODO(hbos): When the remote case is supported |RTCStatsCollector| needs to |
275 // set this. crbug.com/657855, 657856 | 299 // set this. crbug.com/657855, 657856 |
276 RTCStatsMember<std::string> associate_stats_id; | 300 RTCStatsMember<std::string> associate_stats_id; |
277 // TODO(hbos): Remote case not supported by |RTCStatsCollector|. | 301 // TODO(hbos): Remote case not supported by |RTCStatsCollector|. |
278 // crbug.com/657855, 657856 | 302 // crbug.com/657855, 657856 |
279 RTCStatsMember<bool> is_remote; // = false | 303 RTCStatsMember<bool> is_remote; // = false |
280 RTCStatsMember<std::string> media_type; | 304 RTCStatsMember<std::string> media_type; |
281 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854, 659137 | 305 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854, 659137 |
282 RTCStatsMember<std::string> media_track_id; | 306 RTCStatsMember<std::string> media_track_id; |
283 RTCStatsMember<std::string> transport_id; | 307 RTCStatsMember<std::string> transport_id; |
284 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854, 659117 | |
285 RTCStatsMember<std::string> codec_id; | 308 RTCStatsMember<std::string> codec_id; |
286 // FIR and PLI counts are only defined for |media_type == "video"|. | 309 // FIR and PLI counts are only defined for |media_type == "video"|. |
287 RTCStatsMember<uint32_t> fir_count; | 310 RTCStatsMember<uint32_t> fir_count; |
288 RTCStatsMember<uint32_t> pli_count; | 311 RTCStatsMember<uint32_t> pli_count; |
289 // TODO(hbos): NACK count should be collected by |RTCStatsCollector| for both | 312 // TODO(hbos): NACK count should be collected by |RTCStatsCollector| for both |
290 // audio and video but is only defined in the "video" case. crbug.com/657856 | 313 // audio and video but is only defined in the "video" case. crbug.com/657856 |
291 RTCStatsMember<uint32_t> nack_count; | 314 RTCStatsMember<uint32_t> nack_count; |
292 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854 | 315 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854 |
293 // SLI count is only defined for |media_type == "video"|. | 316 // SLI count is only defined for |media_type == "video"|. |
294 RTCStatsMember<uint32_t> sli_count; | 317 RTCStatsMember<uint32_t> sli_count; |
295 | 318 |
296 protected: | 319 protected: |
297 RTCRTPStreamStats(const std::string& id, int64_t timestamp_us); | 320 RTCRTPStreamStats(const std::string& id, int64_t timestamp_us); |
298 RTCRTPStreamStats(std::string&& id, int64_t timestamp_us); | 321 RTCRTPStreamStats(std::string&& id, int64_t timestamp_us); |
299 }; | 322 }; |
300 | 323 |
301 // https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict* | 324 // https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict* |
302 // TODO(hbos): Finish implementation and support the remote case | 325 // Tracking bug crbug.com/657855 |
303 // |is_remote = true|. Tracking bug crbug.com/657855 | 326 // TODO(hbos): Support the remote case |is_remote = true|. crbug.com/657855 |
304 class RTCInboundRTPStreamStats final : public RTCRTPStreamStats { | 327 class RTCInboundRTPStreamStats final : public RTCRTPStreamStats { |
305 public: | 328 public: |
306 WEBRTC_RTCSTATS_DECL(); | 329 WEBRTC_RTCSTATS_DECL(); |
307 | 330 |
308 RTCInboundRTPStreamStats(const std::string& id, int64_t timestamp_us); | 331 RTCInboundRTPStreamStats(const std::string& id, int64_t timestamp_us); |
309 RTCInboundRTPStreamStats(std::string&& id, int64_t timestamp_us); | 332 RTCInboundRTPStreamStats(std::string&& id, int64_t timestamp_us); |
310 RTCInboundRTPStreamStats(const RTCInboundRTPStreamStats& other); | 333 RTCInboundRTPStreamStats(const RTCInboundRTPStreamStats& other); |
311 ~RTCInboundRTPStreamStats() override; | 334 ~RTCInboundRTPStreamStats() override; |
312 | 335 |
313 RTCStatsMember<uint32_t> packets_received; | 336 RTCStatsMember<uint32_t> packets_received; |
(...skipping 20 matching lines...) Expand all Loading... |
334 RTCStatsMember<double> burst_loss_rate; | 357 RTCStatsMember<double> burst_loss_rate; |
335 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 | 358 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 |
336 RTCStatsMember<double> burst_discard_rate; | 359 RTCStatsMember<double> burst_discard_rate; |
337 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 | 360 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 |
338 RTCStatsMember<double> gap_loss_rate; | 361 RTCStatsMember<double> gap_loss_rate; |
339 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 | 362 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855 |
340 RTCStatsMember<double> gap_discard_rate; | 363 RTCStatsMember<double> gap_discard_rate; |
341 }; | 364 }; |
342 | 365 |
343 // https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict* | 366 // https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict* |
344 // TODO(hbos): Finish implementation and support the remote case | 367 // Tracking bug crbug.com/657856 |
345 // |is_remote = true|. Tracking bug crbug.com/657856 | 368 // TODO(hbos): Support the remote case |is_remote = true|. crbug.com/657856 |
346 class RTCOutboundRTPStreamStats final : public RTCRTPStreamStats { | 369 class RTCOutboundRTPStreamStats final : public RTCRTPStreamStats { |
347 public: | 370 public: |
348 WEBRTC_RTCSTATS_DECL(); | 371 WEBRTC_RTCSTATS_DECL(); |
349 | 372 |
350 RTCOutboundRTPStreamStats(const std::string& id, int64_t timestamp_us); | 373 RTCOutboundRTPStreamStats(const std::string& id, int64_t timestamp_us); |
351 RTCOutboundRTPStreamStats(std::string&& id, int64_t timestamp_us); | 374 RTCOutboundRTPStreamStats(std::string&& id, int64_t timestamp_us); |
352 RTCOutboundRTPStreamStats(const RTCOutboundRTPStreamStats& other); | 375 RTCOutboundRTPStreamStats(const RTCOutboundRTPStreamStats& other); |
353 ~RTCOutboundRTPStreamStats() override; | 376 ~RTCOutboundRTPStreamStats() override; |
354 | 377 |
355 RTCStatsMember<uint32_t> packets_sent; | 378 RTCStatsMember<uint32_t> packets_sent; |
(...skipping 18 matching lines...) Expand all Loading... |
374 RTCStatsMember<std::string> rtcp_transport_stats_id; | 397 RTCStatsMember<std::string> rtcp_transport_stats_id; |
375 RTCStatsMember<bool> active_connection; | 398 RTCStatsMember<bool> active_connection; |
376 RTCStatsMember<std::string> selected_candidate_pair_id; | 399 RTCStatsMember<std::string> selected_candidate_pair_id; |
377 RTCStatsMember<std::string> local_certificate_id; | 400 RTCStatsMember<std::string> local_certificate_id; |
378 RTCStatsMember<std::string> remote_certificate_id; | 401 RTCStatsMember<std::string> remote_certificate_id; |
379 }; | 402 }; |
380 | 403 |
381 } // namespace webrtc | 404 } // namespace webrtc |
382 | 405 |
383 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ | 406 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ |
OLD | NEW |