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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter_unittest.cc

Issue 1419503004: Set send times in send time history via OnSentPacket. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comments addressed Created 5 years, 1 month 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 EXPECT_EQ(truth[i].send_time_ms, input[i].send_time_ms); 98 EXPECT_EQ(truth[i].send_time_ms, input[i].send_time_ms);
99 EXPECT_EQ(truth[i].sequence_number, input[i].sequence_number); 99 EXPECT_EQ(truth[i].sequence_number, input[i].sequence_number);
100 EXPECT_EQ(truth[i].payload_size, input[i].payload_size); 100 EXPECT_EQ(truth[i].payload_size, input[i].payload_size);
101 EXPECT_EQ(truth[i].was_paced, input[i].was_paced); 101 EXPECT_EQ(truth[i].was_paced, input[i].was_paced);
102 } 102 }
103 } 103 }
104 104
105 // Utility method, to reset arrival_time_ms before adding send time. 105 // Utility method, to reset arrival_time_ms before adding send time.
106 void OnSentPacket(PacketInfo info) { 106 void OnSentPacket(PacketInfo info) {
107 info.arrival_time_ms = 0; 107 info.arrival_time_ms = 0;
108 adapter_->OnSentPacket(info); 108 adapter_->AddPacket(info.sequence_number, info.payload_size,
109 info.was_paced);
110 adapter_->OnSentPacket(info.sequence_number, info.send_time_ms);
109 } 111 }
110 112
111 SimulatedClock clock_; 113 SimulatedClock clock_;
112 MockProcessThread process_thread_; 114 MockProcessThread process_thread_;
113 MockRemoteBitrateEstimator* bitrate_estimator_; 115 MockRemoteBitrateEstimator* bitrate_estimator_;
114 rtc::scoped_ptr<TransportFeedbackAdapter> adapter_; 116 rtc::scoped_ptr<TransportFeedbackAdapter> adapter_;
115 117
116 uint32_t receiver_estimated_bitrate_; 118 uint32_t receiver_estimated_bitrate_;
117 }; 119 };
118 120
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 })); 316 }));
315 adapter_->OnTransportFeedback(*feedback.get()); 317 adapter_->OnTransportFeedback(*feedback.get());
316 318
317 sent_packets.push_back(info); 319 sent_packets.push_back(info);
318 320
319 ComparePacketVectors(sent_packets, received_feedback); 321 ComparePacketVectors(sent_packets, received_feedback);
320 } 322 }
321 323
322 } // namespace test 324 } // namespace test
323 } // namespace webrtc 325 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698