Add usage message to reference_less_video_analysis.

Bug: webrtc:10616
Change-Id: Ibbaba9ec6a74466021e70d01f3a8ff4c3fd212b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146205
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28611}
This commit is contained in:
Mirko Bonadei 2019-07-19 10:32:16 +02:00 committed by Commit Bot
parent 4e722459ec
commit 7ddca16e1e
2 changed files with 8 additions and 11 deletions

View file

@ -231,6 +231,7 @@ if (!build_with_chromium) {
":reference_less_video_analysis_lib",
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/flags:parse",
"//third_party/abseil-cpp/absl/flags:usage",
]
}

View file

@ -14,6 +14,7 @@
#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
#include "absl/flags/usage.h"
#include "rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h"
ABSL_FLAG(std::string,
@ -23,18 +24,13 @@ ABSL_FLAG(std::string,
"supported");
int main(int argc, char* argv[]) {
absl::SetProgramUsageMessage(
"Outputs the freezing score by comparing "
"current frame with the previous frame.\n"
"Example usage:\n"
"./reference_less_video_analysis "
"--video_file=video_file.y4m\n");
absl::ParseCommandLine(argc, argv);
// TODO(bugs.webrtc.org/10616): Add program usage message when Abseil
// flags supports it.
// This captures the freezing metrics for reference less video analysis.
// std::string usage =
// "Outputs the freezing score by comparing current frame "
// "with the previous frame.\nExample usage:\n" +
// program_name +
// " --video_file=video_file.y4m\n"
// "Command line flags:\n"
// " - video_file(string): Path of the video "
// "file to be analyzed. Only y4m file format is supported.\n";
std::string video_file = absl::GetFlag(FLAGS_video_file);
if (video_file.empty()) {