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 final : public RTCStats { | 85 class RTCIceCandidatePairStats : 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 and PLI counts are only defined for |media_type == "video"|. | |
228 RTCStatsMember<uint32_t> fir_count; | |
229 RTCStatsMember<uint32_t> pli_count; | |
230 // TODO(hbos): NACK count should be collected by |RTCStatsCollector| for both | |
231 // audio and video but is only defined in the "video" case. crbug.com/657856 | |
232 RTCStatsMember<uint32_t> nack_count; | |
233 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854 | |
234 // SLI count is only defined for |media_type == "video"|. | |
235 RTCStatsMember<uint32_t> sli_count; | |
236 | |
237 protected: | |
238 RTCRTPStreamStats(const std::string& id, int64_t timestamp_us); | |
239 RTCRTPStreamStats(std::string&& id, int64_t timestamp_us); | |
240 }; | |
241 | |
242 // https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict* | |
243 // TODO(hbos): Finish implementation and support the remote case | |
244 // |is_remote = true|. Tracking bug crbug.com/657856 | |
245 class RTCOutboundRTPStreamStats final : public RTCRTPStreamStats { | |
246 public: | |
247 WEBRTC_RTCSTATS_DECL(); | |
248 | |
249 RTCOutboundRTPStreamStats(const std::string& id, int64_t timestamp_us); | |
250 RTCOutboundRTPStreamStats(std::string&& id, int64_t timestamp_us); | |
251 RTCOutboundRTPStreamStats(const RTCOutboundRTPStreamStats& other); | |
252 ~RTCOutboundRTPStreamStats() override; | |
253 | |
254 RTCStatsMember<uint32_t> packets_sent; | |
255 RTCStatsMember<uint64_t> bytes_sent; | |
256 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657856 | |
257 RTCStatsMember<double> target_bitrate; | |
258 RTCStatsMember<double> round_trip_time; | |
259 }; | |
260 | |
261 // https://w3c.github.io/webrtc-stats/#transportstats-dict* | 205 // https://w3c.github.io/webrtc-stats/#transportstats-dict* |
262 class RTCTransportStats final : public RTCStats { | 206 class RTCTransportStats final : public RTCStats { |
263 public: | 207 public: |
264 WEBRTC_RTCSTATS_DECL(); | 208 WEBRTC_RTCSTATS_DECL(); |
265 | 209 |
266 RTCTransportStats(const std::string& id, int64_t timestamp_us); | 210 RTCTransportStats(const std::string& id, int64_t timestamp_us); |
267 RTCTransportStats(std::string&& id, int64_t timestamp_us); | 211 RTCTransportStats(std::string&& id, int64_t timestamp_us); |
268 RTCTransportStats(const RTCTransportStats& other); | 212 RTCTransportStats(const RTCTransportStats& other); |
269 ~RTCTransportStats() override; | 213 ~RTCTransportStats() override; |
270 | 214 |
271 RTCStatsMember<uint64_t> bytes_sent; | 215 RTCStatsMember<uint64_t> bytes_sent; |
272 RTCStatsMember<uint64_t> bytes_received; | 216 RTCStatsMember<uint64_t> bytes_received; |
273 RTCStatsMember<std::string> rtcp_transport_stats_id; | 217 RTCStatsMember<std::string> rtcp_transport_stats_id; |
274 RTCStatsMember<bool> active_connection; | 218 RTCStatsMember<bool> active_connection; |
275 RTCStatsMember<std::string> selected_candidate_pair_id; | 219 RTCStatsMember<std::string> selected_candidate_pair_id; |
276 RTCStatsMember<std::string> local_certificate_id; | 220 RTCStatsMember<std::string> local_certificate_id; |
277 RTCStatsMember<std::string> remote_certificate_id; | 221 RTCStatsMember<std::string> remote_certificate_id; |
278 }; | 222 }; |
279 | 223 |
280 } // namespace webrtc | 224 } // namespace webrtc |
281 | 225 |
282 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ | 226 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ |
OLD | NEW |