Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: webrtc/video/end_to_end_tests.cc

Issue 2370313002: Reland of Unify rtcp packet setters (Closed)
Patch Set: Fix breaking mistype Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 if (!sequence_number_to_retransmit_) { 524 if (!sequence_number_to_retransmit_) {
525 sequence_number_to_retransmit_ = 525 sequence_number_to_retransmit_ =
526 rtc::Optional<uint16_t>(header.sequenceNumber); 526 rtc::Optional<uint16_t>(header.sequenceNumber);
527 527
528 // Don't ask for retransmission straight away, may be deduped in pacer. 528 // Don't ask for retransmission straight away, may be deduped in pacer.
529 } else if (header.sequenceNumber == *sequence_number_to_retransmit_) { 529 } else if (header.sequenceNumber == *sequence_number_to_retransmit_) {
530 observation_complete_.Set(); 530 observation_complete_.Set();
531 } else { 531 } else {
532 // Send a NACK as often as necessary until retransmission is received. 532 // Send a NACK as often as necessary until retransmission is received.
533 rtcp::Nack nack; 533 rtcp::Nack nack;
534 nack.From(local_ssrc_); 534 nack.SetSenderSsrc(local_ssrc_);
535 nack.To(remote_ssrc_); 535 nack.SetMediaSsrc(remote_ssrc_);
536 uint16_t nack_list[] = {*sequence_number_to_retransmit_}; 536 uint16_t nack_list[] = {*sequence_number_to_retransmit_};
537 nack.WithList(nack_list, 1); 537 nack.SetPacketIds(nack_list, 1);
538 rtc::Buffer buffer = nack.Build(); 538 rtc::Buffer buffer = nack.Build();
539 539
540 EXPECT_TRUE(receive_transport_->SendRtcp(buffer.data(), buffer.size())); 540 EXPECT_TRUE(receive_transport_->SendRtcp(buffer.data(), buffer.size()));
541 } 541 }
542 542
543 return SEND_PACKET; 543 return SEND_PACKET;
544 } 544 }
545 545
546 void ModifyAudioConfigs( 546 void ModifyAudioConfigs(
547 AudioSendStream::Config* send_config, 547 AudioSendStream::Config* send_config,
(...skipping 3196 matching lines...) Expand 10 before | Expand all | Expand 10 after
3744 private: 3744 private:
3745 bool video_observed_; 3745 bool video_observed_;
3746 bool audio_observed_; 3746 bool audio_observed_;
3747 SequenceNumberUnwrapper unwrapper_; 3747 SequenceNumberUnwrapper unwrapper_;
3748 std::set<int64_t> received_packet_ids_; 3748 std::set<int64_t> received_packet_ids_;
3749 } test; 3749 } test;
3750 3750
3751 RunBaseTest(&test); 3751 RunBaseTest(&test);
3752 } 3752 }
3753 } // namespace webrtc 3753 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698