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