From 9164c7e5fd57ed4f5d503c96c97125a90c335b00 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 12 Jan 2015 19:41:27 +0100 Subject: Define User Application Type in configuration file --- src/utils.cpp | 54 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 7 deletions(-) (limited to 'src/utils.cpp') diff --git a/src/utils.cpp b/src/utils.cpp index ee447d3..cc89c7b 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -370,15 +370,55 @@ void printComponent(DabComponent* component) etiLog.log(info, " service component type: 0x%x (%u)", component->type, component->type); - etiLog.log(info, " (packet) id: %u", component->packet.id); - etiLog.log(info, " (packet) address: %u", - component->packet.address); + if (component->packet.appType != 0xFFFF) { + etiLog.log(info, " (packet) id: %u", component->packet.id); + etiLog.log(info, " (packet) address: %u", + component->packet.address); - etiLog.log(info, " (packet) app type: %u", - component->packet.appType); + etiLog.log(info, " (packet) app type: %u", + component->packet.appType); - etiLog.log(info, " (packet) datagroup: %u", - component->packet.datagroup); + etiLog.log(info, " (packet) datagroup: %u", + component->packet.datagroup); + } + else if (component->audio.uaType != 0xFFFF) { + stringstream ss; + ss << " (audio) app type: "; + switch (component->audio.uaType) { + case FIG0_13_APPTYPE_SLIDESHOW: + ss << "MOT Slideshow"; + break; + case FIG0_13_APPTYPE_WEBSITE: + ss << "MOT Broadcast Website"; + break; + case FIG0_13_APPTYPE_TPEG: + ss << "TPEG"; + break; + case FIG0_13_APPTYPE_DGPS: + ss << "DGPS"; + break; + case FIG0_13_APPTYPE_TMC: + ss << "TMC"; + break; + case FIG0_13_APPTYPE_EPG: + ss << "EPG"; + break; + case FIG0_13_APPTYPE_DABJAVA: + ss << "DAB Java"; + break; + case FIG0_13_APPTYPE_JOURNALINE: + ss << "Journaline"; + break; + default: + ss << "Unknown: " << component->audio.uaType; + break; + } + + etiLog.level(info) << ss.str(); + } + else { + etiLog.level(info) << " No app type defined"; + } } void printSubchannels(vector& subchannels) -- cgit v1.2.3