OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <algorithm> | 10 #include <algorithm> |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 if (!sequence_number_to_retransmit_) { | 521 if (!sequence_number_to_retransmit_) { |
522 sequence_number_to_retransmit_ = | 522 sequence_number_to_retransmit_ = |
523 rtc::Optional<uint16_t>(header.sequenceNumber); | 523 rtc::Optional<uint16_t>(header.sequenceNumber); |
524 | 524 |
525 // Don't ask for retransmission straight away, may be deduped in pacer. | 525 // Don't ask for retransmission straight away, may be deduped in pacer. |
526 } else if (header.sequenceNumber == *sequence_number_to_retransmit_) { | 526 } else if (header.sequenceNumber == *sequence_number_to_retransmit_) { |
527 observation_complete_.Set(); | 527 observation_complete_.Set(); |
528 } else { | 528 } else { |
529 // Send a NACK as often as necessary until retransmission is received. | 529 // Send a NACK as often as necessary until retransmission is received. |
530 rtcp::Nack nack; | 530 rtcp::Nack nack; |
531 nack.From(local_ssrc_); | 531 nack.SetSenderSsrc(local_ssrc_); |
532 nack.To(remote_ssrc_); | 532 nack.SetMediaSsrc(remote_ssrc_); |
533 uint16_t nack_list[] = {*sequence_number_to_retransmit_}; | 533 uint16_t nack_list[] = {*sequence_number_to_retransmit_}; |
534 nack.WithList(nack_list, 1); | 534 nack.SetPacketIds(nack_list, 1); |
535 rtc::Buffer buffer = nack.Build(); | 535 rtc::Buffer buffer = nack.Build(); |
536 | 536 |
537 EXPECT_TRUE(receive_transport_->SendRtcp(buffer.data(), buffer.size())); | 537 EXPECT_TRUE(receive_transport_->SendRtcp(buffer.data(), buffer.size())); |
538 } | 538 } |
539 | 539 |
540 return SEND_PACKET; | 540 return SEND_PACKET; |
541 } | 541 } |
542 | 542 |
543 void ModifyAudioConfigs( | 543 void ModifyAudioConfigs( |
544 AudioSendStream::Config* send_config, | 544 AudioSendStream::Config* send_config, |
(...skipping 3192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3737 private: | 3737 private: |
3738 bool video_observed_; | 3738 bool video_observed_; |
3739 bool audio_observed_; | 3739 bool audio_observed_; |
3740 SequenceNumberUnwrapper unwrapper_; | 3740 SequenceNumberUnwrapper unwrapper_; |
3741 std::set<int64_t> received_packet_ids_; | 3741 std::set<int64_t> received_packet_ids_; |
3742 } test; | 3742 } test; |
3743 | 3743 |
3744 RunBaseTest(&test); | 3744 RunBaseTest(&test); |
3745 } | 3745 } |
3746 } // namespace webrtc | 3746 } // namespace webrtc |
OLD | NEW |