| 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 17 matching lines...) Expand all Loading... |
| 28 const char* RTCIceCandidateType::kSrflx = "srflx"; | 28 const char* RTCIceCandidateType::kSrflx = "srflx"; |
| 29 const char* RTCIceCandidateType::kPrflx = "prflx"; | 29 const char* RTCIceCandidateType::kPrflx = "prflx"; |
| 30 const char* RTCIceCandidateType::kRelay = "relay"; | 30 const char* RTCIceCandidateType::kRelay = "relay"; |
| 31 | 31 |
| 32 const char* RTCDtlsTransportState::kNew = "new"; | 32 const char* RTCDtlsTransportState::kNew = "new"; |
| 33 const char* RTCDtlsTransportState::kConnecting = "connecting"; | 33 const char* RTCDtlsTransportState::kConnecting = "connecting"; |
| 34 const char* RTCDtlsTransportState::kConnected = "connected"; | 34 const char* RTCDtlsTransportState::kConnected = "connected"; |
| 35 const char* RTCDtlsTransportState::kClosed = "closed"; | 35 const char* RTCDtlsTransportState::kClosed = "closed"; |
| 36 const char* RTCDtlsTransportState::kFailed = "failed"; | 36 const char* RTCDtlsTransportState::kFailed = "failed"; |
| 37 | 37 |
| 38 const char* RTCMediaStreamTrackKind::kAudio = "audio"; |
| 39 const char* RTCMediaStreamTrackKind::kVideo = "video"; |
| 40 |
| 38 WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate", | 41 WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate", |
| 39 &fingerprint, | 42 &fingerprint, |
| 40 &fingerprint_algorithm, | 43 &fingerprint_algorithm, |
| 41 &base64_certificate, | 44 &base64_certificate, |
| 42 &issuer_certificate_id); | 45 &issuer_certificate_id); |
| 43 | 46 |
| 44 RTCCertificateStats::RTCCertificateStats( | 47 RTCCertificateStats::RTCCertificateStats( |
| 45 const std::string& id, int64_t timestamp_us) | 48 const std::string& id, int64_t timestamp_us) |
| 46 : RTCCertificateStats(std::string(id), timestamp_us) { | 49 : RTCCertificateStats(std::string(id), timestamp_us) { |
| 47 } | 50 } |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 } | 346 } |
| 344 | 347 |
| 345 RTCMediaStreamStats::~RTCMediaStreamStats() { | 348 RTCMediaStreamStats::~RTCMediaStreamStats() { |
| 346 } | 349 } |
| 347 | 350 |
| 348 WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track", | 351 WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track", |
| 349 &track_identifier, | 352 &track_identifier, |
| 350 &remote_source, | 353 &remote_source, |
| 351 &ended, | 354 &ended, |
| 352 &detached, | 355 &detached, |
| 356 &kind, |
| 353 &frame_width, | 357 &frame_width, |
| 354 &frame_height, | 358 &frame_height, |
| 355 &frames_per_second, | 359 &frames_per_second, |
| 356 &frames_sent, | 360 &frames_sent, |
| 357 &frames_received, | 361 &frames_received, |
| 358 &frames_decoded, | 362 &frames_decoded, |
| 359 &frames_dropped, | 363 &frames_dropped, |
| 360 &frames_corrupted, | 364 &frames_corrupted, |
| 361 &partial_frames_lost, | 365 &partial_frames_lost, |
| 362 &full_frames_lost, | 366 &full_frames_lost, |
| 363 &audio_level, | 367 &audio_level, |
| 364 &echo_return_loss, | 368 &echo_return_loss, |
| 365 &echo_return_loss_enhancement); | 369 &echo_return_loss_enhancement); |
| 366 | 370 |
| 367 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( | 371 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( |
| 368 const std::string& id, int64_t timestamp_us) | 372 const std::string& id, int64_t timestamp_us, const char* kind) |
| 369 : RTCMediaStreamTrackStats(std::string(id), timestamp_us) { | 373 : RTCMediaStreamTrackStats(std::string(id), timestamp_us, kind) { |
| 370 } | 374 } |
| 371 | 375 |
| 372 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( | 376 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( |
| 373 std::string&& id, int64_t timestamp_us) | 377 std::string&& id, int64_t timestamp_us, const char* kind) |
| 374 : RTCStats(std::move(id), timestamp_us), | 378 : RTCStats(std::move(id), timestamp_us), |
| 375 track_identifier("trackIdentifier"), | 379 track_identifier("trackIdentifier"), |
| 376 remote_source("remoteSource"), | 380 remote_source("remoteSource"), |
| 377 ended("ended"), | 381 ended("ended"), |
| 378 detached("detached"), | 382 detached("detached"), |
| 383 kind("kind", kind), |
| 379 frame_width("frameWidth"), | 384 frame_width("frameWidth"), |
| 380 frame_height("frameHeight"), | 385 frame_height("frameHeight"), |
| 381 frames_per_second("framesPerSecond"), | 386 frames_per_second("framesPerSecond"), |
| 382 frames_sent("framesSent"), | 387 frames_sent("framesSent"), |
| 383 frames_received("framesReceived"), | 388 frames_received("framesReceived"), |
| 384 frames_decoded("framesDecoded"), | 389 frames_decoded("framesDecoded"), |
| 385 frames_dropped("framesDropped"), | 390 frames_dropped("framesDropped"), |
| 386 frames_corrupted("framesCorrupted"), | 391 frames_corrupted("framesCorrupted"), |
| 387 partial_frames_lost("partialFramesLost"), | 392 partial_frames_lost("partialFramesLost"), |
| 388 full_frames_lost("fullFramesLost"), | 393 full_frames_lost("fullFramesLost"), |
| 389 audio_level("audioLevel"), | 394 audio_level("audioLevel"), |
| 390 echo_return_loss("echoReturnLoss"), | 395 echo_return_loss("echoReturnLoss"), |
| 391 echo_return_loss_enhancement("echoReturnLossEnhancement") { | 396 echo_return_loss_enhancement("echoReturnLossEnhancement") { |
| 397 RTC_DCHECK(kind == RTCMediaStreamTrackKind::kAudio || |
| 398 kind == RTCMediaStreamTrackKind::kVideo); |
| 392 } | 399 } |
| 393 | 400 |
| 394 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( | 401 RTCMediaStreamTrackStats::RTCMediaStreamTrackStats( |
| 395 const RTCMediaStreamTrackStats& other) | 402 const RTCMediaStreamTrackStats& other) |
| 396 : RTCStats(other.id(), other.timestamp_us()), | 403 : RTCStats(other.id(), other.timestamp_us()), |
| 397 track_identifier(other.track_identifier), | 404 track_identifier(other.track_identifier), |
| 398 remote_source(other.remote_source), | 405 remote_source(other.remote_source), |
| 399 ended(other.ended), | 406 ended(other.ended), |
| 400 detached(other.detached), | 407 detached(other.detached), |
| 408 kind(other.kind), |
| 401 frame_width(other.frame_width), | 409 frame_width(other.frame_width), |
| 402 frame_height(other.frame_height), | 410 frame_height(other.frame_height), |
| 403 frames_per_second(other.frames_per_second), | 411 frames_per_second(other.frames_per_second), |
| 404 frames_sent(other.frames_sent), | 412 frames_sent(other.frames_sent), |
| 405 frames_received(other.frames_received), | 413 frames_received(other.frames_received), |
| 406 frames_decoded(other.frames_decoded), | 414 frames_decoded(other.frames_decoded), |
| 407 frames_dropped(other.frames_dropped), | 415 frames_dropped(other.frames_dropped), |
| 408 frames_corrupted(other.frames_corrupted), | 416 frames_corrupted(other.frames_corrupted), |
| 409 partial_frames_lost(other.partial_frames_lost), | 417 partial_frames_lost(other.partial_frames_lost), |
| 410 full_frames_lost(other.full_frames_lost), | 418 full_frames_lost(other.full_frames_lost), |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 dtls_state(other.dtls_state), | 646 dtls_state(other.dtls_state), |
| 639 selected_candidate_pair_id(other.selected_candidate_pair_id), | 647 selected_candidate_pair_id(other.selected_candidate_pair_id), |
| 640 local_certificate_id(other.local_certificate_id), | 648 local_certificate_id(other.local_certificate_id), |
| 641 remote_certificate_id(other.remote_certificate_id) { | 649 remote_certificate_id(other.remote_certificate_id) { |
| 642 } | 650 } |
| 643 | 651 |
| 644 RTCTransportStats::~RTCTransportStats() { | 652 RTCTransportStats::~RTCTransportStats() { |
| 645 } | 653 } |
| 646 | 654 |
| 647 } // namespace webrtc | 655 } // namespace webrtc |
| OLD | NEW |