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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/estimators/remb.cc

Issue 1202253003: More Simulation Framework features (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Using rtc::scoped_ptr on nada_unittest.cc Created 5 years, 5 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) 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 while ((clock_.TimeInMilliseconds() + step_ms) < arrival_time_ms) { 94 while ((clock_.TimeInMilliseconds() + step_ms) < arrival_time_ms) {
95 clock_.AdvanceTimeMilliseconds(step_ms); 95 clock_.AdvanceTimeMilliseconds(step_ms);
96 estimator_->Process(); 96 estimator_->Process();
97 step_ms = std::max<int64_t>(estimator_->TimeUntilNextProcess(), 0); 97 step_ms = std::max<int64_t>(estimator_->TimeUntilNextProcess(), 0);
98 } 98 }
99 estimator_->IncomingPacket(arrival_time_ms, media_packet.payload_size(), 99 estimator_->IncomingPacket(arrival_time_ms, media_packet.payload_size(),
100 media_packet.header(), true); 100 media_packet.header(), true);
101 clock_.AdvanceTimeMilliseconds(arrival_time_ms - clock_.TimeInMilliseconds()); 101 clock_.AdvanceTimeMilliseconds(arrival_time_ms - clock_.TimeInMilliseconds());
102 ASSERT_TRUE(arrival_time_ms == clock_.TimeInMilliseconds()); 102 ASSERT_TRUE(arrival_time_ms == clock_.TimeInMilliseconds());
103 103
104 received_packets_.Insert(media_packet.sequence_number(), 104 // Log received packet information.
105 media_packet.send_time_ms(), arrival_time_ms, 105 BweReceiver::ReceivePacket(arrival_time_ms, media_packet);
106 media_packet.payload_size());
107 } 106 }
108 107
109 FeedbackPacket* RembReceiver::GetFeedback(int64_t now_ms) { 108 FeedbackPacket* RembReceiver::GetFeedback(int64_t now_ms) {
110 BWE_TEST_LOGGING_CONTEXT("Remb"); 109 BWE_TEST_LOGGING_CONTEXT("Remb");
111 uint32_t estimated_bps = 0; 110 uint32_t estimated_bps = 0;
112 RembFeedback* feedback = NULL; 111 RembFeedback* feedback = NULL;
113 if (LatestEstimate(&estimated_bps)) { 112 if (LatestEstimate(&estimated_bps)) {
114 StatisticianMap statisticians = recv_stats_->GetActiveStatisticians(); 113 StatisticianMap statisticians = recv_stats_->GetActiveStatisticians();
115 RTCPReportBlock report_block; 114 RTCPReportBlock report_block;
116 if (!statisticians.empty()) { 115 if (!statisticians.empty()) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 157 }
159 latest_estimate_bps_ = bps; 158 latest_estimate_bps_ = bps;
160 } 159 }
161 *estimate_bps = latest_estimate_bps_; 160 *estimate_bps = latest_estimate_bps_;
162 return true; 161 return true;
163 } 162 }
164 163
165 } // namespace bwe 164 } // namespace bwe
166 } // namespace testing 165 } // namespace testing
167 } // namespace webrtc 166 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698