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 
13 #include <string>
14 
15 #include "absl/flags/flag.h"
16 #include "absl/flags/parse.h"
17 #include "absl/flags/usage.h"
18 #include "rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h"
19 
20 ABSL_FLAG(std::string,
21           video_file,
22           "",
23           "Path of the video file to be analyzed, only y4m file format is "
24           "supported");
25 
main(int argc,char * argv[])26 int main(int argc, char* argv[]) {
27   absl::SetProgramUsageMessage(
28       "Outputs the freezing score by comparing "
29       "current frame with the previous frame.\n"
30       "Example usage:\n"
31       "./reference_less_video_analysis "
32       "--video_file=video_file.y4m\n");
33   absl::ParseCommandLine(argc, argv);
34 
35   std::string video_file = absl::GetFlag(FLAGS_video_file);
36   if (video_file.empty()) {
37     exit(EXIT_FAILURE);
38   }
39 
40   return run_analysis(video_file);
41 }
42