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

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

Issue 2241193002: StartTimestamp generated randomly in RtpSender constructor (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Renames start_timestamp->timestamp_offset in RtcpSender Created 4 years, 4 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_sender.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) 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 void SetUp() override { SetUpRtpSender(true); } 143 void SetUp() override { SetUpRtpSender(true); }
144 144
145 void SetUpRtpSender(bool pacer) { 145 void SetUpRtpSender(bool pacer) {
146 rtp_sender_.reset(new RTPSender( 146 rtp_sender_.reset(new RTPSender(
147 false, &fake_clock_, &transport_, pacer ? &mock_paced_sender_ : nullptr, 147 false, &fake_clock_, &transport_, pacer ? &mock_paced_sender_ : nullptr,
148 &seq_num_allocator_, nullptr, nullptr, nullptr, nullptr, 148 &seq_num_allocator_, nullptr, nullptr, nullptr, nullptr,
149 &mock_rtc_event_log_, &send_packet_observer_, 149 &mock_rtc_event_log_, &send_packet_observer_,
150 &retransmission_rate_limiter_)); 150 &retransmission_rate_limiter_));
151 rtp_sender_->SetSequenceNumber(kSeqNum); 151 rtp_sender_->SetSequenceNumber(kSeqNum);
152 rtp_sender_->SetSendPayloadType(kPayload); 152 rtp_sender_->SetSendPayloadType(kPayload);
153 rtp_sender_->SetTimestampOffset(0);
153 } 154 }
154 155
155 SimulatedClock fake_clock_; 156 SimulatedClock fake_clock_;
156 testing::NiceMock<MockRtcEventLog> mock_rtc_event_log_; 157 testing::NiceMock<MockRtcEventLog> mock_rtc_event_log_;
157 MockRtpPacketSender mock_paced_sender_; 158 MockRtpPacketSender mock_paced_sender_;
158 testing::StrictMock<MockTransportSequenceNumberAllocator> seq_num_allocator_; 159 testing::StrictMock<MockTransportSequenceNumberAllocator> seq_num_allocator_;
159 testing::StrictMock<MockSendPacketObserver> send_packet_observer_; 160 testing::StrictMock<MockSendPacketObserver> send_packet_observer_;
160 RateLimiter retransmission_rate_limiter_; 161 RateLimiter retransmission_rate_limiter_;
161 std::unique_ptr<RTPSender> rtp_sender_; 162 std::unique_ptr<RTPSender> rtp_sender_;
162 int payload_; 163 int payload_;
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 reinterpret_cast<uint8_t*>(transport_.sent_packets_[0]->data()), 1623 reinterpret_cast<uint8_t*>(transport_.sent_packets_[0]->data()),
1623 transport_.sent_packets_[0]->size(), true, &map, kSeqNum, hdr.rotation); 1624 transport_.sent_packets_[0]->size(), true, &map, kSeqNum, hdr.rotation);
1624 1625
1625 // Verify that this packet does have CVO byte. 1626 // Verify that this packet does have CVO byte.
1626 VerifyCVOPacket( 1627 VerifyCVOPacket(
1627 reinterpret_cast<uint8_t*>(transport_.sent_packets_[1]->data()), 1628 reinterpret_cast<uint8_t*>(transport_.sent_packets_[1]->data()),
1628 transport_.sent_packets_[1]->size(), true, &map, kSeqNum + 1, 1629 transport_.sent_packets_[1]->size(), true, &map, kSeqNum + 1,
1629 hdr.rotation); 1630 hdr.rotation);
1630 } 1631 }
1631 } // namespace webrtc 1632 } // namespace webrtc
OLDNEW
« no previous file with comments | « 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