summaryrefslogtreecommitdiffstats
path: root/src/ConfigParser.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-29 22:09:13 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-29 22:09:13 +0200
commite7ad2e1fab9c51189fdc8b4f2d81f625da9dd422 (patch)
treeeba50066116cb21fae751f7d7b2a9c10c05e2585 /src/ConfigParser.cpp
parent471e7ee279d633a7b48e73ece42677574a74ad39 (diff)
downloaddabmux-e7ad2e1fab9c51189fdc8b4f2d81f625da9dd422.tar.gz
dabmux-e7ad2e1fab9c51189fdc8b4f2d81f625da9dd422.tar.bz2
dabmux-e7ad2e1fab9c51189fdc8b4f2d81f625da9dd422.zip
Modernise PRBS generator and remove code for cmd line parser
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r--src/ConfigParser.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index 0ba1d78..8e5fed1 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -3,7 +3,7 @@
2011, 2012 Her Majesty the Queen in Right of Canada (Communications
Research Center Canada)
- Copyright (C) 2014, 2015
+ Copyright (C) 2016
Matthias P. Braendli, matthias.braendli@mpb.li
http://www.opendigitalradio.org
@@ -742,6 +742,12 @@ static void setup_subchannel_from_ptree(DabSubchannel* subchan,
#endif // defined(HAVE_INPUT_UDP)
#endif // defined(HAVE_FORMAT_BRIDGE)
}
+ } else if (type == "data" and proto == "prbs") {
+ input_is_old_style = false;
+
+ subchan->input = new DabInputPrbs();
+ subchan->type = subchannel_type_t::DataDmb;
+ subchan->bitrate = DEFAULT_DATA_BITRATE;
} else if (type == "data") {
// TODO default proto should be udp://
if (0) {
@@ -749,10 +755,6 @@ static void setup_subchannel_from_ptree(DabSubchannel* subchan,
} else if (proto == "udp") {
operations = dabInputUdpOperations;
#endif
-#if defined(HAVE_INPUT_PRBS) && defined(HAVE_FORMAT_RAW)
- } else if (proto == "prbs") {
- operations = dabInputPrbsOperations;
-#endif
#if defined(HAVE_INPUT_FILE) && defined(HAVE_FORMAT_RAW)
} else if (proto == "file") {
operations = dabInputRawFileOperations;
@@ -761,7 +763,7 @@ static void setup_subchannel_from_ptree(DabSubchannel* subchan,
operations = dabInputRawFifoOperations;
} else {
stringstream ss;
- ss << "Subchannel with uid " << subchanuid <<
+ ss << "Subchannel with uid " << subchanuid <<
": Invalid protocol for data input (" <<
proto << ")" << endl;
throw runtime_error(ss.str());