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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc

Issue 1945773002: RtpPacketHistory rewritten to use RtpPacket class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 141
142 void SetUp() override { SetUpRtpSender(true); } 142 void SetUp() override { SetUpRtpSender(true); }
143 143
144 void SetUpRtpSender(bool pacer) { 144 void SetUpRtpSender(bool pacer) {
145 rtp_sender_.reset(new RTPSender( 145 rtp_sender_.reset(new RTPSender(
146 false, &fake_clock_, &transport_, pacer ? &mock_paced_sender_ : nullptr, 146 false, &fake_clock_, &transport_, pacer ? &mock_paced_sender_ : nullptr,
147 &seq_num_allocator_, nullptr, nullptr, nullptr, nullptr, 147 &seq_num_allocator_, nullptr, nullptr, nullptr, nullptr,
148 &mock_rtc_event_log_, &send_packet_observer_)); 148 &mock_rtc_event_log_, &send_packet_observer_));
149 rtp_sender_->SetSequenceNumber(kSeqNum); 149 rtp_sender_->SetSequenceNumber(kSeqNum);
150 rtp_sender_->SetSendPayloadType(kPayload);
150 } 151 }
151 152
152 SimulatedClock fake_clock_; 153 SimulatedClock fake_clock_;
153 MockRtcEventLog mock_rtc_event_log_; 154 MockRtcEventLog mock_rtc_event_log_;
154 MockRtpPacketSender mock_paced_sender_; 155 MockRtpPacketSender mock_paced_sender_;
155 MockTransportSequenceNumberAllocator seq_num_allocator_; 156 MockTransportSequenceNumberAllocator seq_num_allocator_;
156 MockSendPacketObserver send_packet_observer_; 157 MockSendPacketObserver send_packet_observer_;
157 std::unique_ptr<RTPSender> rtp_sender_; 158 std::unique_ptr<RTPSender> rtp_sender_;
158 int payload_; 159 int payload_;
159 LoopbackTransportTest transport_; 160 LoopbackTransportTest transport_;
(...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 reinterpret_cast<uint8_t*>(transport_.sent_packets_[0]->data()), 1602 reinterpret_cast<uint8_t*>(transport_.sent_packets_[0]->data()),
1602 transport_.sent_packets_[0]->size(), true, &map, kSeqNum, hdr.rotation); 1603 transport_.sent_packets_[0]->size(), true, &map, kSeqNum, hdr.rotation);
1603 1604
1604 // Verify that this packet does have CVO byte. 1605 // Verify that this packet does have CVO byte.
1605 VerifyCVOPacket( 1606 VerifyCVOPacket(
1606 reinterpret_cast<uint8_t*>(transport_.sent_packets_[1]->data()), 1607 reinterpret_cast<uint8_t*>(transport_.sent_packets_[1]->data()),
1607 transport_.sent_packets_[1]->size(), true, &map, kSeqNum + 1, 1608 transport_.sent_packets_[1]->size(), true, &map, kSeqNum + 1,
1608 hdr.rotation); 1609 hdr.rotation);
1609 } 1610 }
1610 } // namespace webrtc 1611 } // namespace webrtc
OLDNEW
« webrtc/modules/rtp_rtcp/source/rtp_sender.cc ('K') | « webrtc/modules/rtp_rtcp/source/rtp_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698