diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-09-05 11:01:56 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-09-05 11:01:56 +0200 |
commit | 32f9e6e8bfa584f0dfb155c0bb7cdc843614af5c (patch) | |
tree | 59cd09a0eaa6469ba7aed1b9b167cfc8643ec68f /src/EtiReader.cpp | |
parent | 0c532ab20b47d661f098cc6089184303dce65d56 (diff) | |
download | dabmod-32f9e6e8bfa584f0dfb155c0bb7cdc843614af5c.tar.gz dabmod-32f9e6e8bfa584f0dfb155c0bb7cdc843614af5c.tar.bz2 dabmod-32f9e6e8bfa584f0dfb155c0bb7cdc843614af5c.zip |
Rework EDI input
- Use same main loop for both ETI and EDI inputs
- Test SFN functionality with EDI input
- Add log.show_process_time setting for process time printout
Diffstat (limited to 'src/EtiReader.cpp')
-rw-r--r-- | src/EtiReader.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp index 719966b..25c1ada 100644 --- a/src/EtiReader.cpp +++ b/src/EtiReader.cpp @@ -312,7 +312,6 @@ uint32_t EtiReader::getPPSOffset() return timestamp; } -#ifdef HAVE_EDI EdiReader::EdiReader( double& tist_offset_s) : m_timestamp_decoder(tist_offset_s) @@ -654,4 +653,15 @@ bool EdiTransport::rxPacket() } throw logic_error("Incomplete rxPacket implementation!"); } -#endif // HAVE_EDI + +EdiInput::EdiInput(double& tist_offset_s, float edi_max_delay_ms) : + ediReader(tist_offset_s), + decoder(ediReader, false), + ediTransport(decoder) +{ + if (edi_max_delay_ms > 0.0f) { + // setMaxDelay wants number of AF packets, which correspond to 24ms ETI frames + decoder.setMaxDelay(lroundf(edi_max_delay_ms / 24.0f)); + } +} + |