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/test/bwe_test_logging.h" | 19 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" |
19 #include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h" | 20 #include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h" |
20 | 21 |
21 namespace webrtc { | 22 namespace webrtc { |
22 namespace testing { | 23 namespace testing { |
23 namespace bwe { | 24 namespace bwe { |
24 | 25 |
25 RembBweSender::RembBweSender(int kbps, BitrateObserver* observer, Clock* clock) | 26 RembBweSender::RembBweSender(int kbps, BitrateObserver* observer, Clock* clock) |
26 : bitrate_controller_( | 27 : bitrate_controller_( |
27 BitrateController::CreateBitrateController(clock, observer)), | 28 BitrateController::CreateBitrateController(clock, observer)), |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 return 100; | 61 return 100; |
61 } | 62 } |
62 | 63 |
63 RembReceiver::RembReceiver(int flow_id, bool plot) | 64 RembReceiver::RembReceiver(int flow_id, bool plot) |
64 : BweReceiver(flow_id), | 65 : BweReceiver(flow_id), |
65 estimate_log_prefix_(), | 66 estimate_log_prefix_(), |
66 plot_estimate_(plot), | 67 plot_estimate_(plot), |
67 clock_(0), | 68 clock_(0), |
68 recv_stats_(ReceiveStatistics::Create(&clock_)), | 69 recv_stats_(ReceiveStatistics::Create(&clock_)), |
69 latest_estimate_bps_(-1), | 70 latest_estimate_bps_(-1), |
70 estimator_(AbsoluteSendTimeRemoteBitrateEstimatorFactory().Create( | 71 last_feedback_ms_(-1), |
stefan-webrtc
2015/06/30 11:38:18
Uninitialized before?
sprang_webrtc
2015/07/06 07:54:29
Yep. Just a drive by fixit.
| |
72 estimator_(new RemoteBitrateEstimatorAbsSendTime( | |
71 this, | 73 this, |
72 &clock_, | 74 &clock_, |
73 kAimdControl, | |
74 kRemoteBitrateEstimatorMinBitrateBps)) { | 75 kRemoteBitrateEstimatorMinBitrateBps)) { |
75 std::stringstream ss; | 76 std::stringstream ss; |
76 ss << "Estimate_" << flow_id_ << "#1"; | 77 ss << "Estimate_" << flow_id_ << "#1"; |
77 estimate_log_prefix_ = ss.str(); | 78 estimate_log_prefix_ = ss.str(); |
78 // Default RTT in RemoteRateControl is 200 ms ; 50 ms is more realistic. | 79 // Default RTT in RemoteRateControl is 200 ms ; 50 ms is more realistic. |
79 estimator_->OnRttUpdate(50); | 80 estimator_->OnRttUpdate(50); |
80 } | 81 } |
81 | 82 |
82 RembReceiver::~RembReceiver() { | 83 RembReceiver::~RembReceiver() { |
83 } | 84 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 } | 158 } |
158 latest_estimate_bps_ = bps; | 159 latest_estimate_bps_ = bps; |
159 } | 160 } |
160 *estimate_bps = latest_estimate_bps_; | 161 *estimate_bps = latest_estimate_bps_; |
161 return true; | 162 return true; |
162 } | 163 } |
163 | 164 |
164 } // namespace bwe | 165 } // namespace bwe |
165 } // namespace testing | 166 } // namespace testing |
166 } // namespace webrtc | 167 } // namespace webrtc |
OLD | NEW |