Skip to content

Commit

Permalink
[apps] Added SRT library version in help
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Mar 5, 2020
1 parent bee3eb8 commit 5ef0056
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion apps/srt-file-transmit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ int parse_args(FileTransmitConfig &cfg, int argc, char** argv)
if (print_help)
{
cout << "SRT sample application to transmit files.\n";
cerr << "SRT Library version: " << SRT_VERSION << endl;
cerr << "Built with SRT Library version: " << SRT_VERSION << endl;
const uint32_t srtver = srt_getversion();
const int major = srtver / 0x10000;
const int minor = (srtver / 0x100) % 0x100;
const int patch = srtver % 0x100;
cerr << "SRT Library version: " << major << "." << minor << "." << patch << endl;
cerr << "Usage: srt-file-transmit [options] <input-uri> <output-uri>\n";
cerr << "\n";

Expand Down
7 changes: 6 additions & 1 deletion apps/srt-live-transmit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ int parse_args(LiveTransmitConfig &cfg, int argc, char** argv)
if (print_help)
{
cout << "SRT sample application to transmit live streaming.\n";
cerr << "SRT Library version: " << SRT_VERSION << endl;
cerr << "Built with SRT Library version: " << SRT_VERSION << endl;
const uint32_t srtver = srt_getversion();
const int major = srtver / 0x10000;
const int minor = (srtver / 0x100) % 0x100;
const int patch = srtver % 0x100;
cerr << "SRT Library version: " << major << "." << minor << "." << patch << endl;
cerr << "Usage: srt-live-transmit [options] <input-uri> <output-uri>\n";
cerr << "\n";
#ifndef _WIN32
Expand Down

0 comments on commit 5ef0056

Please sign in to comment.