Add usage message to rtc_event_log2rtp_dump.
Bug: webrtc:10616 Change-Id: I363715bedd28b9c74cefd3b4fd510f16963909f7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146210 Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28633}
This commit is contained in:

committed by
Commit Bot

parent
7ea6b290d0
commit
f24729bba7
@ -411,6 +411,7 @@ if (rtc_enable_protobuf) {
|
|||||||
"../test:rtp_test_utils",
|
"../test:rtp_test_utils",
|
||||||
"//third_party/abseil-cpp/absl/flags:flag",
|
"//third_party/abseil-cpp/absl/flags:flag",
|
||||||
"//third_party/abseil-cpp/absl/flags:parse",
|
"//third_party/abseil-cpp/absl/flags:parse",
|
||||||
|
"//third_party/abseil-cpp/absl/flags:usage",
|
||||||
"//third_party/abseil-cpp/absl/memory",
|
"//third_party/abseil-cpp/absl/memory",
|
||||||
"//third_party/abseil-cpp/absl/types:optional",
|
"//third_party/abseil-cpp/absl/types:optional",
|
||||||
]
|
]
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "absl/flags/flag.h"
|
#include "absl/flags/flag.h"
|
||||||
#include "absl/flags/parse.h"
|
#include "absl/flags/parse.h"
|
||||||
|
#include "absl/flags/usage.h"
|
||||||
#include "absl/memory/memory.h"
|
#include "absl/memory/memory.h"
|
||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "api/array_view.h"
|
#include "api/array_view.h"
|
||||||
@ -164,19 +165,14 @@ void ConvertRtpPacket(
|
|||||||
|
|
||||||
// This utility will convert a stored event log to the rtpdump format.
|
// This utility will convert a stored event log to the rtpdump format.
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
// TODO(bugs.webrtc.org/10616): Add program usage message when Abseil
|
absl::SetProgramUsageMessage(
|
||||||
// flags supports it.
|
"Tool for converting an RtcEventLog file to an "
|
||||||
|
"RTP dump file.\n"
|
||||||
|
"Example usage:\n"
|
||||||
|
"./rtc_event_log2rtp_dump input.rel output.rtp\n");
|
||||||
std::vector<char*> args = absl::ParseCommandLine(argc, argv);
|
std::vector<char*> args = absl::ParseCommandLine(argc, argv);
|
||||||
std::string program_name = args[0];
|
|
||||||
std::string usage =
|
|
||||||
"Tool for converting an RtcEventLog file to an RTP dump file.\n"
|
|
||||||
"Run " +
|
|
||||||
program_name +
|
|
||||||
" --help for usage.\n"
|
|
||||||
"Example usage:\n" +
|
|
||||||
program_name + " input.rel output.rtp\n";
|
|
||||||
if (args.size() != 3) {
|
if (args.size() != 3) {
|
||||||
std::cout << usage;
|
std::cout << absl::ProgramUsageMessage();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user