summaryrefslogtreecommitdiffstats
path: root/src/EtiReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/EtiReader.cpp')
-rw-r--r--src/EtiReader.cpp14
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));
+ }
+}
+