2013-05-23 12:20:16 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2013 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.
|
|
|
|
|
*/
|
|
|
|
|
|
2013-10-28 16:32:01 +00:00
|
|
|
#include "webrtc/test/flags.h"
|
2013-05-23 12:20:16 +00:00
|
|
|
|
|
|
|
|
#include "gflags/gflags.h"
|
|
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
namespace test {
|
|
|
|
|
namespace flags {
|
|
|
|
|
|
2013-09-05 10:27:46 +00:00
|
|
|
void Init(int* argc, char*** argv) {
|
|
|
|
|
// AllowCommandLineParsing allows us to ignore flags passed on to us by
|
|
|
|
|
// Chromium build bots without having to explicitly disable them.
|
|
|
|
|
google::AllowCommandLineReparsing();
|
2013-05-23 12:20:16 +00:00
|
|
|
google::ParseCommandLineFlags(argc, argv, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DEFINE_int32(width, 640, "Video width.");
|
2013-09-05 10:27:46 +00:00
|
|
|
size_t Width() { return static_cast<size_t>(FLAGS_width); }
|
2013-05-23 12:20:16 +00:00
|
|
|
|
|
|
|
|
DEFINE_int32(height, 480, "Video height.");
|
2013-09-05 10:27:46 +00:00
|
|
|
size_t Height() { return static_cast<size_t>(FLAGS_height); }
|
2013-05-23 12:20:16 +00:00
|
|
|
|
|
|
|
|
DEFINE_int32(fps, 30, "Frames per second.");
|
2013-09-05 10:27:46 +00:00
|
|
|
int Fps() { return static_cast<int>(FLAGS_fps); }
|
2013-05-23 12:20:16 +00:00
|
|
|
|
|
|
|
|
DEFINE_int32(min_bitrate, 50, "Minimum video bitrate.");
|
2013-09-05 10:27:46 +00:00
|
|
|
size_t MinBitrate() { return static_cast<size_t>(FLAGS_min_bitrate); }
|
2013-05-23 12:20:16 +00:00
|
|
|
|
|
|
|
|
DEFINE_int32(start_bitrate, 300, "Video starting bitrate.");
|
2013-09-05 10:27:46 +00:00
|
|
|
size_t StartBitrate() { return static_cast<size_t>(FLAGS_start_bitrate); }
|
2013-05-23 12:20:16 +00:00
|
|
|
|
|
|
|
|
DEFINE_int32(max_bitrate, 800, "Maximum video bitrate.");
|
2013-09-05 10:27:46 +00:00
|
|
|
size_t MaxBitrate() { return static_cast<size_t>(FLAGS_max_bitrate); }
|
2013-05-23 12:20:16 +00:00
|
|
|
} // flags
|
|
|
|
|
} // test
|
|
|
|
|
} // webrtc
|