Add command-line param to screenshare_loopback to specify a list of slides
BUG=none Review-Url: https://codereview.webrtc.org/2814023003 Cr-Commit-Position: refs/heads/master@{#17670}
This commit is contained in:
parent
e52b8ace0a
commit
8d8185c774
@ -11,6 +11,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "gflags/gflags.h"
|
||||
#include "webrtc/base/stringencode.h"
|
||||
#include "webrtc/test/field_trial.h"
|
||||
#include "webrtc/test/gtest.h"
|
||||
#include "webrtc/test/run_test.h"
|
||||
@ -214,6 +215,16 @@ int ScrollDuration() {
|
||||
return static_cast<int>(FLAGS_scroll_duration);
|
||||
}
|
||||
|
||||
DEFINE_string(slides,
|
||||
"",
|
||||
"Comma-separated list of *.yuv files to display as slides.");
|
||||
std::vector<std::string> Slides() {
|
||||
std::vector<std::string> slides;
|
||||
std::string slides_list = FLAGS_slides;
|
||||
rtc::tokenize(slides_list, ',', &slides);
|
||||
return slides;
|
||||
}
|
||||
|
||||
} // namespace flags
|
||||
|
||||
void Loopback() {
|
||||
@ -249,7 +260,7 @@ void Loopback() {
|
||||
flags::EncodedFramePath(),
|
||||
""};
|
||||
params.screenshare = {true, flags::SlideChangeInterval(),
|
||||
flags::ScrollDuration()};
|
||||
flags::ScrollDuration(), flags::Slides()};
|
||||
params.analyzer = {"screenshare", 0.0, 0.0, flags::DurationSecs(),
|
||||
flags::OutputFilename(), flags::GraphTitle()};
|
||||
params.pipe = pipe_config;
|
||||
|
||||
@ -1505,12 +1505,13 @@ void VideoQualityTest::SetupScreenshareOrSVC() {
|
||||
// Setup frame generator.
|
||||
const size_t kWidth = 1850;
|
||||
const size_t kHeight = 1110;
|
||||
std::vector<std::string> slides;
|
||||
slides.push_back(test::ResourcePath("web_screenshot_1850_1110", "yuv"));
|
||||
slides.push_back(test::ResourcePath("presentation_1850_1110", "yuv"));
|
||||
slides.push_back(test::ResourcePath("photo_1850_1110", "yuv"));
|
||||
slides.push_back(test::ResourcePath("difficult_photo_1850_1110", "yuv"));
|
||||
|
||||
std::vector<std::string> slides = params_.screenshare.slides;
|
||||
if (slides.size() == 0) {
|
||||
slides.push_back(test::ResourcePath("web_screenshot_1850_1110", "yuv"));
|
||||
slides.push_back(test::ResourcePath("presentation_1850_1110", "yuv"));
|
||||
slides.push_back(test::ResourcePath("photo_1850_1110", "yuv"));
|
||||
slides.push_back(test::ResourcePath("difficult_photo_1850_1110", "yuv"));
|
||||
}
|
||||
if (params_.screenshare.scroll_duration == 0) {
|
||||
// Cycle image every slide_change_interval seconds.
|
||||
frame_generator_ = test::FrameGenerator::CreateFromYuvFile(
|
||||
|
||||
@ -62,6 +62,7 @@ class VideoQualityTest : public test::CallTest {
|
||||
bool enabled;
|
||||
int32_t slide_change_interval;
|
||||
int32_t scroll_duration;
|
||||
std::vector<std::string> slides;
|
||||
} screenshare;
|
||||
struct Analyzer {
|
||||
std::string test_label;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user