From b0f2bade7a34aaff6573c81d9875d321dd889370 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 7 Oct 2016 16:00:38 +0200 Subject: Rework remotecontrol --- src/ConfigParser.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/ConfigParser.cpp') diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index 6a359b7..bb1e0e0 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -142,10 +142,9 @@ uint16_t get_announcement_flag_from_ptree( return flags; } -void parse_ptree(boost::property_tree::ptree& pt, - std::shared_ptr ensemble, - std::shared_ptr rc - ) +void parse_ptree( + boost::property_tree::ptree& pt, + std::shared_ptr ensemble) { using boost::property_tree::ptree; using boost::property_tree::ptree_error; @@ -247,7 +246,7 @@ void parse_ptree(boost::property_tree::ptree& pt, pt_announcement.get_child("flags")); cl->subchanneluid = pt_announcement.get("subchannel"); - cl->enrol_at(*rc); + rcs.enrol(cl.get()); ensemble->clusters.push_back(cl); } } @@ -395,7 +394,7 @@ void parse_ptree(boost::property_tree::ptree& pt, try { setup_subchannel_from_ptree(subchan, it->second, ensemble, - subchanuid, rc); + subchanuid); } catch (runtime_error &e) { etiLog.log(error, @@ -555,14 +554,12 @@ void parse_ptree(boost::property_tree::ptree& pt, ensemble->components.push_back(component); } - } void setup_subchannel_from_ptree(DabSubchannel* subchan, boost::property_tree::ptree &pt, std::shared_ptr ensemble, - string subchanuid, - std::shared_ptr rc) + string subchanuid) { using boost::property_tree::ptree; using boost::property_tree::ptree_error; @@ -657,7 +654,7 @@ void setup_subchannel_from_ptree(DabSubchannel* subchan, DabInputZmqMPEG* inzmq = new DabInputZmqMPEG(subchanuid, zmqconfig); - inzmq->enrol_at(*rc); + rcs.enrol(inzmq); subchan->input = inzmq; if (proto == "epmg") { @@ -723,7 +720,7 @@ void setup_subchannel_from_ptree(DabSubchannel* subchan, DabInputZmqAAC* inzmq = new DabInputZmqAAC(subchanuid, zmqconfig); - inzmq->enrol_at(*rc); + rcs.enrol(inzmq); subchan->input = inzmq; if (proto == "epmg") { -- cgit v1.2.3