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}
diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn
index f774343..a982265 100644
--- a/rtc_tools/BUILD.gn
+++ b/rtc_tools/BUILD.gn
@@ -231,6 +231,7 @@
":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",
]
}
diff --git a/rtc_tools/frame_analyzer/reference_less_video_analysis.cc b/rtc_tools/frame_analyzer/reference_less_video_analysis.cc
index 42ee18f..fca89a8 100644
--- a/rtc_tools/frame_analyzer/reference_less_video_analysis.cc
+++ b/rtc_tools/frame_analyzer/reference_less_video_analysis.cc
@@ -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 @@
"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()) {