summaryrefslogtreecommitdiffstats
path: root/src/ConfigParser.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-30 16:28:27 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-30 16:28:27 +0100
commit804fe1979f9ed7bef7badaf0aa08e35e09874772 (patch)
tree93ae4728de598391ce6e72712676260831b0ecb2 /src/ConfigParser.cpp
parent128768f7fd719eb455a946a0f716d7128b4ded63 (diff)
downloaddabmux-804fe1979f9ed7bef7badaf0aa08e35e09874772.tar.gz
dabmux-804fe1979f9ed7bef7badaf0aa08e35e09874772.tar.bz2
dabmux-804fe1979f9ed7bef7badaf0aa08e35e09874772.zip
Add rudimentary file input
No nonblock support yet
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r--src/ConfigParser.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index bdc2099..2a8d3da 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -55,6 +55,7 @@
#include "input/Prbs.h"
#include "input/Zmq.h"
+#include "input/File.h"
#ifdef _WIN32
@@ -930,6 +931,16 @@ static void setup_subchannel_from_ptree(DabSubchannel* subchan,
if (nonblock) {
// TODO
}
+
+ if (type == "audio") {
+ subchan->input = make_shared<Inputs::MPEGFile>();
+ }
+ else if (type == "dabplus") {
+ subchan->input = make_shared<Inputs::DABPlusFile>();
+ }
+ else {
+ throw logic_error("Incomplete handling of file input");
+ }
}
else if (proto == "tcp" ||
proto == "epgm" ||