| 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 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 params.screenshare.slide_change_interval * params.common.fps)); | 659 params.screenshare.slide_change_interval * params.common.fps)); |
| 660 } else { | 660 } else { |
| 661 RTC_CHECK_LE(params.common.width, kWidth); | 661 RTC_CHECK_LE(params.common.width, kWidth); |
| 662 RTC_CHECK_LE(params.common.height, kHeight); | 662 RTC_CHECK_LE(params.common.height, kHeight); |
| 663 RTC_CHECK_GT(params.screenshare.slide_change_interval, 0); | 663 RTC_CHECK_GT(params.screenshare.slide_change_interval, 0); |
| 664 const int kPauseDurationMs = (params.screenshare.slide_change_interval - | 664 const int kPauseDurationMs = (params.screenshare.slide_change_interval - |
| 665 params.screenshare.scroll_duration) * 1000; | 665 params.screenshare.scroll_duration) * 1000; |
| 666 RTC_CHECK_LE(params.screenshare.scroll_duration, | 666 RTC_CHECK_LE(params.screenshare.scroll_duration, |
| 667 params.screenshare.slide_change_interval); | 667 params.screenshare.slide_change_interval); |
| 668 | 668 |
| 669 frame_generator_.reset( | 669 if (params.screenshare.scroll_duration) { |
| 670 test::FrameGenerator::CreateScrollingInputFromYuvFiles( | 670 frame_generator_.reset( |
| 671 clock_, slides, kWidth, kHeight, params.common.width, | 671 test::FrameGenerator::CreateScrollingInputFromYuvFiles( |
| 672 params.common.height, params.screenshare.scroll_duration * 1000, | 672 clock_, slides, kWidth, kHeight, params.common.width, |
| 673 kPauseDurationMs)); | 673 params.common.height, params.screenshare.scroll_duration * 1000, |
| 674 kPauseDurationMs)); |
| 675 } else { |
| 676 frame_generator_.reset(test::FrameGenerator::CreateFromYuvFile( |
| 677 slides, kWidth, kHeight, |
| 678 params.screenshare.slide_change_interval * params.common.fps)); |
| 679 } |
| 674 } | 680 } |
| 675 } | 681 } |
| 676 | 682 |
| 677 void VideoQualityTest::CreateCapturer(const Params& params, | 683 void VideoQualityTest::CreateCapturer(const Params& params, |
| 678 VideoCaptureInput* input) { | 684 VideoCaptureInput* input) { |
| 679 if (params.screenshare.enabled) { | 685 if (params.screenshare.enabled) { |
| 680 frame_generator_capturer_.reset(new test::FrameGeneratorCapturer( | 686 frame_generator_capturer_.reset(new test::FrameGeneratorCapturer( |
| 681 clock_, input, frame_generator_.release(), params.common.fps)); | 687 clock_, input, frame_generator_.release(), params.common.fps)); |
| 682 EXPECT_TRUE(frame_generator_capturer_->Init()); | 688 EXPECT_TRUE(frame_generator_capturer_->Init()); |
| 683 } else { | 689 } else { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 send_stream_->Stop(); | 813 send_stream_->Stop(); |
| 808 receive_stream->Stop(); | 814 receive_stream->Stop(); |
| 809 | 815 |
| 810 call->DestroyVideoReceiveStream(receive_stream); | 816 call->DestroyVideoReceiveStream(receive_stream); |
| 811 call->DestroyVideoSendStream(send_stream_); | 817 call->DestroyVideoSendStream(send_stream_); |
| 812 | 818 |
| 813 transport.StopSending(); | 819 transport.StopSending(); |
| 814 } | 820 } |
| 815 | 821 |
| 816 } // namespace webrtc | 822 } // namespace webrtc |
| OLD | NEW |