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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 nack_length = size - start_id; | 734 nack_length = size - start_id; |
735 } | 735 } |
736 | 736 |
737 // Our RTCP NACK implementation is limited to kRtcpMaxNackFields sequence | 737 // Our RTCP NACK implementation is limited to kRtcpMaxNackFields sequence |
738 // numbers per RTCP packet. | 738 // numbers per RTCP packet. |
739 if (nack_length > kRtcpMaxNackFields) { | 739 if (nack_length > kRtcpMaxNackFields) { |
740 nack_length = kRtcpMaxNackFields; | 740 nack_length = kRtcpMaxNackFields; |
741 } | 741 } |
742 nack_last_seq_number_sent_ = nack_list[start_id + nack_length - 1]; | 742 nack_last_seq_number_sent_ = nack_list[start_id + nack_length - 1]; |
743 | 743 |
744 return rtcp_sender_.SendRTCP( | 744 return rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpNack, nack_length, |
745 GetFeedbackState(), kRtcpNack, nack_length, &nack_list[start_id]); | 745 &nack_list[start_id]); |
| 746 } |
| 747 |
| 748 void ModuleRtpRtcpImpl::SendNack( |
| 749 const std::vector<uint16_t>& sequence_numbers) { |
| 750 rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpNack, sequence_numbers.size(), |
| 751 sequence_numbers.data()); |
746 } | 752 } |
747 | 753 |
748 bool ModuleRtpRtcpImpl::TimeToSendFullNackList(int64_t now) const { | 754 bool ModuleRtpRtcpImpl::TimeToSendFullNackList(int64_t now) const { |
749 // Use RTT from RtcpRttStats class if provided. | 755 // Use RTT from RtcpRttStats class if provided. |
750 int64_t rtt = rtt_ms(); | 756 int64_t rtt = rtt_ms(); |
751 if (rtt == 0) { | 757 if (rtt == 0) { |
752 rtcp_receiver_.RTT(rtcp_receiver_.RemoteSSRC(), NULL, &rtt, NULL, NULL); | 758 rtcp_receiver_.RTT(rtcp_receiver_.RemoteSSRC(), NULL, &rtt, NULL, NULL); |
753 } | 759 } |
754 | 760 |
755 const int64_t kStartUpRttMs = 100; | 761 const int64_t kStartUpRttMs = 100; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( | 997 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( |
992 StreamDataCountersCallback* callback) { | 998 StreamDataCountersCallback* callback) { |
993 rtp_sender_.RegisterRtpStatisticsCallback(callback); | 999 rtp_sender_.RegisterRtpStatisticsCallback(callback); |
994 } | 1000 } |
995 | 1001 |
996 StreamDataCountersCallback* | 1002 StreamDataCountersCallback* |
997 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 1003 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
998 return rtp_sender_.GetRtpStatisticsCallback(); | 1004 return rtp_sender_.GetRtpStatisticsCallback(); |
999 } | 1005 } |
1000 } // namespace webrtc | 1006 } // namespace webrtc |
OLD | NEW |