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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
260 | 260 |
261 RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats( | 261 RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats( |
262 std::string&& id, int64_t timestamp_us) | 262 std::string&& id, int64_t timestamp_us) |
263 : RTCIceCandidateStats(std::move(id), timestamp_us) { | 263 : RTCIceCandidateStats(std::move(id), timestamp_us) { |
264 } | 264 } |
265 | 265 |
266 const char* RTCRemoteIceCandidateStats::type() const { | 266 const char* RTCRemoteIceCandidateStats::type() const { |
267 return kType; | 267 return kType; |
268 } | 268 } |
269 | 269 |
270 // TODO(hbos): According to spec this should be "track", but there isn't any | |
271 // string for RTCMediaStreamTrackStats. Shouldn't that be "track"? Calling this | |
272 // "stream" instead. crbug.com/660827, crbug.com/659137 | |
hta-webrtc
2016/11/03 14:34:22
Spec bug. Will fix.
hbos
2016/11/03 18:10:31
Acknowledged.
| |
273 WEBRTC_RTCSTATS_IMPL(RTCMediaStreamStats, RTCStats, "stream", | |
274 &stream_identifier, | |
275 &track_ids); | |
276 | |
277 RTCMediaStreamStats::RTCMediaStreamStats( | |
278 const std::string& id, int64_t timestamp_us) | |
279 : RTCMediaStreamStats(std::string(id), timestamp_us) { | |
280 } | |
281 | |
282 RTCMediaStreamStats::RTCMediaStreamStats( | |
283 std::string&& id, int64_t timestamp_us) | |
284 : RTCStats(std::move(id), timestamp_us), | |
285 stream_identifier("streamIdentifier"), | |
286 track_ids("trackIds") { | |
287 } | |
288 | |
289 RTCMediaStreamStats::RTCMediaStreamStats( | |
290 const RTCMediaStreamStats& other) | |
291 : RTCStats(other.id(), other.timestamp_us()), | |
292 stream_identifier(other.stream_identifier), | |
293 track_ids(other.track_ids) { | |
294 } | |
295 | |
296 RTCMediaStreamStats::~RTCMediaStreamStats() { | |
297 } | |
298 | |
299 // TODO(hbos): The spec doesn't have a label for this stat, using "track" but | |
300 // there is a risk that "track" should be used for RTCMediaStreamStats instead. | |
301 // crbug.com/659137, crbug.com/660827 | |
hta-webrtc
2016/11/03 14:34:22
https://github.com/w3c/webrtc-stats/issues/80
hbos
2016/11/03 18:10:30
Acknowledged.
| |
302 WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track", | |
303 &track_identifier, | |
304 &remote_source, | |
305 &ended, | |
306 &detached, | |
307 &ssrc_ids, | |
308 &frame_width, | |
309 &frame_height, | |
310 &frames_per_second, | |
311 &frames_sent, | |
312 &frames_received, | |
313 &frames_decoded, | |
314 &frames_dropped, | |
315 &frames_corrupted, | |
316 &partial_frames_lost, | |
317 &full_frames_lost, | |
318 &audio_level, | |
319 &echo_return_loss, | |
320 &echo_return_loss_enhancement); | |
321 | |
322 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( | |
323 const std::string& id, int64_t timestamp_us) | |
324 : RTCMediaStreamTrackStats(std::string(id), timestamp_us) { | |
325 } | |
326 | |
327 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( | |
328 std::string&& id, int64_t timestamp_us) | |
329 : RTCStats(std::move(id), timestamp_us), | |
330 track_identifier("trackIdentifier"), | |
331 remote_source("remoteSource"), | |
332 ended("ended"), | |
333 detached("detached"), | |
334 ssrc_ids("ssrcIds"), | |
335 frame_width("frameWidth"), | |
336 frame_height("frameHeight"), | |
337 frames_per_second("framesPerSecond"), | |
338 frames_sent("framesSent"), | |
339 frames_received("framesReceived"), | |
340 frames_decoded("framesDecoded"), | |
341 frames_dropped("framesDropped"), | |
342 frames_corrupted("framesCorrupted"), | |
343 partial_frames_lost("partialFramesLost"), | |
344 full_frames_lost("fullFramesLost"), | |
345 audio_level("audioLevel"), | |
346 echo_return_loss("echoReturnLoss"), | |
347 echo_return_loss_enhancement("echoReturnLossEnhancement") { | |
348 } | |
349 | |
350 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( | |
351 const RTCMediaStreamTrackStats& other) | |
352 : RTCStats(other.id(), other.timestamp_us()), | |
353 track_identifier(other.track_identifier), | |
354 remote_source(other.remote_source), | |
355 ended(other.ended), | |
356 detached(other.detached), | |
357 ssrc_ids(other.ssrc_ids), | |
358 frame_width(other.frame_width), | |
359 frame_height(other.frame_height), | |
360 frames_per_second(other.frames_per_second), | |
361 frames_sent(other.frames_sent), | |
362 frames_received(other.frames_received), | |
363 frames_decoded(other.frames_decoded), | |
364 frames_dropped(other.frames_dropped), | |
365 frames_corrupted(other.frames_corrupted), | |
366 partial_frames_lost(other.partial_frames_lost), | |
367 full_frames_lost(other.full_frames_lost), | |
368 audio_level(other.audio_level), | |
369 echo_return_loss(other.echo_return_loss), | |
370 echo_return_loss_enhancement(other.echo_return_loss_enhancement) { | |
371 } | |
372 | |
373 RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() { | |
374 } | |
375 | |
270 WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection", | 376 WEBRTC_RTCSTATS_IMPL(RTCPeerConnectionStats, RTCStats, "peer-connection", |
271 &data_channels_opened, | 377 &data_channels_opened, |
272 &data_channels_closed); | 378 &data_channels_closed); |
273 | 379 |
274 RTCPeerConnectionStats::RTCPeerConnectionStats( | 380 RTCPeerConnectionStats::RTCPeerConnectionStats( |
275 const std::string& id, int64_t timestamp_us) | 381 const std::string& id, int64_t timestamp_us) |
276 : RTCPeerConnectionStats(std::string(id), timestamp_us) { | 382 : RTCPeerConnectionStats(std::string(id), timestamp_us) { |
277 } | 383 } |
278 | 384 |
279 RTCPeerConnectionStats::RTCPeerConnectionStats( | 385 RTCPeerConnectionStats::RTCPeerConnectionStats( |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 active_connection(other.active_connection), | 586 active_connection(other.active_connection), |
481 selected_candidate_pair_id(other.selected_candidate_pair_id), | 587 selected_candidate_pair_id(other.selected_candidate_pair_id), |
482 local_certificate_id(other.local_certificate_id), | 588 local_certificate_id(other.local_certificate_id), |
483 remote_certificate_id(other.remote_certificate_id) { | 589 remote_certificate_id(other.remote_certificate_id) { |
484 } | 590 } |
485 | 591 |
486 RTCTransportStats::~RTCTransportStats() { | 592 RTCTransportStats::~RTCTransportStats() { |
487 } | 593 } |
488 | 594 |
489 } // namespace webrtc | 595 } // namespace webrtc |
OLD | NEW |