| 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> | 10 #include <algorithm> |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 LoadObserver(LoadObserver::Load tested_load, int encode_delay_ms) | 481 LoadObserver(LoadObserver::Load tested_load, int encode_delay_ms) |
| 482 : SendTest(kLongTimeoutMs), | 482 : SendTest(kLongTimeoutMs), |
| 483 tested_load_(tested_load), | 483 tested_load_(tested_load), |
| 484 encoder_(Clock::GetRealTimeClock(), encode_delay_ms) {} | 484 encoder_(Clock::GetRealTimeClock(), encode_delay_ms) {} |
| 485 | 485 |
| 486 void OnLoadUpdate(Load load) override { | 486 void OnLoadUpdate(Load load) override { |
| 487 if (load == tested_load_) | 487 if (load == tested_load_) |
| 488 observation_complete_->Set(); | 488 observation_complete_->Set(); |
| 489 } | 489 } |
| 490 | 490 |
| 491 Call::Config GetSenderCallConfig() override { | |
| 492 Call::Config config; | |
| 493 config.overuse_callback = this; | |
| 494 return config; | |
| 495 } | |
| 496 | |
| 497 void ModifyConfigs(VideoSendStream::Config* send_config, | 491 void ModifyConfigs(VideoSendStream::Config* send_config, |
| 498 std::vector<VideoReceiveStream::Config>* receive_configs, | 492 std::vector<VideoReceiveStream::Config>* receive_configs, |
| 499 VideoEncoderConfig* encoder_config) override { | 493 VideoEncoderConfig* encoder_config) override { |
| 494 send_config->overuse_callback = this; |
| 500 send_config->encoder_settings.encoder = &encoder_; | 495 send_config->encoder_settings.encoder = &encoder_; |
| 501 } | 496 } |
| 502 | 497 |
| 503 void PerformTest() override { | 498 void PerformTest() override { |
| 504 EXPECT_EQ(kEventSignaled, Wait()) | 499 EXPECT_EQ(kEventSignaled, Wait()) |
| 505 << "Timed out before receiving an overuse callback."; | 500 << "Timed out before receiving an overuse callback."; |
| 506 } | 501 } |
| 507 | 502 |
| 508 LoadObserver::Load tested_load_; | 503 LoadObserver::Load tested_load_; |
| 509 test::DelayedEncoder encoder_; | 504 test::DelayedEncoder encoder_; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 int encoder_inits_; | 699 int encoder_inits_; |
| 705 uint32_t last_set_bitrate_; | 700 uint32_t last_set_bitrate_; |
| 706 VideoSendStream* send_stream_; | 701 VideoSendStream* send_stream_; |
| 707 VideoEncoderConfig encoder_config_; | 702 VideoEncoderConfig encoder_config_; |
| 708 } test; | 703 } test; |
| 709 | 704 |
| 710 RunBaseTest(&test); | 705 RunBaseTest(&test); |
| 711 } | 706 } |
| 712 | 707 |
| 713 } // namespace webrtc | 708 } // namespace webrtc |
| OLD | NEW |