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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 return video_->SelectiveRetransmissions(); | 714 return video_->SelectiveRetransmissions(); |
715 } | 715 } |
716 | 716 |
717 int RTPSender::SetSelectiveRetransmissions(uint8_t settings) { | 717 int RTPSender::SetSelectiveRetransmissions(uint8_t settings) { |
718 if (!video_) | 718 if (!video_) |
719 return -1; | 719 return -1; |
720 video_->SetSelectiveRetransmissions(settings); | 720 video_->SetSelectiveRetransmissions(settings); |
721 return 0; | 721 return 0; |
722 } | 722 } |
723 | 723 |
724 void RTPSender::OnReceivedNACK(const std::list<uint16_t>& nack_sequence_numbers, | 724 void RTPSender::OnReceivedNack( |
725 int64_t avg_rtt) { | 725 const std::vector<uint16_t>& nack_sequence_numbers, |
| 726 int64_t avg_rtt) { |
726 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), | 727 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), |
727 "RTPSender::OnReceivedNACK", "num_seqnum", | 728 "RTPSender::OnReceivedNACK", "num_seqnum", |
728 nack_sequence_numbers.size(), "avg_rtt", avg_rtt); | 729 nack_sequence_numbers.size(), "avg_rtt", avg_rtt); |
729 for (uint16_t seq_no : nack_sequence_numbers) { | 730 for (uint16_t seq_no : nack_sequence_numbers) { |
730 const int32_t bytes_sent = ReSendPacket(seq_no, 5 + avg_rtt); | 731 const int32_t bytes_sent = ReSendPacket(seq_no, 5 + avg_rtt); |
731 if (bytes_sent < 0) { | 732 if (bytes_sent < 0) { |
732 // Failed to send one Sequence number. Give up the rest in this nack. | 733 // Failed to send one Sequence number. Give up the rest in this nack. |
733 LOG(LS_WARNING) << "Failed resending RTP packet " << seq_no | 734 LOG(LS_WARNING) << "Failed resending RTP packet " << seq_no |
734 << ", Discard rest of packets"; | 735 << ", Discard rest of packets"; |
735 break; | 736 break; |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1720 rtc::CritScope lock(&send_critsect_); | 1721 rtc::CritScope lock(&send_critsect_); |
1721 | 1722 |
1722 RtpState state; | 1723 RtpState state; |
1723 state.sequence_number = sequence_number_rtx_; | 1724 state.sequence_number = sequence_number_rtx_; |
1724 state.start_timestamp = timestamp_offset_; | 1725 state.start_timestamp = timestamp_offset_; |
1725 | 1726 |
1726 return state; | 1727 return state; |
1727 } | 1728 } |
1728 | 1729 |
1729 } // namespace webrtc | 1730 } // namespace webrtc |
OLD | NEW |