blob: fca89a8f2ff314d6216608a714733d77ced0682c [file] [log] [blame]
charujain0f01c7f2016-12-02 13:00:001/*
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>
charujain0f01c7f2016-12-02 13:00:0012
Mirko Bonadei6d6b0fb2019-06-25 06:49:0313#include <string>
14
15#include "absl/flags/flag.h"
16#include "absl/flags/parse.h"
Mirko Bonadei7ddca162019-07-19 08:32:1617#include "absl/flags/usage.h"
Mirko Bonadei92ea95e2017-09-15 04:47:3118#include "rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h"
Mirko Bonadei6d6b0fb2019-06-25 06:49:0319
20ABSL_FLAG(std::string,
21 video_file,
22 "",
23 "Path of the video file to be analyzed, only y4m file format is "
24 "supported");
charujain0f01c7f2016-12-02 13:00:0025
Robin Raymond1c62ffa2017-12-03 21:45:5626int main(int argc, char* argv[]) {
Mirko Bonadei7ddca162019-07-19 08:32:1627 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");
Mirko Bonadei6d6b0fb2019-06-25 06:49:0333 absl::ParseCommandLine(argc, argv);
charujain0f01c7f2016-12-02 13:00:0034
Mirko Bonadei6d6b0fb2019-06-25 06:49:0335 std::string video_file = absl::GetFlag(FLAGS_video_file);
36 if (video_file.empty()) {
37 exit(EXIT_FAILURE);
charujain0f01c7f2016-12-02 13:00:0038 }
charujain0f01c7f2016-12-02 13:00:0039
40 return run_analysis(video_file);
41}