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 " --input_file=input_file.txt\n" |
| 23 "Command line flags:\n" |
| 24 " - input_file(string): File containing absolute path of the video " |
| 25 "files 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("input_file", ""); |
| 34 parser.ProcessFlags(); |
| 35 if (parser.GetFlag("input_file").empty()) { |
| 36 parser.PrintUsageMessage(); |
| 37 exit(EXIT_SUCCESS); |
| 38 } |
| 39 std::string video_names_file = parser.GetFlag("input_file"); |
| 40 const char* video_file = video_names_file.c_str(); |
| 41 |
| 42 run_analysis(video_file); |
| 43 return 0; |
| 44 } |
OLD | NEW |