| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 latest_estimate_bps_ = -1; | 90 latest_estimate_bps_ = -1; |
| 91 | 91 |
| 92 int64_t step_ms = std::max<int64_t>(estimator_->TimeUntilNextProcess(), 0); | 92 int64_t step_ms = std::max<int64_t>(estimator_->TimeUntilNextProcess(), 0); |
| 93 while ((clock_.TimeInMilliseconds() + step_ms) < arrival_time_ms) { | 93 while ((clock_.TimeInMilliseconds() + step_ms) < arrival_time_ms) { |
| 94 clock_.AdvanceTimeMilliseconds(step_ms); | 94 clock_.AdvanceTimeMilliseconds(step_ms); |
| 95 estimator_->Process(); | 95 estimator_->Process(); |
| 96 step_ms = std::max<int64_t>(estimator_->TimeUntilNextProcess(), 0); | 96 step_ms = std::max<int64_t>(estimator_->TimeUntilNextProcess(), 0); |
| 97 } | 97 } |
| 98 estimator_->IncomingPacket(arrival_time_ms, media_packet.payload_size(), | 98 estimator_->IncomingPacket(arrival_time_ms, media_packet.payload_size(), |
| 99 media_packet.header()); | 99 media_packet.header(), true); |
| 100 clock_.AdvanceTimeMilliseconds(arrival_time_ms - clock_.TimeInMilliseconds()); | 100 clock_.AdvanceTimeMilliseconds(arrival_time_ms - clock_.TimeInMilliseconds()); |
| 101 ASSERT_TRUE(arrival_time_ms == clock_.TimeInMilliseconds()); | 101 ASSERT_TRUE(arrival_time_ms == clock_.TimeInMilliseconds()); |
| 102 | 102 |
| 103 received_packets_.Insert(media_packet.sequence_number(), | 103 received_packets_.Insert(media_packet.sequence_number(), |
| 104 media_packet.send_time_ms(), arrival_time_ms, | 104 media_packet.send_time_ms(), arrival_time_ms, |
| 105 media_packet.payload_size()); | 105 media_packet.payload_size()); |
| 106 } | 106 } |
| 107 | 107 |
| 108 FeedbackPacket* RembReceiver::GetFeedback(int64_t now_ms) { | 108 FeedbackPacket* RembReceiver::GetFeedback(int64_t now_ms) { |
| 109 BWE_TEST_LOGGING_CONTEXT("Remb"); | 109 BWE_TEST_LOGGING_CONTEXT("Remb"); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 } | 157 } |
| 158 latest_estimate_bps_ = bps; | 158 latest_estimate_bps_ = bps; |
| 159 } | 159 } |
| 160 *estimate_bps = latest_estimate_bps_; | 160 *estimate_bps = latest_estimate_bps_; |
| 161 return true; | 161 return true; |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace bwe | 164 } // namespace bwe |
| 165 } // namespace testing | 165 } // namespace testing |
| 166 } // namespace webrtc | 166 } // namespace webrtc |
| OLD | NEW |