aboutsummaryrefslogtreecommitdiffstats
path: root/src/ParserConfigfile.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-08-02 12:28:19 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-08-02 12:28:19 +0200
commitca7dd07261de50576590fea227c8fbf345282e1f (patch)
tree3a25dab3e1af8b5891cad9f3a4c32d1ffb39b733 /src/ParserConfigfile.cpp
parentf5b16079b7174a04160cf265b6362311fb497e62 (diff)
downloaddabmux-ca7dd07261de50576590fea227c8fbf345282e1f.tar.gz
dabmux-ca7dd07261de50576590fea227c8fbf345282e1f.tar.bz2
dabmux-ca7dd07261de50576590fea227c8fbf345282e1f.zip
Add the possibility to specify protection profile
Diffstat (limited to 'src/ParserConfigfile.cpp')
-rw-r--r--src/ParserConfigfile.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/ParserConfigfile.cpp b/src/ParserConfigfile.cpp
index 943e500..f4c1075 100644
--- a/src/ParserConfigfile.cpp
+++ b/src/ParserConfigfile.cpp
@@ -846,7 +846,6 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
if (type == "audio") {
protection->form = UEP;
protection->level = 2;
- protection->uep.tableSwitch = 0;
protection->uep.tableIndex = 0;
} else {
protection->level = 2;
@@ -934,7 +933,22 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
}
}
- /* Get protection */
+ /* Get optional protection profile */
+ string profile = pt.get("protection-profile", "");
+
+ if (profile == "EEP_A") {
+ protection->form = EEP;
+ protection->eep.profile = EEP_A;
+ }
+ else if (profile == "EEP_B") {
+ protection->form = EEP;
+ protection->eep.profile = EEP_B;
+ }
+ else if (profile == "UEP") {
+ protection->form = UEP;
+ }
+
+ /* Get protection level */
try {
int level = pt.get<int>("protection");
@@ -947,7 +961,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
throw runtime_error(ss.str());
}
}
- else {
+ else if (protection->form == EEP) {
if ((level < 1) || (level > 4)) {
stringstream ss;
ss << "Subchannel with uid " << subchanuid <<