| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2845 } | 2845 } |
| 2846 | 2846 |
| 2847 int Channel::GetRTPStatistics(CallStatistics& stats) { | 2847 int Channel::GetRTPStatistics(CallStatistics& stats) { |
| 2848 // --- RtcpStatistics | 2848 // --- RtcpStatistics |
| 2849 | 2849 |
| 2850 // The jitter statistics is updated for each received RTP packet and is | 2850 // The jitter statistics is updated for each received RTP packet and is |
| 2851 // based on received packets. | 2851 // based on received packets. |
| 2852 RtcpStatistics statistics; | 2852 RtcpStatistics statistics; |
| 2853 StreamStatistician* statistician = | 2853 StreamStatistician* statistician = |
| 2854 rtp_receive_statistics_->GetStatistician(rtp_receiver_->SSRC()); | 2854 rtp_receive_statistics_->GetStatistician(rtp_receiver_->SSRC()); |
| 2855 if (!statistician || | 2855 if (statistician) { |
| 2856 !statistician->GetStatistics(&statistics, | 2856 statistician->GetStatistics(&statistics, |
| 2857 _rtpRtcpModule->RTCP() == RtcpMode::kOff)) { | 2857 _rtpRtcpModule->RTCP() == RtcpMode::kOff); |
| 2858 _engineStatisticsPtr->SetLastError( | |
| 2859 VE_CANNOT_RETRIEVE_RTP_STAT, kTraceWarning, | |
| 2860 "GetRTPStatistics() failed to read RTP statistics from the " | |
| 2861 "RTP/RTCP module"); | |
| 2862 } | 2858 } |
| 2863 | 2859 |
| 2864 stats.fractionLost = statistics.fraction_lost; | 2860 stats.fractionLost = statistics.fraction_lost; |
| 2865 stats.cumulativeLost = statistics.cumulative_lost; | 2861 stats.cumulativeLost = statistics.cumulative_lost; |
| 2866 stats.extendedMax = statistics.extended_max_sequence_number; | 2862 stats.extendedMax = statistics.extended_max_sequence_number; |
| 2867 stats.jitterSamples = statistics.jitter; | 2863 stats.jitterSamples = statistics.jitter; |
| 2868 | 2864 |
| 2869 // --- RTT | 2865 // --- RTT |
| 2870 stats.rttMs = GetRTT(true); | 2866 stats.rttMs = GetRTT(true); |
| 2871 | 2867 |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3654 int64_t min_rtt = 0; | 3650 int64_t min_rtt = 0; |
| 3655 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != | 3651 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != |
| 3656 0) { | 3652 0) { |
| 3657 return 0; | 3653 return 0; |
| 3658 } | 3654 } |
| 3659 return rtt; | 3655 return rtt; |
| 3660 } | 3656 } |
| 3661 | 3657 |
| 3662 } // namespace voe | 3658 } // namespace voe |
| 3663 } // namespace webrtc | 3659 } // namespace webrtc |
| OLD | NEW |