aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/example.mux20
-rw-r--r--src/DabMux.cpp5
-rw-r--r--src/DabMux.h2
-rw-r--r--src/ParserConfigfile.cpp48
-rw-r--r--src/utils.cpp54
5 files changed, 94 insertions, 35 deletions
diff --git a/doc/example.mux b/doc/example.mux
index e64636c..ec34238 100644
--- a/doc/example.mux
+++ b/doc/example.mux
@@ -217,12 +217,26 @@ components {
service srv-fu
subchannel sub-fu
+ ; for audio components, the field
+ figtype 0x2
+ ; defines the User Application Type according to TS 101 756 Table 16:
+ ; 0x2 : MOT Slideshow
+ ; 0x3 : MOT Broadcast Web Site
+ ; 0x4 : TPEG
+ ; 0x5 : DGPS
+ ; 0x6 : TMC
+ ; 0x7 : EPG
+ ; 0x8 : DAB Java
+ ; 0x44a : Journaline
+ ; If not defined, the FIG 0/13 is not transmitted for this component
+
; for packet components, the fields
; "user application type in FIG 0/13 for packet mode"
;figtype
- ; "packet address (default: 0x200 + <n> (512))"
+ ; and the packet address (mandatory)
;address
; are supported, with the same syntax as in the manpage.
+ ; FIG 0/13 is only transmitted when figtype is defined.
; The -d option on the command line is:
;datagroup (true|false)
; and defaults to false.
@@ -237,6 +251,8 @@ components {
shortlabel "lu"
service srv-lu
subchannel sub-lu
+
+ figtype 0x2
}
comp-ri {
@@ -244,6 +260,8 @@ components {
shortlabel "rick"
service srv-ri
subchannel sub-ri
+
+ figtype 0x2
}
}
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)