diff options
| author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-09-17 15:06:08 +0200 |
|---|---|---|
| committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-09-17 15:06:08 +0200 |
| commit | e2edbaeee5d593a24bc97d8210e9a0d525996274 (patch) | |
| tree | c573338cfa37da9c3b8f807670715ebaf7dfeb03 /src/odr-sourcecompanion.cpp | |
| parent | eb1182eb8760131c591f6b8932a8694849c18e3c (diff) | |
| parent | 33706e0aea432bafe6b2f49e248192b595761f82 (diff) | |
| download | ODR-SourceCompanion-e2edbaeee5d593a24bc97d8210e9a0d525996274.tar.gz ODR-SourceCompanion-e2edbaeee5d593a24bc97d8210e9a0d525996274.tar.bz2 ODR-SourceCompanion-e2edbaeee5d593a24bc97d8210e9a0d525996274.zip | |
Merge branch 'next' into padsocket
Diffstat (limited to 'src/odr-sourcecompanion.cpp')
| -rw-r--r-- | src/odr-sourcecompanion.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/odr-sourcecompanion.cpp b/src/odr-sourcecompanion.cpp index 8c8a776..7e57698 100644 --- a/src/odr-sourcecompanion.cpp +++ b/src/odr-sourcecompanion.cpp @@ -80,6 +80,7 @@ void usage(const char* name) { " --timeout=ms Maximum frame waiting time, in milliseconds (def=2000)\n" " --pad-port=port Port opened for PAD Frame requests (def=0 not opened)\n" " --jitter-size=nbFrames Jitter buffer size, in 24ms frames (def=40)\n" + " --version Print version information and quit\n" " Encoder parameters:\n" " -b, --bitrate={ 8, 16, ..., 192 } Output bitrate in kbps. Must be a multiple of 8.\n" " -c, --channels={ 1, 2 } Nb of input channels (default: 2).\n" @@ -113,6 +114,18 @@ void usage(const char* name) { int main(int argc, char *argv[]) { + // Version handling is done very early to ensure nothing else but the version gets printed out + if (argc == 2 and strcmp(argv[1], "--version") == 0) { + fprintf(stdout, "%s\n", +#if defined(GITVERSION) + GITVERSION +#else + PACKAGE_VERSION +#endif + ); + return 0; + } + std::string avt_input_uri = ""; std::string avt_output_uri = ""; int32_t avt_timeout = 2000; |
