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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // Process RTT if we have received a receiver report and we haven't | 180 // Process RTT if we have received a receiver report and we haven't |
181 // processed RTT for at least |kRtpRtcpRttProcessTimeMs| milliseconds. | 181 // processed RTT for at least |kRtpRtcpRttProcessTimeMs| milliseconds. |
182 if (rtcp_receiver_.LastReceivedReceiverReport() > | 182 if (rtcp_receiver_.LastReceivedReceiverReport() > |
183 last_rtt_process_time_ && process_rtt) { | 183 last_rtt_process_time_ && process_rtt) { |
184 std::vector<RTCPReportBlock> receive_blocks; | 184 std::vector<RTCPReportBlock> receive_blocks; |
185 rtcp_receiver_.StatisticsReceived(&receive_blocks); | 185 rtcp_receiver_.StatisticsReceived(&receive_blocks); |
186 int64_t max_rtt = 0; | 186 int64_t max_rtt = 0; |
187 for (std::vector<RTCPReportBlock>::iterator it = receive_blocks.begin(); | 187 for (std::vector<RTCPReportBlock>::iterator it = receive_blocks.begin(); |
188 it != receive_blocks.end(); ++it) { | 188 it != receive_blocks.end(); ++it) { |
189 int64_t rtt = 0; | 189 int64_t rtt = 0; |
190 rtcp_receiver_.RTT(it->remoteSSRC, &rtt, NULL, NULL, NULL); | 190 rtcp_receiver_.RTT(it->sender_ssrc, &rtt, NULL, NULL, NULL); |
191 max_rtt = (rtt > max_rtt) ? rtt : max_rtt; | 191 max_rtt = (rtt > max_rtt) ? rtt : max_rtt; |
192 } | 192 } |
193 // Report the rtt. | 193 // Report the rtt. |
194 if (rtt_stats_ && max_rtt != 0) | 194 if (rtt_stats_ && max_rtt != 0) |
195 rtt_stats_->OnRttUpdate(max_rtt); | 195 rtt_stats_->OnRttUpdate(max_rtt); |
196 } | 196 } |
197 | 197 |
198 // Verify receiver reports are delivered and the reported sequence number | 198 // Verify receiver reports are delivered and the reported sequence number |
199 // is increasing. | 199 // is increasing. |
200 int64_t rtcp_interval = RtcpReportInterval(); | 200 int64_t rtcp_interval = RtcpReportInterval(); |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 StreamDataCountersCallback* | 911 StreamDataCountersCallback* |
912 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 912 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
913 return rtp_sender_->GetRtpStatisticsCallback(); | 913 return rtp_sender_->GetRtpStatisticsCallback(); |
914 } | 914 } |
915 | 915 |
916 void ModuleRtpRtcpImpl::SetVideoBitrateAllocation( | 916 void ModuleRtpRtcpImpl::SetVideoBitrateAllocation( |
917 const BitrateAllocation& bitrate) { | 917 const BitrateAllocation& bitrate) { |
918 rtcp_sender_.SetVideoBitrateAllocation(bitrate); | 918 rtcp_sender_.SetVideoBitrateAllocation(bitrate); |
919 } | 919 } |
920 } // namespace webrtc | 920 } // namespace webrtc |
OLD | NEW |