| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <algorithm> // max | 10 #include <algorithm> // max |
| (...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 std::vector<VideoReceiveStream::Config>* receive_configs, | 898 std::vector<VideoReceiveStream::Config>* receive_configs, |
| 899 VideoEncoderConfig* encoder_config) override { | 899 VideoEncoderConfig* encoder_config) override { |
| 900 transport_adapter_.reset( | 900 transport_adapter_.reset( |
| 901 new internal::TransportAdapter(send_config->send_transport)); | 901 new internal::TransportAdapter(send_config->send_transport)); |
| 902 transport_adapter_->Enable(); | 902 transport_adapter_->Enable(); |
| 903 send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs; | 903 send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
| 904 send_config->pre_encode_callback = this; | 904 send_config->pre_encode_callback = this; |
| 905 send_config->suspend_below_min_bitrate = true; | 905 send_config->suspend_below_min_bitrate = true; |
| 906 int min_bitrate_bps = encoder_config->streams[0].min_bitrate_bps; | 906 int min_bitrate_bps = encoder_config->streams[0].min_bitrate_bps; |
| 907 set_low_remb_bps(min_bitrate_bps - 10000); | 907 set_low_remb_bps(min_bitrate_bps - 10000); |
| 908 int threshold_window = std::max(min_bitrate_bps / 10, 10000); | 908 int threshold_window = std::max(min_bitrate_bps / 10, 20000); |
| 909 ASSERT_GT(encoder_config->streams[0].max_bitrate_bps, | 909 ASSERT_GT(encoder_config->streams[0].max_bitrate_bps, |
| 910 min_bitrate_bps + threshold_window + 5000); | 910 min_bitrate_bps + threshold_window + 5000); |
| 911 set_high_remb_bps(min_bitrate_bps + threshold_window + 5000); | 911 set_high_remb_bps(min_bitrate_bps + threshold_window + 5000); |
| 912 } | 912 } |
| 913 | 913 |
| 914 void PerformTest() override { | 914 void PerformTest() override { |
| 915 EXPECT_TRUE(Wait()) << "Timed out during suspend-below-min-bitrate test."; | 915 EXPECT_TRUE(Wait()) << "Timed out during suspend-below-min-bitrate test."; |
| 916 } | 916 } |
| 917 | 917 |
| 918 enum TestState { | 918 enum TestState { |
| (...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2296 observation_complete_.Set(); | 2296 observation_complete_.Set(); |
| 2297 } | 2297 } |
| 2298 } | 2298 } |
| 2299 } test; | 2299 } test; |
| 2300 | 2300 |
| 2301 RunBaseTest(&test); | 2301 RunBaseTest(&test); |
| 2302 } | 2302 } |
| 2303 #endif // !defined(RTC_DISABLE_VP9) | 2303 #endif // !defined(RTC_DISABLE_VP9) |
| 2304 | 2304 |
| 2305 } // namespace webrtc | 2305 } // namespace webrtc |
| OLD | NEW |