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 <algorithm> | 11 #include <algorithm> |
12 | 12 |
13 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h" | 13 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/remb.h" |
14 | 14 |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "webrtc/base/common.h" | 16 #include "webrtc/base/common.h" |
17 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | 17 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" |
18 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_s
end_time.h" | 18 #include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_s
end_time.h" |
19 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" | 19 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" |
20 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" | 20 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" |
21 | 21 |
22 namespace webrtc { | 22 namespace webrtc { |
23 namespace testing { | 23 namespace testing { |
24 namespace bwe { | 24 namespace bwe { |
25 | 25 |
26 RembBweSender::RembBweSender(int kbps, BitrateObserver* observer, Clock* clock) | 26 RembBweSender::RembBweSender(int kbps, BitrateObserver* observer, Clock* clock) |
27 : bitrate_controller_( | 27 : bitrate_controller_( |
28 BitrateController::CreateBitrateController(clock, observer)), | 28 BitrateController::CreateBitrateController(clock, observer, &pacer_)), |
29 feedback_observer_(bitrate_controller_->CreateRtcpBandwidthObserver()), | 29 feedback_observer_(bitrate_controller_->CreateRtcpBandwidthObserver()), |
30 clock_(clock) { | 30 clock_(clock) { |
31 assert(kbps >= kMinBitrateKbps); | 31 assert(kbps >= kMinBitrateKbps); |
32 assert(kbps <= kMaxBitrateKbps); | 32 assert(kbps <= kMaxBitrateKbps); |
33 bitrate_controller_->SetStartBitrate(1000 * kbps); | 33 bitrate_controller_->SetStartBitrate(1000 * kbps); |
34 bitrate_controller_->SetMinMaxBitrate(1000 * kMinBitrateKbps, | 34 bitrate_controller_->SetMinMaxBitrate(1000 * kMinBitrateKbps, |
35 1000 * kMaxBitrateKbps); | 35 1000 * kMaxBitrateKbps); |
36 } | 36 } |
37 | 37 |
38 RembBweSender::~RembBweSender() { | 38 RembBweSender::~RembBweSender() { |
(...skipping 114 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 |