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 |
11 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h" | 11 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/send_side.h" |
12 | 12 |
13 #include "webrtc/base/logging.h" | 13 #include "webrtc/base/logging.h" |
| 14 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_s
end_time.h" |
14 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" | 15 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" |
15 | 16 |
16 namespace webrtc { | 17 namespace webrtc { |
17 namespace testing { | 18 namespace testing { |
18 namespace bwe { | 19 namespace bwe { |
19 | 20 |
20 const int kFeedbackIntervalMs = 50; | 21 const int kFeedbackIntervalMs = 50; |
21 | 22 |
22 FullBweSender::FullBweSender(int kbps, BitrateObserver* observer, Clock* clock) | 23 FullBweSender::FullBweSender(int kbps, BitrateObserver* observer, Clock* clock) |
23 : bitrate_controller_( | 24 : bitrate_controller_( |
24 BitrateController::CreateBitrateController(clock, observer)), | 25 BitrateController::CreateBitrateController(clock, observer)), |
25 rbe_(AbsoluteSendTimeRemoteBitrateEstimatorFactory() | 26 rbe_(new RemoteBitrateEstimatorAbsSendTime(this, |
26 .Create(this, clock, kAimdControl, 1000 * kMinBitrateKbps)), | 27 clock, |
| 28 1000 * kMinBitrateKbps)), |
27 feedback_observer_(bitrate_controller_->CreateRtcpBandwidthObserver()), | 29 feedback_observer_(bitrate_controller_->CreateRtcpBandwidthObserver()), |
28 clock_(clock), | 30 clock_(clock), |
29 send_time_history_(10000), | 31 send_time_history_(10000), |
30 has_received_ack_(false), | 32 has_received_ack_(false), |
31 last_acked_seq_num_(0) { | 33 last_acked_seq_num_(0) { |
32 assert(kbps >= kMinBitrateKbps); | 34 assert(kbps >= kMinBitrateKbps); |
33 assert(kbps <= kMaxBitrateKbps); | 35 assert(kbps <= kMaxBitrateKbps); |
34 bitrate_controller_->SetStartBitrate(1000 * kbps); | 36 bitrate_controller_->SetStartBitrate(1000 * kbps); |
35 bitrate_controller_->SetMinMaxBitrate(1000 * kMinBitrateKbps, | 37 bitrate_controller_->SetMinMaxBitrate(1000 * kMinBitrateKbps, |
36 1000 * kMaxBitrateKbps); | 38 1000 * kMaxBitrateKbps); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 packet_feedback_vector_.back().arrival_time_ms; | 144 packet_feedback_vector_.back().arrival_time_ms; |
143 FeedbackPacket* fb = new SendSideBweFeedback( | 145 FeedbackPacket* fb = new SendSideBweFeedback( |
144 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_); | 146 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_); |
145 packet_feedback_vector_.clear(); | 147 packet_feedback_vector_.clear(); |
146 return fb; | 148 return fb; |
147 } | 149 } |
148 | 150 |
149 } // namespace bwe | 151 } // namespace bwe |
150 } // namespace testing | 152 } // namespace testing |
151 } // namespace webrtc | 153 } // namespace webrtc |
OLD | NEW |