From 0ebce6201e7501b43adc95a394117d1060b3a65e Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 1 Aug 2014 12:07:51 +0200 Subject: Refactor protection handling for better readability --- src/utils.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/utils.cpp') 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& 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); } -- cgit v1.2.3