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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // TODO(hbos): Support enum types? "RTCStatsMember<RTCDataChannelState>"? | 75 // TODO(hbos): Support enum types? "RTCStatsMember<RTCDataChannelState>"? |
76 RTCStatsMember<std::string> state; | 76 RTCStatsMember<std::string> state; |
77 RTCStatsMember<uint32_t> messages_sent; | 77 RTCStatsMember<uint32_t> messages_sent; |
78 RTCStatsMember<uint64_t> bytes_sent; | 78 RTCStatsMember<uint64_t> bytes_sent; |
79 RTCStatsMember<uint32_t> messages_received; | 79 RTCStatsMember<uint32_t> messages_received; |
80 RTCStatsMember<uint64_t> bytes_received; | 80 RTCStatsMember<uint64_t> bytes_received; |
81 }; | 81 }; |
82 | 82 |
83 // https://w3c.github.io/webrtc-stats/#candidatepair-dict* | 83 // https://w3c.github.io/webrtc-stats/#candidatepair-dict* |
84 // TODO(hbos): Finish implementation. Tracking bug crbug.com/633550 | 84 // TODO(hbos): Finish implementation. Tracking bug crbug.com/633550 |
85 class RTCIceCandidatePairStats : public RTCStats { | 85 class RTCIceCandidatePairStats final : public RTCStats { |
86 public: | 86 public: |
87 WEBRTC_RTCSTATS_DECL(); | 87 WEBRTC_RTCSTATS_DECL(); |
88 | 88 |
89 RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us); | 89 RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us); |
90 RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us); | 90 RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us); |
91 RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other); | 91 RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other); |
92 ~RTCIceCandidatePairStats() override; | 92 ~RTCIceCandidatePairStats() override; |
93 | 93 |
94 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550, 653873 | 94 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550, 653873 |
95 RTCStatsMember<std::string> transport_id; | 95 RTCStatsMember<std::string> transport_id; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 ~RTCPeerConnectionStats() override; | 195 ~RTCPeerConnectionStats() override; |
196 | 196 |
197 // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec. | 197 // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec. |
198 // crbug.com/636818 | 198 // crbug.com/636818 |
199 RTCStatsMember<uint32_t> data_channels_opened; | 199 RTCStatsMember<uint32_t> data_channels_opened; |
200 // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec. | 200 // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec. |
201 // crbug.com/636818 | 201 // crbug.com/636818 |
202 RTCStatsMember<uint32_t> data_channels_closed; | 202 RTCStatsMember<uint32_t> data_channels_closed; |
203 }; | 203 }; |
204 | 204 |
| 205 // https://w3c.github.io/webrtc-stats/#streamstats-dict* |
| 206 // TODO(hbos): Finish implementation. Tracking bug crbug.com/657854 |
| 207 class RTCRTPStreamStats : public RTCStats { |
| 208 public: |
| 209 WEBRTC_RTCSTATS_DECL(); |
| 210 |
| 211 RTCRTPStreamStats(const RTCRTPStreamStats& other); |
| 212 ~RTCRTPStreamStats() override; |
| 213 |
| 214 RTCStatsMember<std::string> ssrc; |
| 215 // TODO(hbos): When the remote case is supported |RTCStatsCollector| needs to |
| 216 // set this. crbug.com/657855, 657856 |
| 217 RTCStatsMember<std::string> associate_stats_id; |
| 218 // TODO(hbos): Remote case not supported by |RTCStatsCollector|. |
| 219 // crbug.com/657855, 657856 |
| 220 RTCStatsMember<bool> is_remote; // = false |
| 221 RTCStatsMember<std::string> media_type; |
| 222 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854, 659137 |
| 223 RTCStatsMember<std::string> media_track_id; |
| 224 RTCStatsMember<std::string> transport_id; |
| 225 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854, 659117 |
| 226 RTCStatsMember<std::string> codec_id; |
| 227 // FIR, PLI, NACK and SLI counts are only defined for |media_type == "video"|. |
| 228 RTCStatsMember<uint32_t> fir_count; |
| 229 RTCStatsMember<uint32_t> pli_count; |
| 230 RTCStatsMember<uint32_t> nack_count; |
| 231 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854 |
| 232 RTCStatsMember<uint32_t> sli_count; |
| 233 |
| 234 protected: |
| 235 RTCRTPStreamStats(const std::string& id, int64_t timestamp_us); |
| 236 RTCRTPStreamStats(std::string&& id, int64_t timestamp_us); |
| 237 }; |
| 238 |
| 239 // https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict* |
| 240 // TODO(hbos): Finish implementation and support the remote case |
| 241 // |is_remote = true|. Tracking bug crbug.com/657856 |
| 242 class RTCOutboundRTPStreamStats final : public RTCRTPStreamStats { |
| 243 public: |
| 244 WEBRTC_RTCSTATS_DECL(); |
| 245 |
| 246 RTCOutboundRTPStreamStats(const std::string& id, int64_t timestamp_us); |
| 247 RTCOutboundRTPStreamStats(std::string&& id, int64_t timestamp_us); |
| 248 RTCOutboundRTPStreamStats(const RTCOutboundRTPStreamStats& other); |
| 249 ~RTCOutboundRTPStreamStats() override; |
| 250 |
| 251 RTCStatsMember<uint32_t> packets_sent; |
| 252 RTCStatsMember<uint64_t> bytes_sent; |
| 253 // TODO(hbos): Not collected in the "audio" case by |RTCStatsCollector|. |
| 254 // crbug.com/657856 |
| 255 RTCStatsMember<double> target_bitrate; |
| 256 RTCStatsMember<double> round_trip_time; |
| 257 }; |
| 258 |
205 // https://w3c.github.io/webrtc-stats/#transportstats-dict* | 259 // https://w3c.github.io/webrtc-stats/#transportstats-dict* |
206 class RTCTransportStats final : public RTCStats { | 260 class RTCTransportStats final : public RTCStats { |
207 public: | 261 public: |
208 WEBRTC_RTCSTATS_DECL(); | 262 WEBRTC_RTCSTATS_DECL(); |
209 | 263 |
210 RTCTransportStats(const std::string& id, int64_t timestamp_us); | 264 RTCTransportStats(const std::string& id, int64_t timestamp_us); |
211 RTCTransportStats(std::string&& id, int64_t timestamp_us); | 265 RTCTransportStats(std::string&& id, int64_t timestamp_us); |
212 RTCTransportStats(const RTCTransportStats& other); | 266 RTCTransportStats(const RTCTransportStats& other); |
213 ~RTCTransportStats() override; | 267 ~RTCTransportStats() override; |
214 | 268 |
215 RTCStatsMember<uint64_t> bytes_sent; | 269 RTCStatsMember<uint64_t> bytes_sent; |
216 RTCStatsMember<uint64_t> bytes_received; | 270 RTCStatsMember<uint64_t> bytes_received; |
217 RTCStatsMember<std::string> rtcp_transport_stats_id; | 271 RTCStatsMember<std::string> rtcp_transport_stats_id; |
218 RTCStatsMember<bool> active_connection; | 272 RTCStatsMember<bool> active_connection; |
219 RTCStatsMember<std::string> selected_candidate_pair_id; | 273 RTCStatsMember<std::string> selected_candidate_pair_id; |
220 RTCStatsMember<std::string> local_certificate_id; | 274 RTCStatsMember<std::string> local_certificate_id; |
221 RTCStatsMember<std::string> remote_certificate_id; | 275 RTCStatsMember<std::string> remote_certificate_id; |
222 }; | 276 }; |
223 | 277 |
224 } // namespace webrtc | 278 } // namespace webrtc |
225 | 279 |
226 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ | 280 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ |
OLD | NEW |