summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DabMux.cpp5
-rw-r--r--src/DabMux.h2
-rw-r--r--src/ParserConfigfile.cpp48
-rw-r--r--src/utils.cpp54
4 files changed, 75 insertions, 34 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index 4d3af58..1853da1 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -1672,7 +1672,8 @@ int main(int argc, char *argv[])
}
if ( transmitFIG0_13programme &&
- (*subchannel)->type == Audio) { // audio
+ (*subchannel)->type == Audio &&
+ (*componentFIG0_13)->audio.uaType != 0xffff) {
if (fig0 == NULL) {
fig0 = (FIGtype0*)&etiFrame[index];
fig0->FIGtypeNumber = 0;
@@ -1699,7 +1700,7 @@ int main(int argc, char *argv[])
fig0->Length += 3;
FIG0_13_app* app = (FIG0_13_app*)&etiFrame[index];
- app->setType(FIG0_13_APPTYPE_SLIDESHOW);
+ app->setType((*componentFIG0_13)->audio.uaType);
app->length = 4;
app->xpad = htonl(0x0cbc0000);
/* xpad meaning
diff --git a/src/DabMux.h b/src/DabMux.h
index 18e362a..ed1855e 100644
--- a/src/DabMux.h
+++ b/src/DabMux.h
@@ -351,7 +351,7 @@ struct FIG0_13_app {
#define FIG0_13_APPTYPE_TMC 0x6
#define FIG0_13_APPTYPE_EPG 0x7
#define FIG0_13_APPTYPE_DABJAVA 0x8
-// 0x441 is Frauenhofer IIS Journaline
+#define FIG0_13_APPTYPE_JOURNALINE 0x441
struct FIGtype1_0 {
diff --git a/src/ParserConfigfile.cpp b/src/ParserConfigfile.cpp
index 1a954d7..c94a370 100644
--- a/src/ParserConfigfile.cpp
+++ b/src/ParserConfigfile.cpp
@@ -449,13 +449,6 @@ void parse_configfile(string configuration_file,
}
if (figType != -1) {
- if (! component->isPacketComponent(ensemble->subchannels)) {
- stringstream ss;
- ss << "Component with uid " << componentuid <<
- " is not packet, cannot have figtype defined !";
- throw runtime_error(ss.str());
- }
-
if (figType >= (1<<12)) {
stringstream ss;
ss << "Component with uid " << componentuid <<
@@ -463,28 +456,35 @@ void parse_configfile(string configuration_file,
throw runtime_error(ss.str());
}
- component->packet.appType = figType;
- }
+ if (component->isPacketComponent(ensemble->subchannels)) {
+ component->packet.appType = figType;
- if (packet_address != -1) {
- if (! component->isPacketComponent(ensemble->subchannels)) {
- stringstream ss;
- ss << "Component with uid " << componentuid <<
- " is not packet, cannot have address defined !";
- throw runtime_error(ss.str());
+ }
+ else {
+ component->audio.uaType = figType;
}
- component->packet.address = packet_address;
- }
- if (packet_datagroup) {
- if (! component->isPacketComponent(ensemble->subchannels)) {
- stringstream ss;
- ss << "Component with uid " << componentuid <<
- " is not packet, cannot have datagroup enabled !";
- throw runtime_error(ss.str());
+ if (packet_address != -1) {
+ if (! component->isPacketComponent(ensemble->subchannels)) {
+ stringstream ss;
+ ss << "Component with uid " << componentuid <<
+ " is not packet, cannot have address defined !";
+ throw runtime_error(ss.str());
+ }
+
+ component->packet.address = packet_address;
+ }
+ if (packet_datagroup) {
+ if (! component->isPacketComponent(ensemble->subchannels)) {
+ stringstream ss;
+ ss << "Component with uid " << componentuid <<
+ " is not packet, cannot have datagroup enabled !";
+ throw runtime_error(ss.str());
+ }
+
+ component->packet.datagroup = packet_datagroup;
}
- component->packet.datagroup = packet_datagroup;
}
ensemble->components.push_back(component);
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<dabSubchannel*>& subchannels)