aboutsummaryrefslogtreecommitdiffstats
path: root/src/ParserConfigfile.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-04-17 20:35:34 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-04-17 20:35:34 +0200
commit80f7b54c85386d171b6b8924e925026d25e4ad47 (patch)
treef6322efcbe1ec2d223b4c13188dcfec6de1eed65 /src/ParserConfigfile.cpp
parent5f9e7bc673025ffdc953d254be0d0c65c70ee908 (diff)
downloaddabmux-80f7b54c85386d171b6b8924e925026d25e4ad47.tar.gz
dabmux-80f7b54c85386d171b6b8924e925026d25e4ad47.tar.bz2
dabmux-80f7b54c85386d171b6b8924e925026d25e4ad47.zip
Move dabInputZMQ configuration into struct
Diffstat (limited to 'src/ParserConfigfile.cpp')
-rw-r--r--src/ParserConfigfile.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/ParserConfigfile.cpp b/src/ParserConfigfile.cpp
index 6b261e5..c59f5e5 100644
--- a/src/ParserConfigfile.cpp
+++ b/src/ParserConfigfile.cpp
@@ -590,10 +590,10 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
(strcmp(subchan->inputProto, "ipc") == 0) ) {
input_is_old_style = false;
- int buffer_size;
- int prebuffering;
+ dab_input_zmq_config_t zmqconfig;
+
try {
- buffer_size = pt.get<int>("zmq-buffer");
+ zmqconfig.buffer_size = pt.get<int>("zmq-buffer");
}
catch (ptree_error &e) {
stringstream ss;
@@ -602,7 +602,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
throw runtime_error(ss.str());
}
try {
- prebuffering = pt.get<int>("zmq-prebuffering");
+ zmqconfig.prebuffering = pt.get<int>("zmq-prebuffering");
}
catch (ptree_error &e) {
stringstream ss;
@@ -610,8 +610,10 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
" has no zmq-buffer defined!";
throw runtime_error(ss.str());
}
+ zmqconfig.enable_encryption = false;
+
DabInputZmqMPEG* inzmq =
- new DabInputZmqMPEG(subchanuid, buffer_size, prebuffering);
+ new DabInputZmqMPEG(subchanuid, zmqconfig);
inzmq->enrol_at(*rc);
subchan->input = inzmq;
subchan->inputName = full_inputName;
@@ -663,10 +665,10 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
(strcmp(subchan->inputProto, "ipc") == 0) ) {
input_is_old_style = false;
- int buffer_size;
- int prebuffering;
+ dab_input_zmq_config_t zmqconfig;
+
try {
- buffer_size = pt.get<int>("zmq-buffer");
+ zmqconfig.buffer_size = pt.get<int>("zmq-buffer");
}
catch (ptree_error &e) {
stringstream ss;
@@ -675,7 +677,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
throw runtime_error(ss.str());
}
try {
- prebuffering = pt.get<int>("zmq-prebuffering");
+ zmqconfig.prebuffering = pt.get<int>("zmq-prebuffering");
}
catch (ptree_error &e) {
stringstream ss;
@@ -683,8 +685,12 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
" has no zmq-buffer defined!";
throw runtime_error(ss.str());
}
+
+ zmqconfig.enable_encryption = false;
+
DabInputZmqAAC* inzmq =
- new DabInputZmqAAC(subchanuid, buffer_size, prebuffering);
+ new DabInputZmqAAC(subchanuid, zmqconfig);
+
inzmq->enrol_at(*rc);
subchan->input = inzmq;
subchan->inputName = full_inputName;