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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } | 179 } |
180 } | 180 } |
181 | 181 |
182 // Get processed rtt. | 182 // Get processed rtt. |
183 if (process_rtt) { | 183 if (process_rtt) { |
184 last_rtt_process_time_ = now; | 184 last_rtt_process_time_ = now; |
185 if (rtt_stats_) | 185 if (rtt_stats_) |
186 set_rtt_ms(rtt_stats_->LastProcessedRtt()); | 186 set_rtt_ms(rtt_stats_->LastProcessedRtt()); |
187 } | 187 } |
188 | 188 |
189 // For sending streams, make sure to not send a SR before media has been sent. | 189 if (rtcp_sender_.TimeToSendRTCPReport()) |
190 if (rtcp_sender_.TimeToSendRTCPReport()) { | 190 rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpReport); |
191 RTCPSender::FeedbackState state = GetFeedbackState(); | |
192 // Prevent sending streams to send SR before any media has been sent. | |
193 if (!rtcp_sender_.Sending() || state.packets_sent > 0) | |
194 rtcp_sender_.SendRTCP(state, kRtcpReport); | |
195 } | |
196 | 191 |
197 if (UpdateRTCPReceiveInformationTimers()) { | 192 if (UpdateRTCPReceiveInformationTimers()) { |
198 // A receiver has timed out | 193 // A receiver has timed out |
199 rtcp_receiver_.UpdateTMMBR(); | 194 rtcp_receiver_.UpdateTMMBR(); |
200 } | 195 } |
201 return 0; | 196 return 0; |
202 } | 197 } |
203 | 198 |
204 void ModuleRtpRtcpImpl::SetRtxSendStatus(int mode) { | 199 void ModuleRtpRtcpImpl::SetRtxSendStatus(int mode) { |
205 rtp_sender_.SetRtxStatus(mode); | 200 rtp_sender_.SetRtxStatus(mode); |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( | 988 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( |
994 StreamDataCountersCallback* callback) { | 989 StreamDataCountersCallback* callback) { |
995 rtp_sender_.RegisterRtpStatisticsCallback(callback); | 990 rtp_sender_.RegisterRtpStatisticsCallback(callback); |
996 } | 991 } |
997 | 992 |
998 StreamDataCountersCallback* | 993 StreamDataCountersCallback* |
999 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 994 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
1000 return rtp_sender_.GetRtpStatisticsCallback(); | 995 return rtp_sender_.GetRtpStatisticsCallback(); |
1001 } | 996 } |
1002 } // namespace webrtc | 997 } // namespace webrtc |
OLD | NEW |