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 | 10 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 TestCaptureNtpTime(net_config, kThresholdMs, kStartTimeMs, kRunTimeMs); | 469 TestCaptureNtpTime(net_config, kThresholdMs, kStartTimeMs, kRunTimeMs); |
470 } | 470 } |
471 | 471 |
472 TEST_F(CallPerfTest, ReceivesCpuOveruseAndUnderuse) { | 472 TEST_F(CallPerfTest, ReceivesCpuOveruseAndUnderuse) { |
473 class LoadObserver : public test::SendTest, | 473 class LoadObserver : public test::SendTest, |
474 public test::FrameGeneratorCapturer::SinkWantsObserver { | 474 public test::FrameGeneratorCapturer::SinkWantsObserver { |
475 public: | 475 public: |
476 LoadObserver() | 476 LoadObserver() |
477 : SendTest(kLongTimeoutMs), | 477 : SendTest(kLongTimeoutMs), |
478 expect_lower_resolution_wants_(true), | 478 expect_lower_resolution_wants_(true), |
479 encoder_(Clock::GetRealTimeClock(), 40 /* delay_ms */) {} | 479 encoder_(Clock::GetRealTimeClock(), 35 /* delay_ms */) {} |
480 | 480 |
481 void OnFrameGeneratorCapturerCreated( | 481 void OnFrameGeneratorCapturerCreated( |
482 test::FrameGeneratorCapturer* frame_generator_capturer) override { | 482 test::FrameGeneratorCapturer* frame_generator_capturer) override { |
483 frame_generator_capturer->SetSinkWantsObserver(this); | 483 frame_generator_capturer->SetSinkWantsObserver(this); |
484 // Set a high initial resolution to be sure that we can scale down. | 484 // Set a high initial resolution to be sure that we can scale down. |
485 frame_generator_capturer->ChangeResolution(1920, 1080); | 485 frame_generator_capturer->ChangeResolution(1920, 1080); |
486 } | 486 } |
487 | 487 |
488 // OnSinkWantsChanged is called when FrameGeneratorCapturer::AddOrUpdateSink | 488 // OnSinkWantsChanged is called when FrameGeneratorCapturer::AddOrUpdateSink |
489 // is called. | 489 // is called. |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 uint32_t last_set_bitrate_kbps_; | 736 uint32_t last_set_bitrate_kbps_; |
737 VideoSendStream* send_stream_; | 737 VideoSendStream* send_stream_; |
738 test::FrameGeneratorCapturer* frame_generator_; | 738 test::FrameGeneratorCapturer* frame_generator_; |
739 VideoEncoderConfig encoder_config_; | 739 VideoEncoderConfig encoder_config_; |
740 } test; | 740 } test; |
741 | 741 |
742 RunBaseTest(&test); | 742 RunBaseTest(&test); |
743 } | 743 } |
744 | 744 |
745 } // namespace webrtc | 745 } // namespace webrtc |
OLD | NEW |