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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 }; | 176 }; |
177 | 177 |
178 class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats { | 178 class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats { |
179 public: | 179 public: |
180 static const char kType[]; | 180 static const char kType[]; |
181 RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us); | 181 RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us); |
182 RTCRemoteIceCandidateStats(std::string&& id, int64_t timestamp_us); | 182 RTCRemoteIceCandidateStats(std::string&& id, int64_t timestamp_us); |
183 const char* type() const override; | 183 const char* type() const override; |
184 }; | 184 }; |
185 | 185 |
186 // https://w3c.github.io/webrtc-stats/#msstats-dict* | |
187 // TODO(hbos): Finish implementation. Tracking bug crbug.com/660827 | |
188 class RTCMediaStreamStats final : public RTCStats { | |
189 public: | |
190 WEBRTC_RTCSTATS_DECL(); | |
191 | |
192 RTCMediaStreamStats(const std::string& id, int64_t timestamp_us); | |
193 RTCMediaStreamStats(std::string&& id, int64_t timestamp_us); | |
194 RTCMediaStreamStats(const RTCMediaStreamStats& other); | |
195 ~RTCMediaStreamStats() override; | |
196 | |
197 RTCStatsMember<std::string> stream_identifier; | |
198 RTCStatsMember<std::vector<std::string>> track_ids; | |
199 }; | |
200 | |
201 // https://w3c.github.io/webrtc-stats/#mststats-dict* | |
202 // TODO(hbos): Finish implementation. Tracking bug crbug.com/659137 | |
203 class RTCMediaStreamTrackStats final : public RTCStats { | |
204 public: | |
205 WEBRTC_RTCSTATS_DECL(); | |
206 | |
207 RTCMediaStreamTrackStats(const std::string& id, int64_t timestamp_us); | |
208 RTCMediaStreamTrackStats(std::string&& id, int64_t timestamp_us); | |
209 RTCMediaStreamTrackStats(const RTCMediaStreamTrackStats& other); | |
210 ~RTCMediaStreamTrackStats() override; | |
211 | |
212 RTCStatsMember<std::string> track_identifier; | |
213 RTCStatsMember<bool> remote_source; | |
214 RTCStatsMember<bool> ended; | |
215 // TODO(hbos): |RTCStatsCollector| does not return stats for detached tracks. | |
216 // crbug.com/659137 | |
217 RTCStatsMember<bool> detached; | |
218 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | |
219 RTCStatsMember<std::vector<std::string>> ssrc_ids; | |
hbos
2016/11/02 11:44:56
I don't know how to get the SSRCs for the tracks.
hta-webrtc
2016/11/03 14:34:22
You may have to reverse-map them from the part tha
| |
220 // Video-only members | |
221 RTCStatsMember<uint32_t> frame_width; | |
222 RTCStatsMember<uint32_t> frame_height; | |
223 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | |
224 RTCStatsMember<double> frames_per_second; | |
225 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | |
226 RTCStatsMember<uint32_t> frames_sent; | |
227 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | |
228 RTCStatsMember<uint32_t> frames_received; | |
229 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | |
230 RTCStatsMember<uint32_t> frames_decoded; | |
231 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | |
232 RTCStatsMember<uint32_t> frames_dropped; | |
233 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | |
234 RTCStatsMember<uint32_t> frames_corrupted; | |
235 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | |
236 RTCStatsMember<uint32_t> partial_frames_lost; | |
237 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | |
238 RTCStatsMember<uint32_t> full_frames_lost; | |
239 // Audio-only members | |
240 RTCStatsMember<double> audio_level; | |
241 RTCStatsMember<double> echo_return_loss; | |
242 RTCStatsMember<double> echo_return_loss_enhancement; | |
243 }; | |
244 | |
186 // https://w3c.github.io/webrtc-stats/#pcstats-dict* | 245 // https://w3c.github.io/webrtc-stats/#pcstats-dict* |
187 // TODO(hbos): Finish implementation. Tracking bug crbug.com/636818 | 246 // TODO(hbos): Finish implementation. Tracking bug crbug.com/636818 |
188 class RTCPeerConnectionStats final : public RTCStats { | 247 class RTCPeerConnectionStats final : public RTCStats { |
189 public: | 248 public: |
190 WEBRTC_RTCSTATS_DECL(); | 249 WEBRTC_RTCSTATS_DECL(); |
191 | 250 |
192 RTCPeerConnectionStats(const std::string& id, int64_t timestamp_us); | 251 RTCPeerConnectionStats(const std::string& id, int64_t timestamp_us); |
193 RTCPeerConnectionStats(std::string&& id, int64_t timestamp_us); | 252 RTCPeerConnectionStats(std::string&& id, int64_t timestamp_us); |
194 RTCPeerConnectionStats(const RTCPeerConnectionStats& other); | 253 RTCPeerConnectionStats(const RTCPeerConnectionStats& other); |
195 ~RTCPeerConnectionStats() override; | 254 ~RTCPeerConnectionStats() override; |
(...skipping 17 matching lines...) Expand all Loading... | |
213 | 272 |
214 RTCStatsMember<std::string> ssrc; | 273 RTCStatsMember<std::string> ssrc; |
215 // TODO(hbos): When the remote case is supported |RTCStatsCollector| needs to | 274 // TODO(hbos): When the remote case is supported |RTCStatsCollector| needs to |
216 // set this. crbug.com/657855, 657856 | 275 // set this. crbug.com/657855, 657856 |
217 RTCStatsMember<std::string> associate_stats_id; | 276 RTCStatsMember<std::string> associate_stats_id; |
218 // TODO(hbos): Remote case not supported by |RTCStatsCollector|. | 277 // TODO(hbos): Remote case not supported by |RTCStatsCollector|. |
219 // crbug.com/657855, 657856 | 278 // crbug.com/657855, 657856 |
220 RTCStatsMember<bool> is_remote; // = false | 279 RTCStatsMember<bool> is_remote; // = false |
221 RTCStatsMember<std::string> media_type; | 280 RTCStatsMember<std::string> media_type; |
222 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854, 659137 | 281 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854, 659137 |
223 RTCStatsMember<std::string> media_track_id; | 282 RTCStatsMember<std::string> media_track_id; |
hbos
2016/11/02 11:44:56
How do I know which track's ID to use? A track tha
| |
224 RTCStatsMember<std::string> transport_id; | 283 RTCStatsMember<std::string> transport_id; |
225 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854, 659117 | 284 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854, 659117 |
226 RTCStatsMember<std::string> codec_id; | 285 RTCStatsMember<std::string> codec_id; |
227 // FIR and PLI counts are only defined for |media_type == "video"|. | 286 // FIR and PLI counts are only defined for |media_type == "video"|. |
228 RTCStatsMember<uint32_t> fir_count; | 287 RTCStatsMember<uint32_t> fir_count; |
229 RTCStatsMember<uint32_t> pli_count; | 288 RTCStatsMember<uint32_t> pli_count; |
230 // TODO(hbos): NACK count should be collected by |RTCStatsCollector| for both | 289 // 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 | 290 // audio and video but is only defined in the "video" case. crbug.com/657856 |
232 RTCStatsMember<uint32_t> nack_count; | 291 RTCStatsMember<uint32_t> nack_count; |
233 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854 | 292 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
315 RTCStatsMember<std::string> rtcp_transport_stats_id; | 374 RTCStatsMember<std::string> rtcp_transport_stats_id; |
316 RTCStatsMember<bool> active_connection; | 375 RTCStatsMember<bool> active_connection; |
317 RTCStatsMember<std::string> selected_candidate_pair_id; | 376 RTCStatsMember<std::string> selected_candidate_pair_id; |
318 RTCStatsMember<std::string> local_certificate_id; | 377 RTCStatsMember<std::string> local_certificate_id; |
319 RTCStatsMember<std::string> remote_certificate_id; | 378 RTCStatsMember<std::string> remote_certificate_id; |
320 }; | 379 }; |
321 | 380 |
322 } // namespace webrtc | 381 } // namespace webrtc |
323 | 382 |
324 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ | 383 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ |
OLD | NEW |