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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 if (process_rtt) { | 200 if (process_rtt) { |
201 last_rtt_process_time_ = now; | 201 last_rtt_process_time_ = now; |
202 if (rtt_stats_) { | 202 if (rtt_stats_) { |
203 // Make sure we have a valid RTT before setting. | 203 // Make sure we have a valid RTT before setting. |
204 int64_t last_rtt = rtt_stats_->LastProcessedRtt(); | 204 int64_t last_rtt = rtt_stats_->LastProcessedRtt(); |
205 if (last_rtt >= 0) | 205 if (last_rtt >= 0) |
206 set_rtt_ms(last_rtt); | 206 set_rtt_ms(last_rtt); |
207 } | 207 } |
208 } | 208 } |
209 | 209 |
210 // For sending streams, make sure to not send a SR before media has been sent. | 210 if (rtcp_sender_.TimeToSendRTCPReport()) |
211 if (rtcp_sender_.TimeToSendRTCPReport()) { | 211 rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpReport); |
212 RTCPSender::FeedbackState state = GetFeedbackState(); | |
213 // Prevent sending streams to send SR before any media has been sent. | |
214 if (!rtcp_sender_.Sending() || state.packets_sent > 0) | |
215 rtcp_sender_.SendRTCP(state, kRtcpReport); | |
216 } | |
217 | 212 |
218 if (UpdateRTCPReceiveInformationTimers()) { | 213 if (UpdateRTCPReceiveInformationTimers()) { |
219 // A receiver has timed out | 214 // A receiver has timed out |
220 rtcp_receiver_.UpdateTMMBR(); | 215 rtcp_receiver_.UpdateTMMBR(); |
221 } | 216 } |
222 } | 217 } |
223 | 218 |
224 void ModuleRtpRtcpImpl::SetRtxSendStatus(int mode) { | 219 void ModuleRtpRtcpImpl::SetRtxSendStatus(int mode) { |
225 rtp_sender_.SetRtxStatus(mode); | 220 rtp_sender_.SetRtxStatus(mode); |
226 } | 221 } |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( | 989 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( |
995 StreamDataCountersCallback* callback) { | 990 StreamDataCountersCallback* callback) { |
996 rtp_sender_.RegisterRtpStatisticsCallback(callback); | 991 rtp_sender_.RegisterRtpStatisticsCallback(callback); |
997 } | 992 } |
998 | 993 |
999 StreamDataCountersCallback* | 994 StreamDataCountersCallback* |
1000 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 995 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
1001 return rtp_sender_.GetRtpStatisticsCallback(); | 996 return rtp_sender_.GetRtpStatisticsCallback(); |
1002 } | 997 } |
1003 } // namespace webrtc | 998 } // namespace webrtc |
OLD | NEW |