aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-07-17 13:51:37 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-07-17 13:51:37 +0200
commit1ede7bf288fc5ee27d6c60a7b62ff9bcf03c88a3 (patch)
treef6a69ed88b7ac78e732d1fb3c71ecc6b75b1a7f3 /src
parent6f5f87c1d56c97fbad2e59e6ccc1dcc05a75676e (diff)
downloaddabmod-1ede7bf288fc5ee27d6c60a7b62ff9bcf03c88a3.tar.gz
dabmod-1ede7bf288fc5ee27d6c60a7b62ff9bcf03c88a3.tar.bz2
dabmod-1ede7bf288fc5ee27d6c60a7b62ff9bcf03c88a3.zip
Handle modulator restart with file input
Diffstat (limited to 'src')
-rw-r--r--src/DabMod.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp
index 01125b2..3ed5e40 100644
--- a/src/DabMod.cpp
+++ b/src/DabMod.cpp
@@ -783,20 +783,28 @@ int launch_modulator(int argc, char* argv[])
run_again = false;
ret = 1;
break;
-#if defined(HAVE_ZEROMQ)
case MOD_AGAIN:
etiLog.level(warn) << "Restart modulator.";
- running = true;
- if (inputTransport == "zeromq") {
+ run_again = false;
+ if (inputTransport == "file") {
+ if (inputFileReader.Open(inputName, loop) == -1) {
+ etiLog.level(error) << "Unable to open input file!";
+ ret = 1;
+ }
+ else {
+ run_again = true;
+ }
+ }
+ else if (inputTransport == "zeromq") {
+#if defined(HAVE_ZEROMQ)
run_again = true;
-
// Create a new input reader
inputZeroMQReader = make_shared<InputZeroMQReader>();
inputZeroMQReader->Open(inputName, inputMaxFramesQueued);
m.inputReader = inputZeroMQReader.get();
+#endif
}
break;
-#endif
case MOD_NORMAL_END:
default:
etiLog.level(info) << "modulator stopped.";