Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: webrtc/video/video_quality_test.cc

Issue 2814023003: Add command-line param to screenshare_loopback to specify a list of slides (Closed)
Patch Set: Use tokenize() from base to split string by comma instead of doing it manually Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« webrtc/video/screenshare_loopback.cc ('K') | « webrtc/video/video_quality_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698