summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/example.ini3
-rw-r--r--lib/edi/PFT.hpp2
-rw-r--r--src/DabMod.cpp6
3 files changed, 10 insertions, 1 deletions
diff --git a/doc/example.ini b/doc/example.ini
index 361a4c4..985998d 100644
--- a/doc/example.ini
+++ b/doc/example.ini
@@ -56,6 +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
+; before it timeouts
+;edi_max_delay=10
; 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/lib/edi/PFT.hpp b/lib/edi/PFT.hpp
index 9fb96a7..9b65d2e 100644
--- a/lib/edi/PFT.hpp
+++ b/lib/edi/PFT.hpp
@@ -139,7 +139,7 @@ class PFT
void incrementNextPseq(void);
pseq_t m_next_pseq;
- size_t m_max_delay = 10;
+ size_t m_max_delay = 10; // in AF packets
// Keep one AFBuilder for each Pseq
std::map<pseq_t, AFBuilder> m_afbuilders;
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index 987b579..a5e3163 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -132,6 +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;
std::string outputName;
int useZeroMQOutput = 0;
@@ -387,6 +388,8 @@ 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);
+
inputName = pt.get("input.source", "/dev/stdin");
// log parameters:
@@ -695,6 +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);
+ }
EdiUdpInput ediUdpInput(ediInput);
if (inputTransport == "file") {