diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2022-03-17 19:28:34 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2022-03-17 19:32:24 +0100 |
commit | d2a4c375f1ef7af7c7bc4f02ad2dc0d919f2c488 (patch) | |
tree | e6efc78727f45627d246708661343fcfc9f9d6b8 | |
parent | 75cbae6e7446686ff36fae15016b3f8eb76b1ad6 (diff) | |
download | dabmux-d2a4c375f1ef7af7c7bc4f02ad2dc0d919f2c488.tar.gz dabmux-d2a4c375f1ef7af7c7bc4f02ad2dc0d919f2c488.tar.bz2 dabmux-d2a4c375f1ef7af7c7bc4f02ad2dc0d919f2c488.zip |
Setup FIG0/13 for Broadcast Website with profiles 01 FF
-rw-r--r-- | doc/advanced.mux | 14 | ||||
-rw-r--r-- | src/ConfigParser.cpp | 6 | ||||
-rw-r--r-- | src/MuxElements.h | 3 | ||||
-rw-r--r-- | src/fig/FIG0_13.cpp | 15 |
4 files changed, 33 insertions, 5 deletions
diff --git a/doc/advanced.mux b/doc/advanced.mux index 16c9bd2..fd7a06c 100644 --- a/doc/advanced.mux +++ b/doc/advanced.mux @@ -297,18 +297,26 @@ components { service srv-fu subchannel sub-fu - ; FIG 0/13 user application was previously configured using the figtype setting. - ; Now more than one user application can be defined per component, using the - ; 'user-applications' entry. Do not use both figtype and user-applications. + ; FIG 0/13 user application was previously configured using the figtype setting, which + ; allowed only a single user application. + ; Using the 'user-applications' section, several can be defined per component. + ; Do not use both figtype and user-applications. ; If both slideshow (TS 101 499) and SPI (TS 102 818) are carried in PAD, the following ; needs to be set for FIG 0/13 to be transmitted correctly. + ; The same section is also applicable to packet services. user-applications { ; Add uaType 0x2 with X-PAD App Type = 12 and empty user application data userapp "slideshow" ; Add uaType 0x7 with X-PAD App Type = 16 and user application data = "Basic profile" userapp "spi" + + ; Broadcast website, add uaType 0x3 and user application data + ; 0x01 "basic integrated receiver profile" and + ; 0xFF "unrestricted profile" + ; Only for packet-mode, not X-PAD. + userapp "website" } ; Deprecated figtype setting: diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index eb30e3a..fd367ec 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -824,10 +824,15 @@ void parse_ptree( // This was previously hardcoded in FIG0/13 and means "MOT, start of X-PAD data group" ua.xpadAppType = 12; + ua.xpadAppType_valid = true; } else if (ua_value == "spi") { ua.uaType = FIG0_13_APPTYPE_SPI; ua.xpadAppType = 16; + ua.xpadAppType_valid = true; + } + else if (ua_value == "website") { + ua.uaType = FIG0_13_APPTYPE_WEBSITE; } if (component->isPacketComponent(ensemble->subchannels)) { @@ -858,6 +863,7 @@ void parse_ptree( // This was previously hardcoded in FIG0/13 and means "MOT, start of X-PAD data group" ua.xpadAppType = 12; + ua.xpadAppType_valid = true; if (component->isPacketComponent(ensemble->subchannels)) { component->packet.uaTypes.push_back(ua); diff --git a/src/MuxElements.h b/src/MuxElements.h index 020093d..a709191 100644 --- a/src/MuxElements.h +++ b/src/MuxElements.h @@ -433,7 +433,8 @@ struct userApplication { /* X-PAD Application Type: this 5-bit field shall specify the lowest numbered application type used to transport * this user application (see clause 7.4.3). * Also See EN 300 401 Table 11 "X-PAD Application types" */ - uint8_t xpadAppType; + bool xpadAppType_valid = false; + uint8_t xpadAppType = 0; }; struct dabAudioComponent { diff --git a/src/fig/FIG0_13.cpp b/src/fig/FIG0_13.cpp index da21cbf..aa0be1e 100644 --- a/src/fig/FIG0_13.cpp +++ b/src/fig/FIG0_13.cpp @@ -168,12 +168,18 @@ FillStatus FIG0_13::fill(uint8_t *buf, size_t max_size) if (ua.uaType == FIG0_13_APPTYPE_SPI) { app->length += 1; } + else if (ua.uaType == FIG0_13_APPTYPE_WEBSITE) { + app->length += 2; + } buf += sizeof(FIG0_13_app); remaining -= sizeof(FIG0_13_app); fig0->Length += sizeof(FIG0_13_app); - if (m_transmit_programme) { + if (m_transmit_programme and !ua.xpadAppType_valid) { + throw MuxInitException("FIG0/13 combination unsupported"); + } + else if (m_transmit_programme and ua.xpadAppType_valid) { const uint8_t dscty = 60; // TS 101 756 Table 2b (MOT) const uint16_t xpadapp = htons((ua.xpadAppType << 8) | dscty); /* xpad meaning @@ -198,6 +204,13 @@ FillStatus FIG0_13::fill(uint8_t *buf, size_t max_size) remaining -= 1; fig0->Length += 1; } + else if (ua.uaType == FIG0_13_APPTYPE_WEBSITE) { + buf[0] = 0x01; // = basic integrated receiver profile + buf[1] = 0xFF; // = unrestricted (PC) profile + buf += 2; + remaining -= 2; + fig0->Length += 2; + } } } } |