summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/example.ini4
-rw-r--r--src/DabMod.cpp9
2 files changed, 7 insertions, 6 deletions
diff --git a/doc/example.ini b/doc/example.ini
index 985998d..a0cd110 100644
--- a/doc/example.ini
+++ b/doc/example.ini
@@ -56,9 +56,9 @@ loop=0
; Listen for EDI data on a given UDP port
;transport=edi
;source=udp://:12002
-; Maximum delay in number of ETI frames that the EDI input is willing to wait
+; Maximum delay in milliseconds that the EDI input is willing to wait
; before it timeouts
-;edi_max_delay=10
+;edi_max_delay=240
; No support yet for multicast, should work with and without PFT
; When recieving data using ZeroMQ, the source is the URI to be used
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index a5e3163..8065a5a 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -132,7 +132,7 @@ int launch_modulator(int argc, char* argv[])
std::string inputName = "";
std::string inputTransport = "file";
unsigned inputMaxFramesQueued = ZMQ_INPUT_MAX_FRAME_QUEUE;
- int edi_max_delay = 0;
+ float edi_max_delay_ms = 0.0f;
std::string outputName;
int useZeroMQOutput = 0;
@@ -388,7 +388,7 @@ int launch_modulator(int argc, char* argv[])
inputMaxFramesQueued = pt.get("input.max_frames_queued",
ZMQ_INPUT_MAX_FRAME_QUEUE);
- edi_max_delay = pt.get("input.edi_max_delay", 0);
+ edi_max_delay_ms = pt.get("input.edi_max_delay", 0.0f);
inputName = pt.get("input.source", "/dev/stdin");
@@ -698,8 +698,9 @@ int launch_modulator(int argc, char* argv[])
EdiReader ediReader;
EdiDecoder::ETIDecoder ediInput(ediReader);
- if (edi_max_delay > 0) {
- ediInput.setMaxDelay(edi_max_delay);
+ if (edi_max_delay_ms > 0.0f) {
+ // setMaxDelay wants number of AF packets, which correspond to 24ms ETI frames
+ ediInput.setMaxDelay(lroundf(edi_max_delay_ms / 24.0f));
}
EdiUdpInput ediUdpInput(ediInput);