| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 #include <stdio.h> | |
| 11 #include <stdlib.h> | |
| 12 #include <string.h> | |
| 13 | |
| 14 #include "webrtc/tools/frame_analyzer/reference_less_video_analysis_lib.h" | |
| 15 #include "webrtc/tools/simple_command_line_parser.h" | |
| 16 | |
| 17 int main(int argc, char** argv) { | |
| 18 // This captures the freezing metrics for reference less video analysis. | |
| 19 std::string program_name = argv[0]; | |
| 20 std::string usage = "Outputs the freezing score by comparing current frame " | |
| 21 "with the previous frame.\nExample usage:\n" + program_name + | |
| 22 " --video_file=video_file.y4m\n" | |
| 23 "Command line flags:\n" | |
| 24 " - video_file(string): Path of the video " | |
| 25 "file to be analyzed. Only y4m file format is supported.\n"; | |
| 26 | |
| 27 webrtc::test::CommandLineParser parser; | |
| 28 | |
| 29 // Init the parser and set the usage message. | |
| 30 parser.Init(argc, argv); | |
| 31 parser.SetUsageMessage(usage); | |
| 32 | |
| 33 parser.SetFlag("video_file", ""); | |
| 34 parser.ProcessFlags(); | |
| 35 if (parser.GetFlag("video_file").empty()) { | |
| 36 parser.PrintUsageMessage(); | |
| 37 exit(EXIT_SUCCESS); | |
| 38 } | |
| 39 std::string video_file = parser.GetFlag("video_file"); | |
| 40 | |
| 41 return run_analysis(video_file); | |
| 42 } | |
| OLD | NEW |