diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-08-21 10:08:51 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-08-21 10:08:51 +0200 |
commit | fa5f92318e7cc08ac872be18d47387cf83c23cd0 (patch) | |
tree | 118b12cf95b478fd20916f745c0d1a7873e16040 /src/odr-audioenc.cpp | |
parent | 781c2c69c62a434bed64ff3cfa6d009ed3c479c1 (diff) | |
download | ODR-AudioEnc-fa5f92318e7cc08ac872be18d47387cf83c23cd0.tar.gz ODR-AudioEnc-fa5f92318e7cc08ac872be18d47387cf83c23cd0.tar.bz2 ODR-AudioEnc-fa5f92318e7cc08ac872be18d47387cf83c23cd0.zip |
Add tist support for EDI output, take code from odr-mmbtools-common
Diffstat (limited to 'src/odr-audioenc.cpp')
-rw-r--r-- | src/odr-audioenc.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp index 6a5f6ea..c3d4cb6 100644 --- a/src/odr-audioenc.cpp +++ b/src/odr-audioenc.cpp @@ -188,6 +188,8 @@ void usage(const char* name) " If more than one ZMQ output is given, the socket\n" " will be connected to all listed endpoints.\n" " -e, --edi=URI EDI output uri, (e.g. 'tcp://localhost:7000')\n" + " -T, --timestamp-delay=DELAY_MS Enabled timestamps in EDI (requires TAI clock bulletin download) and\n" + " add a delay (in milliseconds) to the timestamps carried in EDI\n" " -k, --secret-key=FILE Enable ZMQ encryption with the given secret key.\n" " -p, --pad=BYTES Enable PAD insertion and set PAD size in bytes.\n" " -P, --pad-fifo=FILENAME Set PAD data input fifo name" @@ -432,6 +434,9 @@ public: shared_ptr<Output::ZMQ> zmq_output; Output::EDI edi_output; + bool tist_enabled = false; + uint32_t tist_delay_ms = 0; + vector<string> output_uris; vector<string> edi_output_uris; @@ -1310,6 +1315,7 @@ int main(int argc, char *argv[]) {"dabpsy", required_argument, 0, 5 }, {"device", required_argument, 0, 'd'}, {"edi", required_argument, 0, 'e'}, + {"timestamp-delay", required_argument, 0, 'T'}, {"decode", required_argument, 0, 6 }, {"format", required_argument, 0, 'f'}, {"input", required_argument, 0, 'i'}, @@ -1419,6 +1425,10 @@ int main(int argc, char *argv[]) case 'e': audio_enc.edi_output_uris.push_back(optarg); break; + case 'T': + audio_enc.tist_enabled = true; + audio_enc.tist_delay_ms = std::stoi(optarg); + break; case 'f': if (strcmp(optarg, "raw") == 0) { audio_enc.raw_input = 1; |