| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 static const unsigned int kExpectedHighBitrateBps = 60000; | 121 static const unsigned int kExpectedHighBitrateBps = 60000; |
| 122 static const unsigned int kLowBandwidthLimitBps = 20000; | 122 static const unsigned int kLowBandwidthLimitBps = 20000; |
| 123 static const unsigned int kExpectedLowBitrateBps = 20000; | 123 static const unsigned int kExpectedLowBitrateBps = 20000; |
| 124 enum TestStates { kFirstRampup, kLowRate, kSecondRampup }; | 124 enum TestStates { kFirstRampup, kLowRate, kSecondRampup }; |
| 125 | 125 |
| 126 Clock* const clock_; | 126 Clock* const clock_; |
| 127 const size_t number_of_streams_; | 127 const size_t number_of_streams_; |
| 128 const bool rtx_used_; | 128 const bool rtx_used_; |
| 129 const rtc::scoped_ptr<EventWrapper> test_done_; | 129 const rtc::scoped_ptr<EventWrapper> test_done_; |
| 130 const rtc::scoped_ptr<RtpHeaderParser> rtp_parser_; | 130 const rtc::scoped_ptr<RtpHeaderParser> rtp_parser_; |
| 131 const rtc::scoped_ptr<RTPPayloadRegistry> payload_registry_; |
| 131 rtc::scoped_ptr<RtpRtcp> rtp_rtcp_; | 132 rtc::scoped_ptr<RtpRtcp> rtp_rtcp_; |
| 132 internal::TransportAdapter feedback_transport_; | 133 internal::TransportAdapter feedback_transport_; |
| 133 const rtc::scoped_ptr<ReceiveStatistics> receive_stats_; | 134 const rtc::scoped_ptr<ReceiveStatistics> receive_stats_; |
| 134 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; | 135 rtc::scoped_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_; |
| 135 | 136 |
| 136 rtc::CriticalSection crit_; | 137 rtc::CriticalSection crit_; |
| 137 VideoSendStream* send_stream_ GUARDED_BY(crit_); | 138 VideoSendStream* send_stream_ GUARDED_BY(crit_); |
| 138 FakeNetworkPipe::Config forward_transport_config_ GUARDED_BY(crit_); | 139 FakeNetworkPipe::Config forward_transport_config_ GUARDED_BY(crit_); |
| 139 TestStates test_state_ GUARDED_BY(crit_); | 140 TestStates test_state_ GUARDED_BY(crit_); |
| 140 int64_t state_start_ms_ GUARDED_BY(crit_); | 141 int64_t state_start_ms_ GUARDED_BY(crit_); |
| 141 int64_t interval_start_ms_ GUARDED_BY(crit_); | 142 int64_t interval_start_ms_ GUARDED_BY(crit_); |
| 142 unsigned int last_remb_bps_ GUARDED_BY(crit_); | 143 unsigned int last_remb_bps_ GUARDED_BY(crit_); |
| 143 size_t sent_bytes_ GUARDED_BY(crit_); | 144 size_t sent_bytes_ GUARDED_BY(crit_); |
| 144 size_t total_overuse_bytes_ GUARDED_BY(crit_); | 145 size_t total_overuse_bytes_ GUARDED_BY(crit_); |
| 145 bool suspended_in_stats_ GUARDED_BY(crit_); | 146 bool suspended_in_stats_ GUARDED_BY(crit_); |
| 146 }; | 147 }; |
| 147 | 148 |
| 148 class RampUpTest : public test::CallTest { | 149 class RampUpTest : public test::CallTest { |
| 149 protected: | 150 protected: |
| 150 void RunRampUpTest(size_t num_streams, | 151 void RunRampUpTest(size_t num_streams, |
| 151 unsigned int start_bitrate_bps, | 152 unsigned int start_bitrate_bps, |
| 152 const std::string& extension_type, | 153 const std::string& extension_type, |
| 153 bool rtx, | 154 bool rtx, |
| 154 bool red); | 155 bool red); |
| 155 | 156 |
| 156 void RunRampUpDownUpTest(size_t number_of_streams, bool rtx, bool red); | 157 void RunRampUpDownUpTest(size_t number_of_streams, bool rtx, bool red); |
| 157 }; | 158 }; |
| 158 } // namespace webrtc | 159 } // namespace webrtc |
| 159 #endif // WEBRTC_VIDEO_RAMPUP_TESTS_H_ | 160 #endif // WEBRTC_VIDEO_RAMPUP_TESTS_H_ |
| OLD | NEW |