| 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, |
| 29 observer, |
| 30 &event_log_)), |
| 29 feedback_observer_(bitrate_controller_->CreateRtcpBandwidthObserver()), | 31 feedback_observer_(bitrate_controller_->CreateRtcpBandwidthObserver()), |
| 30 clock_(clock) { | 32 clock_(clock) { |
| 31 assert(kbps >= kMinBitrateKbps); | 33 assert(kbps >= kMinBitrateKbps); |
| 32 assert(kbps <= kMaxBitrateKbps); | 34 assert(kbps <= kMaxBitrateKbps); |
| 33 bitrate_controller_->SetStartBitrate(1000 * kbps); | 35 bitrate_controller_->SetStartBitrate(1000 * kbps); |
| 34 bitrate_controller_->SetMinMaxBitrate(1000 * kMinBitrateKbps, | 36 bitrate_controller_->SetMinMaxBitrate(1000 * kMinBitrateKbps, |
| 35 1000 * kMaxBitrateKbps); | 37 1000 * kMaxBitrateKbps); |
| 36 } | 38 } |
| 37 | 39 |
| 38 RembBweSender::~RembBweSender() { | 40 RembBweSender::~RembBweSender() { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 } | 155 } |
| 154 latest_estimate_bps_ = bps; | 156 latest_estimate_bps_ = bps; |
| 155 } | 157 } |
| 156 *estimate_bps = latest_estimate_bps_; | 158 *estimate_bps = latest_estimate_bps_; |
| 157 return true; | 159 return true; |
| 158 } | 160 } |
| 159 | 161 |
| 160 } // namespace bwe | 162 } // namespace bwe |
| 161 } // namespace testing | 163 } // namespace testing |
| 162 } // namespace webrtc | 164 } // namespace webrtc |
| OLD | NEW |