Lint fix for webrtc/modules/video_coding PART 3!
Trying to submit all changes at once proved impossible since there were too many changes in too many files. The changes to PRESUBMIT.py will be uploaded in the last CL. (original CL: https://codereview.webrtc.org/1528503003/) BUG=webrtc:5309 TBR=mflodman@webrtc.org Review URL: https://codereview.webrtc.org/1540243002 Cr-Commit-Position: refs/heads/master@{#11105}
This commit is contained in:
@ -8,7 +8,6 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -21,12 +20,15 @@ DEFINE_string(codec, "VP8", "Codec to use (VP8 or I420).");
|
||||
DEFINE_int32(width, 352, "Width in pixels of the frames in the input file.");
|
||||
DEFINE_int32(height, 288, "Height in pixels of the frames in the input file.");
|
||||
DEFINE_int32(rtt, 0, "RTT (round-trip time), in milliseconds.");
|
||||
DEFINE_string(input_filename, webrtc::test::ProjectRootPath() +
|
||||
"/resources/foreman_cif.yuv", "Input file.");
|
||||
DEFINE_string(output_filename, webrtc::test::OutputPath() +
|
||||
"video_coding_test_output_352x288.yuv", "Output file.");
|
||||
DEFINE_string(input_filename,
|
||||
webrtc::test::ProjectRootPath() + "/resources/foreman_cif.yuv",
|
||||
"Input file.");
|
||||
DEFINE_string(output_filename,
|
||||
webrtc::test::OutputPath() +
|
||||
"video_coding_test_output_352x288.yuv",
|
||||
"Output file.");
|
||||
|
||||
using namespace webrtc;
|
||||
namespace webrtc {
|
||||
|
||||
/*
|
||||
* Build with EVENT_DEBUG defined
|
||||
@ -36,36 +38,37 @@ using namespace webrtc;
|
||||
int vcmMacrosTests = 0;
|
||||
int vcmMacrosErrors = 0;
|
||||
|
||||
int ParseArguments(CmdArgs& args) {
|
||||
args.width = FLAGS_width;
|
||||
args.height = FLAGS_height;
|
||||
if (args.width < 1 || args.height < 1) {
|
||||
int ParseArguments(CmdArgs* args) {
|
||||
args->width = FLAGS_width;
|
||||
args->height = FLAGS_height;
|
||||
if (args->width < 1 || args->height < 1) {
|
||||
return -1;
|
||||
}
|
||||
args.codecName = FLAGS_codec;
|
||||
if (args.codecName == "VP8") {
|
||||
args.codecType = kVideoCodecVP8;
|
||||
} else if (args.codecName == "VP9") {
|
||||
args.codecType = kVideoCodecVP9;
|
||||
} else if (args.codecName == "I420") {
|
||||
args.codecType = kVideoCodecI420;
|
||||
args->codecName = FLAGS_codec;
|
||||
if (args->codecName == "VP8") {
|
||||
args->codecType = kVideoCodecVP8;
|
||||
} else if (args->codecName == "VP9") {
|
||||
args->codecType = kVideoCodecVP9;
|
||||
} else if (args->codecName == "I420") {
|
||||
args->codecType = kVideoCodecI420;
|
||||
} else {
|
||||
printf("Invalid codec: %s\n", args.codecName.c_str());
|
||||
printf("Invalid codec: %s\n", args->codecName.c_str());
|
||||
return -1;
|
||||
}
|
||||
args.inputFile = FLAGS_input_filename;
|
||||
args.outputFile = FLAGS_output_filename;
|
||||
args.rtt = FLAGS_rtt;
|
||||
args->inputFile = FLAGS_input_filename;
|
||||
args->outputFile = FLAGS_output_filename;
|
||||
args->rtt = FLAGS_rtt;
|
||||
return 0;
|
||||
}
|
||||
} // namespace webrtc
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int main(int argc, char** argv) {
|
||||
// Initialize WebRTC fileutils.h so paths to resources can be resolved.
|
||||
webrtc::test::SetExecutablePath(argv[0]);
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
|
||||
CmdArgs args;
|
||||
if (ParseArguments(args) != 0) {
|
||||
if (webrtc::ParseArguments(&args) != 0) {
|
||||
printf("Unable to parse input arguments\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user