Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 // https://w3c.github.io/webrtc-pc/#rtcicecandidatetype-enum | 37 // https://w3c.github.io/webrtc-pc/#rtcicecandidatetype-enum |
| 38 struct RTCIceCandidateType { | 38 struct RTCIceCandidateType { |
| 39 static const char* kHost; | 39 static const char* kHost; |
| 40 static const char* kSrflx; | 40 static const char* kSrflx; |
| 41 static const char* kPrflx; | 41 static const char* kPrflx; |
| 42 static const char* kRelay; | 42 static const char* kRelay; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 // |RTCMediaStreamTrackStats::kind| is not an enum in the spec but the only | |
| 46 // valid values are "audio" and "video". | |
| 47 // https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-kind | |
|
hbos
2017/01/10 15:47:14
URL from rawgit converted to github.io, but it has
hta-webrtc
2017/01/11 12:36:54
It's merged, but a new dated version hasn't been p
| |
| 48 struct RTCMediaStreamTrackKind { | |
| 49 static const char* kAudio; | |
| 50 static const char* kVideo; | |
| 51 }; | |
| 52 | |
| 45 // https://w3c.github.io/webrtc-stats/#certificatestats-dict* | 53 // https://w3c.github.io/webrtc-stats/#certificatestats-dict* |
| 46 class RTCCertificateStats final : public RTCStats { | 54 class RTCCertificateStats final : public RTCStats { |
| 47 public: | 55 public: |
| 48 WEBRTC_RTCSTATS_DECL(); | 56 WEBRTC_RTCSTATS_DECL(); |
| 49 | 57 |
| 50 RTCCertificateStats(const std::string& id, int64_t timestamp_us); | 58 RTCCertificateStats(const std::string& id, int64_t timestamp_us); |
| 51 RTCCertificateStats(std::string&& id, int64_t timestamp_us); | 59 RTCCertificateStats(std::string&& id, int64_t timestamp_us); |
| 52 RTCCertificateStats(const RTCCertificateStats& other); | 60 RTCCertificateStats(const RTCCertificateStats& other); |
| 53 ~RTCCertificateStats() override; | 61 ~RTCCertificateStats() override; |
| 54 | 62 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 221 RTCStatsMember<std::string> stream_identifier; | 229 RTCStatsMember<std::string> stream_identifier; |
| 222 RTCStatsMember<std::vector<std::string>> track_ids; | 230 RTCStatsMember<std::vector<std::string>> track_ids; |
| 223 }; | 231 }; |
| 224 | 232 |
| 225 // https://w3c.github.io/webrtc-stats/#mststats-dict* | 233 // https://w3c.github.io/webrtc-stats/#mststats-dict* |
| 226 // TODO(hbos): Tracking bug crbug.com/659137 | 234 // TODO(hbos): Tracking bug crbug.com/659137 |
| 227 class RTCMediaStreamTrackStats final : public RTCStats { | 235 class RTCMediaStreamTrackStats final : public RTCStats { |
| 228 public: | 236 public: |
| 229 WEBRTC_RTCSTATS_DECL(); | 237 WEBRTC_RTCSTATS_DECL(); |
| 230 | 238 |
| 231 RTCMediaStreamTrackStats(const std::string& id, int64_t timestamp_us); | 239 RTCMediaStreamTrackStats(const std::string& id, int64_t timestamp_us, |
| 232 RTCMediaStreamTrackStats(std::string&& id, int64_t timestamp_us); | 240 const char* kind); |
| 241 RTCMediaStreamTrackStats(std::string&& id, int64_t timestamp_us, | |
| 242 const char* kind); | |
| 233 RTCMediaStreamTrackStats(const RTCMediaStreamTrackStats& other); | 243 RTCMediaStreamTrackStats(const RTCMediaStreamTrackStats& other); |
| 234 ~RTCMediaStreamTrackStats() override; | 244 ~RTCMediaStreamTrackStats() override; |
| 235 | 245 |
| 236 RTCStatsMember<std::string> track_identifier; | 246 RTCStatsMember<std::string> track_identifier; |
| 237 RTCStatsMember<bool> remote_source; | 247 RTCStatsMember<bool> remote_source; |
| 238 RTCStatsMember<bool> ended; | 248 RTCStatsMember<bool> ended; |
| 239 // TODO(hbos): |RTCStatsCollector| does not return stats for detached tracks. | 249 // TODO(hbos): |RTCStatsCollector| does not return stats for detached tracks. |
| 240 // crbug.com/659137 | 250 // crbug.com/659137 |
| 241 RTCStatsMember<bool> detached; | 251 RTCStatsMember<bool> detached; |
| 252 // See |RTCMediaStreamTrackKind| for valid values. | |
| 253 RTCStatsMember<std::string> kind; | |
| 242 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | 254 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 |
| 243 RTCStatsMember<std::vector<std::string>> ssrc_ids; | 255 RTCStatsMember<std::vector<std::string>> ssrc_ids; |
| 244 // Video-only members | 256 // Video-only members |
| 245 RTCStatsMember<uint32_t> frame_width; | 257 RTCStatsMember<uint32_t> frame_width; |
| 246 RTCStatsMember<uint32_t> frame_height; | 258 RTCStatsMember<uint32_t> frame_height; |
| 247 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | 259 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 |
| 248 RTCStatsMember<double> frames_per_second; | 260 RTCStatsMember<double> frames_per_second; |
| 249 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | 261 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 |
| 250 RTCStatsMember<uint32_t> frames_sent; | 262 RTCStatsMember<uint32_t> frames_sent; |
| 251 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 | 263 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 396 RTCStatsMember<std::string> rtcp_transport_stats_id; | 408 RTCStatsMember<std::string> rtcp_transport_stats_id; |
| 397 RTCStatsMember<bool> active_connection; | 409 RTCStatsMember<bool> active_connection; |
| 398 RTCStatsMember<std::string> selected_candidate_pair_id; | 410 RTCStatsMember<std::string> selected_candidate_pair_id; |
| 399 RTCStatsMember<std::string> local_certificate_id; | 411 RTCStatsMember<std::string> local_certificate_id; |
| 400 RTCStatsMember<std::string> remote_certificate_id; | 412 RTCStatsMember<std::string> remote_certificate_id; |
| 401 }; | 413 }; |
| 402 | 414 |
| 403 } // namespace webrtc | 415 } // namespace webrtc |
| 404 | 416 |
| 405 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ | 417 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ |
| OLD | NEW |