| OLD | NEW |
| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 latest_estimate_bps_ = -1; | 89 latest_estimate_bps_ = -1; |
| 90 | 90 |
| 91 int64_t step_ms = std::max<int64_t>(estimator_->TimeUntilNextProcess(), 0); | 91 int64_t step_ms = std::max<int64_t>(estimator_->TimeUntilNextProcess(), 0); |
| 92 while ((clock_.TimeInMilliseconds() + step_ms) < arrival_time_ms) { | 92 while ((clock_.TimeInMilliseconds() + step_ms) < arrival_time_ms) { |
| 93 clock_.AdvanceTimeMilliseconds(step_ms); | 93 clock_.AdvanceTimeMilliseconds(step_ms); |
| 94 estimator_->Process(); | 94 estimator_->Process(); |
| 95 step_ms = std::max<int64_t>(estimator_->TimeUntilNextProcess(), 0); | 95 step_ms = std::max<int64_t>(estimator_->TimeUntilNextProcess(), 0); |
| 96 } | 96 } |
| 97 estimator_->IncomingPacket(arrival_time_ms, media_packet.payload_size(), | 97 estimator_->IncomingPacket(arrival_time_ms, media_packet.payload_size(), |
| 98 media_packet.header(), true); | 98 media_packet.header()); |
| 99 clock_.AdvanceTimeMilliseconds(arrival_time_ms - clock_.TimeInMilliseconds()); | 99 clock_.AdvanceTimeMilliseconds(arrival_time_ms - clock_.TimeInMilliseconds()); |
| 100 ASSERT_TRUE(arrival_time_ms == clock_.TimeInMilliseconds()); | 100 ASSERT_TRUE(arrival_time_ms == clock_.TimeInMilliseconds()); |
| 101 | 101 |
| 102 // Log received packet information. | 102 // Log received packet information. |
| 103 BweReceiver::ReceivePacket(arrival_time_ms, media_packet); | 103 BweReceiver::ReceivePacket(arrival_time_ms, media_packet); |
| 104 } | 104 } |
| 105 | 105 |
| 106 FeedbackPacket* RembReceiver::GetFeedback(int64_t now_ms) { | 106 FeedbackPacket* RembReceiver::GetFeedback(int64_t now_ms) { |
| 107 BWE_TEST_LOGGING_CONTEXT("Remb"); | 107 BWE_TEST_LOGGING_CONTEXT("Remb"); |
| 108 uint32_t estimated_bps = 0; | 108 uint32_t estimated_bps = 0; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 } | 153 } |
| 154 latest_estimate_bps_ = bps; | 154 latest_estimate_bps_ = bps; |
| 155 } | 155 } |
| 156 *estimate_bps = latest_estimate_bps_; | 156 *estimate_bps = latest_estimate_bps_; |
| 157 return true; | 157 return true; |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace bwe | 160 } // namespace bwe |
| 161 } // namespace testing | 161 } // namespace testing |
| 162 } // namespace webrtc | 162 } // namespace webrtc |
| OLD | NEW |