| 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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 static_cast<uint64_t>(info.sent_total_bytes); | 631 static_cast<uint64_t>(info.sent_total_bytes); |
| 632 candidate_pair_stats->bytes_received = | 632 candidate_pair_stats->bytes_received = |
| 633 static_cast<uint64_t>(info.recv_total_bytes); | 633 static_cast<uint64_t>(info.recv_total_bytes); |
| 634 // TODO(hbos): The |info.rtt| measurement is smoothed. It shouldn't be | 634 // TODO(hbos): The |info.rtt| measurement is smoothed. It shouldn't be |
| 635 // smoothed according to the spec. crbug.com/633550. See | 635 // smoothed according to the spec. crbug.com/633550. See |
| 636 // https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-curr
entrtt | 636 // https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-curr
entrtt |
| 637 candidate_pair_stats->current_rtt = | 637 candidate_pair_stats->current_rtt = |
| 638 static_cast<double>(info.rtt) / rtc::kNumMillisecsPerSec; | 638 static_cast<double>(info.rtt) / rtc::kNumMillisecsPerSec; |
| 639 candidate_pair_stats->requests_received = | 639 candidate_pair_stats->requests_received = |
| 640 static_cast<uint64_t>(info.recv_ping_requests); | 640 static_cast<uint64_t>(info.recv_ping_requests); |
| 641 candidate_pair_stats->requests_sent = | 641 candidate_pair_stats->requests_sent = static_cast<uint64_t>( |
| 642 static_cast<uint64_t>(info.sent_ping_requests_total); | 642 info.sent_ping_requests_before_first_response); |
| 643 candidate_pair_stats->responses_received = | 643 candidate_pair_stats->responses_received = |
| 644 static_cast<uint64_t>(info.recv_ping_responses); | 644 static_cast<uint64_t>(info.recv_ping_responses); |
| 645 candidate_pair_stats->responses_sent = | 645 candidate_pair_stats->responses_sent = |
| 646 static_cast<uint64_t>(info.sent_ping_responses); | 646 static_cast<uint64_t>(info.sent_ping_responses); |
| 647 RTC_DCHECK_GE(info.sent_ping_requests_total, |
| 648 info.sent_ping_requests_before_first_response); |
| 649 candidate_pair_stats->consent_requests_sent = static_cast<uint64_t>( |
| 650 info.sent_ping_requests_total - |
| 651 info.sent_ping_requests_before_first_response); |
| 647 | 652 |
| 648 report->AddStats(std::move(candidate_pair_stats)); | 653 report->AddStats(std::move(candidate_pair_stats)); |
| 649 } | 654 } |
| 650 } | 655 } |
| 651 } | 656 } |
| 652 } | 657 } |
| 653 | 658 |
| 654 void RTCStatsCollector::ProduceMediaStreamAndTrackStats_s( | 659 void RTCStatsCollector::ProduceMediaStreamAndTrackStats_s( |
| 655 int64_t timestamp_us, RTCStatsReport* report) const { | 660 int64_t timestamp_us, RTCStatsReport* report) const { |
| 656 RTC_DCHECK(signaling_thread_->IsCurrent()); | 661 RTC_DCHECK(signaling_thread_->IsCurrent()); |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 const std::string& type) { | 922 const std::string& type) { |
| 918 return CandidateTypeToRTCIceCandidateType(type); | 923 return CandidateTypeToRTCIceCandidateType(type); |
| 919 } | 924 } |
| 920 | 925 |
| 921 const char* DataStateToRTCDataChannelStateForTesting( | 926 const char* DataStateToRTCDataChannelStateForTesting( |
| 922 DataChannelInterface::DataState state) { | 927 DataChannelInterface::DataState state) { |
| 923 return DataStateToRTCDataChannelState(state); | 928 return DataStateToRTCDataChannelState(state); |
| 924 } | 929 } |
| 925 | 930 |
| 926 } // namespace webrtc | 931 } // namespace webrtc |
| OLD | NEW |