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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // Make sure we have a valid RTT before setting. | 204 // Make sure we have a valid RTT before setting. |
205 int64_t last_rtt = rtt_stats_->LastProcessedRtt(); | 205 int64_t last_rtt = rtt_stats_->LastProcessedRtt(); |
206 if (last_rtt >= 0) | 206 if (last_rtt >= 0) |
207 set_rtt_ms(last_rtt); | 207 set_rtt_ms(last_rtt); |
208 } | 208 } |
209 } | 209 } |
210 | 210 |
211 if (rtcp_sender_.TimeToSendRTCPReport()) | 211 if (rtcp_sender_.TimeToSendRTCPReport()) |
212 rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpReport); | 212 rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpReport); |
213 | 213 |
214 if (UpdateRTCPReceiveInformationTimers()) { | 214 if (TMMBR() && rtcp_receiver_.UpdateRTCPReceiveInformationTimers()) { |
215 // A receiver has timed out. | 215 // A receiver has timed out. |
216 rtcp_receiver_.UpdateTmmbr(); | 216 rtcp_receiver_.UpdateTmmbr(); |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 void ModuleRtpRtcpImpl::SetRtxSendStatus(int mode) { | 220 void ModuleRtpRtcpImpl::SetRtxSendStatus(int mode) { |
221 rtp_sender_.SetRtxStatus(mode); | 221 rtp_sender_.SetRtxStatus(mode); |
222 } | 222 } |
223 | 223 |
224 int ModuleRtpRtcpImpl::RtxSendStatus() const { | 224 int ModuleRtpRtcpImpl::RtxSendStatus() const { |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 rtcp_arrival_time_secs, | 860 rtcp_arrival_time_secs, |
861 rtcp_arrival_time_frac, | 861 rtcp_arrival_time_frac, |
862 NULL)) { | 862 NULL)) { |
863 return false; | 863 return false; |
864 } | 864 } |
865 *remote_sr = | 865 *remote_sr = |
866 ((ntp_secs & 0x0000ffff) << 16) + ((ntp_frac & 0xffff0000) >> 16); | 866 ((ntp_secs & 0x0000ffff) << 16) + ((ntp_frac & 0xffff0000) >> 16); |
867 return true; | 867 return true; |
868 } | 868 } |
869 | 869 |
870 bool ModuleRtpRtcpImpl::UpdateRTCPReceiveInformationTimers() { | |
871 // If this returns true this channel has timed out. | |
872 // Periodically check if this is true and if so call UpdateTMMBR. | |
873 return rtcp_receiver_.UpdateRTCPReceiveInformationTimers(); | |
874 } | |
875 | |
876 // Called from RTCPsender. | 870 // Called from RTCPsender. |
877 std::vector<rtcp::TmmbItem> ModuleRtpRtcpImpl::BoundingSet(bool* tmmbr_owner) { | 871 std::vector<rtcp::TmmbItem> ModuleRtpRtcpImpl::BoundingSet(bool* tmmbr_owner) { |
878 return rtcp_receiver_.BoundingSet(tmmbr_owner); | 872 return rtcp_receiver_.BoundingSet(tmmbr_owner); |
879 } | 873 } |
880 | 874 |
881 int64_t ModuleRtpRtcpImpl::RtcpReportInterval() { | 875 int64_t ModuleRtpRtcpImpl::RtcpReportInterval() { |
882 if (audio_) | 876 if (audio_) |
883 return RTCP_INTERVAL_AUDIO_MS; | 877 return RTCP_INTERVAL_AUDIO_MS; |
884 else | 878 else |
885 return RTCP_INTERVAL_VIDEO_MS; | 879 return RTCP_INTERVAL_VIDEO_MS; |
(...skipping 25 matching lines...) Expand all Loading... |
911 StreamDataCountersCallback* | 905 StreamDataCountersCallback* |
912 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 906 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
913 return rtp_sender_.GetRtpStatisticsCallback(); | 907 return rtp_sender_.GetRtpStatisticsCallback(); |
914 } | 908 } |
915 | 909 |
916 void ModuleRtpRtcpImpl::SetVideoBitrateAllocation( | 910 void ModuleRtpRtcpImpl::SetVideoBitrateAllocation( |
917 const BitrateAllocation& bitrate) { | 911 const BitrateAllocation& bitrate) { |
918 rtcp_sender_.SetVideoBitrateAllocation(bitrate); | 912 rtcp_sender_.SetVideoBitrateAllocation(bitrate); |
919 } | 913 } |
920 } // namespace webrtc | 914 } // namespace webrtc |
OLD | NEW |