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 /src | |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/ConfigParser.cpp | 6 | ||||
-rw-r--r-- | src/MuxElements.h | 3 | ||||
-rw-r--r-- | src/fig/FIG0_13.cpp | 15 |
3 files changed, 22 insertions, 2 deletions
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; + } } } } |