summaryrefslogtreecommitdiffstats
path: root/src/utils.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/utils.cpp
parenta95438527f2db7a1535ce679edde004b982dba60 (diff)
downloaddabmux-0ebce6201e7501b43adc95a394117d1060b3a65e.tar.gz
dabmux-0ebce6201e7501b43adc95a394117d1060b3a65e.tar.bz2
dabmux-0ebce6201e7501b43adc95a394117d1060b3a65e.zip
Refactor protection handling for better readability
Diffstat (limited to 'src/utils.cpp')
-rw-r--r--src/utils.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/utils.cpp b/src/utils.cpp
index 4e9d8c3..654759d 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -416,23 +416,19 @@ void printSubchannels(vector<dabSubchannel*>& subchannels)
(*subchannel)->id);
etiLog.log(info, " bitrate: %i",
(*subchannel)->bitrate);
- if (protection->form == 0) {
+ if (protection->form == UEP) {
etiLog.log(info, " protection: UEP %i", protection->level + 1);
- } else {
- etiLog.log(info, " protection: EEP %i-%c",
- protection->level + 1,
- protection->longForm.option == 0 ? 'A' : 'B');
- }
- if (protection->form == 0) {
- etiLog.log(info, " form: short");
etiLog.log(info, " switch: %i",
- protection->shortForm.tableSwitch);
+ protection->uep.tableSwitch);
etiLog.log(info, " index: %i",
- protection->shortForm.tableIndex);
- } else {
- etiLog.log(info, " form: long");
+ protection->uep.tableIndex);
+ }
+ else {
+ etiLog.log(info, " protection: EEP %i-%c",
+ protection->level + 1,
+ protection->eep.profile == EEP_A ? 'A' : 'B');
etiLog.log(info, " option: %i",
- protection->longForm.option);
+ protection->eep.GetOption());
etiLog.log(info, " level: %i",
(*subchannel)->protection.level);
}