summaryrefslogtreecommitdiffstats
path: root/src/DabMod.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-02-20 10:12:06 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-02-20 10:12:06 +0100
commitc5c21c73c310c29675bff1a1f2da4ddd298c0f92 (patch)
treeb58887652b2c0605b0d7d145377638cd7c754187 /src/DabMod.cpp
parent7bacaf3818494cf706f7372cb6cd194dbaf3f251 (diff)
downloaddabmod-c5c21c73c310c29675bff1a1f2da4ddd298c0f92.tar.gz
dabmod-c5c21c73c310c29675bff1a1f2da4ddd298c0f92.tar.bz2
dabmod-c5c21c73c310c29675bff1a1f2da4ddd298c0f92.zip
Add max_frames_queued option for zmq input
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r--src/DabMod.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index 1bbfc99..f546e45 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -68,6 +68,8 @@
# define memalign(a, b) malloc(b)
#endif
+#define ZMQ_INPUT_MAX_FRAME_QUEUE 50
+
typedef std::complex<float> complexf;
@@ -87,6 +89,7 @@ int main(int argc, char* argv[])
bool loop = false;
std::string inputName = "";
std::string inputTransport = "file";
+ unsigned inputMaxFramesQueued = ZMQ_INPUT_MAX_FRAME_QUEUE;
std::string outputName;
int useZeroMQOutput = 0;
@@ -362,6 +365,9 @@ int main(int argc, char* argv[])
}
inputTransport = pt.get("input.transport", "file");
+ inputMaxFramesQueued = pt.get("input.max_frames_queued",
+ ZMQ_INPUT_MAX_FRAME_QUEUE);
+
inputName = pt.get("input.source", "/dev/stdin");
// log parameters:
@@ -677,10 +683,10 @@ int main(int argc, char* argv[])
#else
// The URL might start with zmq+tcp://
if (inputName.substr(0, 4) == "zmq+") {
- inputZeroMQReader.Open(inputName.substr(4));
+ inputZeroMQReader.Open(inputName.substr(4), inputMaxFramesQueued);
}
else {
- inputZeroMQReader.Open(inputName);
+ inputZeroMQReader.Open(inputName, inputMaxFramesQueued);
}
inputReader = &inputZeroMQReader;
#endif