diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-07-28 11:17:24 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-07-28 11:17:24 +0200 |
commit | 9aee86aace7d6c504b410c972d0ab5065f7f7b94 (patch) | |
tree | 41390a781e3899f4f0827012891e2ad3d208366b /src/DabMultiplexer.cpp | |
parent | c49acf830b68d25dbb18ed3e74683cba89187626 (diff) | |
download | dabmux-9aee86aace7d6c504b410c972d0ab5065f7f7b94.tar.gz dabmux-9aee86aace7d6c504b410c972d0ab5065f7f7b94.tar.bz2 dabmux-9aee86aace7d6c504b410c972d0ab5065f7f7b94.zip |
Add edi time and utco as ZMQ metadata
Since ODR-DabMod doesn't check the zmq message length, it will accept
additional metadata at the end of the ETI data
Diffstat (limited to 'src/DabMultiplexer.cpp')
-rw-r--r-- | src/DabMultiplexer.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp index 3421338..58a1c8f 100644 --- a/src/DabMultiplexer.cpp +++ b/src/DabMultiplexer.cpp @@ -658,9 +658,19 @@ void DabMultiplexer::mux_frame(std::vector<std::shared_ptr<DabOutput> >& outputs edi_tagDETI.set_seconds(edi_time); // In case get_offset fails, we still want to update the EDI seconds - edi_tagDETI.set_tai_utc_offset(m_clock_tai.get_offset()); - } + const auto utco = m_clock_tai.get_offset(); + edi_tagDETI.set_tai_utc_offset(utco); + + for (auto output : outputs) { + shared_ptr<OutputMetadata> md_utco = + make_shared<OutputMetadataUTCO>(utco); + output->setMetadata(md_utco); + shared_ptr<OutputMetadata> md_edi_time = + make_shared<OutputMetadataEDITime>(edi_tagDETI.seconds); + output->setMetadata(md_edi_time); + } + } } catch (std::runtime_error& e) { etiLog.level(error) << "Could not get UTC-TAI offset for EDI timestamp"; @@ -692,8 +702,6 @@ void DabMultiplexer::mux_frame(std::vector<std::shared_ptr<DabOutput> >& outputs edi_time += chrono::seconds(1); } - - /********************************************************************** *********** Section FRPD ***************************************** **********************************************************************/ |