summaryrefslogtreecommitdiffstats
path: root/src/ParserConfigfile.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-08-01 12:07:51 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-08-01 12:07:51 +0200
commit0ebce6201e7501b43adc95a394117d1060b3a65e (patch)
tree947ff3ab2f0abf941d3baa2bb62b05625fe00d30 /src/ParserConfigfile.cpp
parenta95438527f2db7a1535ce679edde004b982dba60 (diff)
downloaddabmux-0ebce6201e7501b43adc95a394117d1060b3a65e.tar.gz
dabmux-0ebce6201e7501b43adc95a394117d1060b3a65e.tar.bz2
dabmux-0ebce6201e7501b43adc95a394117d1060b3a65e.zip
Refactor protection handling for better readability
Diffstat (limited to 'src/ParserConfigfile.cpp')
-rw-r--r--src/ParserConfigfile.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ParserConfigfile.cpp b/src/ParserConfigfile.cpp
index 7a990a3..943e500 100644
--- a/src/ParserConfigfile.cpp
+++ b/src/ParserConfigfile.cpp
@@ -844,14 +844,14 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
subchan->startAddress = 0;
if (type == "audio") {
- protection->form = 0;
+ protection->form = UEP;
protection->level = 2;
- protection->shortForm.tableSwitch = 0;
- protection->shortForm.tableIndex = 0;
+ protection->uep.tableSwitch = 0;
+ protection->uep.tableIndex = 0;
} else {
protection->level = 2;
- protection->form = 1;
- protection->longForm.option = 0;
+ protection->form = EEP;
+ protection->eep.profile = EEP_A;
}
/* Get bitrate */
@@ -938,7 +938,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan,
try {
int level = pt.get<int>("protection");
- if (protection->form == 0) {
+ if (protection->form == UEP) {
if ((level < 1) || (level > 5)) {
stringstream ss;
ss << "Subchannel with uid " << subchanuid <<