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 "webrtc/video/video_quality_test.h" | 10 #include "webrtc/video/video_quality_test.h" |
(...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 static_cast<unsigned char>(params_.video.num_temporal_layers); | 1498 static_cast<unsigned char>(params_.video.num_temporal_layers); |
1499 vp9_settings.numberOfSpatialLayers = | 1499 vp9_settings.numberOfSpatialLayers = |
1500 static_cast<unsigned char>(params_.ss.num_spatial_layers); | 1500 static_cast<unsigned char>(params_.ss.num_spatial_layers); |
1501 video_encoder_config_.encoder_specific_settings = | 1501 video_encoder_config_.encoder_specific_settings = |
1502 new rtc::RefCountedObject< | 1502 new rtc::RefCountedObject< |
1503 VideoEncoderConfig::Vp9EncoderSpecificSettings>(vp9_settings); | 1503 VideoEncoderConfig::Vp9EncoderSpecificSettings>(vp9_settings); |
1504 } | 1504 } |
1505 // Setup frame generator. | 1505 // Setup frame generator. |
1506 const size_t kWidth = 1850; | 1506 const size_t kWidth = 1850; |
1507 const size_t kHeight = 1110; | 1507 const size_t kHeight = 1110; |
1508 std::vector<std::string> slides; | 1508 std::vector<std::string> slides = params_.screenshare.slides; |
1509 slides.push_back(test::ResourcePath("web_screenshot_1850_1110", "yuv")); | 1509 if (slides.size() == 0) { |
1510 slides.push_back(test::ResourcePath("presentation_1850_1110", "yuv")); | 1510 slides.push_back(test::ResourcePath("web_screenshot_1850_1110", "yuv")); |
1511 slides.push_back(test::ResourcePath("photo_1850_1110", "yuv")); | 1511 slides.push_back(test::ResourcePath("presentation_1850_1110", "yuv")); |
1512 slides.push_back(test::ResourcePath("difficult_photo_1850_1110", "yuv")); | 1512 slides.push_back(test::ResourcePath("photo_1850_1110", "yuv")); |
1513 | 1513 slides.push_back(test::ResourcePath("difficult_photo_1850_1110", "yuv")); |
| 1514 } |
1514 if (params_.screenshare.scroll_duration == 0) { | 1515 if (params_.screenshare.scroll_duration == 0) { |
1515 // Cycle image every slide_change_interval seconds. | 1516 // Cycle image every slide_change_interval seconds. |
1516 frame_generator_ = test::FrameGenerator::CreateFromYuvFile( | 1517 frame_generator_ = test::FrameGenerator::CreateFromYuvFile( |
1517 slides, kWidth, kHeight, | 1518 slides, kWidth, kHeight, |
1518 params_.screenshare.slide_change_interval * params_.video.fps); | 1519 params_.screenshare.slide_change_interval * params_.video.fps); |
1519 } else { | 1520 } else { |
1520 RTC_CHECK_LE(params_.video.width, kWidth); | 1521 RTC_CHECK_LE(params_.video.width, kWidth); |
1521 RTC_CHECK_LE(params_.video.height, kHeight); | 1522 RTC_CHECK_LE(params_.video.height, kHeight); |
1522 RTC_CHECK_GT(params_.screenshare.slide_change_interval, 0); | 1523 RTC_CHECK_GT(params_.screenshare.slide_change_interval, 0); |
1523 const int kPauseDurationMs = (params_.screenshare.slide_change_interval - | 1524 const int kPauseDurationMs = (params_.screenshare.slide_change_interval - |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1901 if (!params_.video.encoded_frame_base_path.empty()) { | 1902 if (!params_.video.encoded_frame_base_path.empty()) { |
1902 std::ostringstream str; | 1903 std::ostringstream str; |
1903 str << receive_logs_++; | 1904 str << receive_logs_++; |
1904 std::string path = | 1905 std::string path = |
1905 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 1906 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
1906 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 1907 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
1907 10000000); | 1908 10000000); |
1908 } | 1909 } |
1909 } | 1910 } |
1910 } // namespace webrtc | 1911 } // namespace webrtc |
OLD | NEW |