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

Unified Diff: webrtc/video/full_stack_quality_sampler.cc

Issue 1308403003: Refactoring full stack and loopback tests (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase updates Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/full_stack_plot.py ('k') | webrtc/video/loopback.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/full_stack_quality_sampler.cc
diff --git a/webrtc/video/full_stack_quality_sampler.cc b/webrtc/video/full_stack_quality_sampler.cc
deleted file mode 100644
index a17975699ab52f122ea270125b77f7d5f0d580de..0000000000000000000000000000000000000000
--- a/webrtc/video/full_stack_quality_sampler.cc
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "gflags/gflags.h"
-#include "webrtc/test/field_trial.h"
-#include "webrtc/test/run_test.h"
-#include "webrtc/video/full_stack.h"
-
-namespace webrtc {
-namespace flags {
-
-DEFINE_string(title, "Full stack graph", "Graph title.");
-std::string Title() {
- return static_cast<std::string>(FLAGS_title);
-}
-
-DEFINE_string(filename, "graph_data.txt", "Name of a target graph data file.");
-std::string Filename() {
- return static_cast<std::string>(FLAGS_filename);
-}
-
-DEFINE_string(clip_name, "screenshare_slides", "Clip name, resource name.");
-std::string ClipName() {
- return static_cast<std::string>(FLAGS_clip_name);
-}
-
-DEFINE_int32(width, 1850, "Video width (crops source).");
-size_t Width() {
- return static_cast<size_t>(FLAGS_width);
-}
-
-DEFINE_int32(height, 1110, "Video height (crops source).");
-size_t Height() {
- return static_cast<size_t>(FLAGS_height);
-}
-
-DEFINE_int32(fps, 5, "Frames per second.");
-int Fps() {
- return static_cast<int>(FLAGS_fps);
-}
-
-DEFINE_int32(
- content_mode,
- 1,
- "0 - real time video, 1 - screenshare static, 2 - screenshare scrolling.");
-ContentMode ContentModeFlag() {
- switch (FLAGS_content_mode) {
- case 0:
- return ContentMode::kRealTimeVideo;
- case 1:
- return ContentMode::kScreensharingStaticImage;
- case 2:
- return ContentMode::kScreensharingScrollingImage;
- default:
- RTC_NOTREACHED() << "Unknown content mode!";
- return ContentMode::kScreensharingStaticImage;
- }
-}
-
-DEFINE_int32(test_duration, 60, "Duration of the test in seconds.");
-int TestDuration() {
- return static_cast<int>(FLAGS_test_duration);
-}
-
-DEFINE_int32(min_bitrate, 50000, "Minimum video bitrate.");
-int MinBitrate() {
- return static_cast<int>(FLAGS_min_bitrate);
-}
-
-DEFINE_int32(target_bitrate,
- 500000,
- "Target video bitrate. (Default value here different than in full "
- "stack tests!)");
-int TargetBitrate() {
- return static_cast<int>(FLAGS_target_bitrate);
-}
-
-DEFINE_int32(max_bitrate,
- 500000,
- "Maximum video bitrate. (Default value here different than in "
- "full stack tests!)");
-int MaxBitrate() {
- return static_cast<int>(FLAGS_max_bitrate);
-}
-
-DEFINE_string(codec, "VP9", "Video codec to use.");
-std::string Codec() {
- return static_cast<std::string>(FLAGS_codec);
-}
-
-DEFINE_string(
- force_fieldtrials,
- "",
- "Field trials control experimental feature code which can be forced. "
- "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/"
- " will assign the group Enable to field trial WebRTC-FooFeature. Multiple "
- "trials are separated by \"/\"");
-} // namespace flags
-
-class FullStackGenGraph : public FullStackTest {
- public:
- void TestBody() override {
- std::string title = flags::Title();
- std::string clip_name = flags::ClipName();
- FullStackTestParams params = {
- title.c_str(),
- {clip_name.c_str(), flags::Width(), flags::Height(), flags::Fps()},
- flags::ContentModeFlag(),
- flags::MinBitrate(),
- flags::TargetBitrate(),
- flags::MaxBitrate(),
- 0.0, // avg_psnr_threshold
- 0.0, // avg_ssim_threshold
- flags::TestDuration(),
- flags::Codec()};
- params.graph_data_output_filename = flags::Filename();
-
- RunTest(params);
- }
-};
-
-void FullStackRun(void) {
- FullStackGenGraph full_stack;
- full_stack.TestBody();
-}
-} // namespace webrtc
-
-int main(int argc, char* argv[]) {
- ::testing::InitGoogleTest(&argc, argv);
- google::ParseCommandLineFlags(&argc, &argv, true);
- webrtc::test::InitFieldTrialsFromString(
- webrtc::flags::FLAGS_force_fieldtrials);
- webrtc::test::RunTest(webrtc::FullStackRun);
- return 0;
-}
« no previous file with comments | « webrtc/video/full_stack_plot.py ('k') | webrtc/video/loopback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698