aboutsummaryrefslogtreecommitdiffstats
path: root/src/fig
diff options
context:
space:
mode:
authorKuntzeM <github@kuntze.email>2019-02-11 16:26:54 +0100
committerKuntzeM <github@kuntze.email>2019-02-11 16:26:54 +0100
commit7eb97a486a8a39ef3986b9c2c7c452e9ccf2693a (patch)
tree40cc6ec46894fe37b754f81c31783c0c08bde2b2 /src/fig
parenta8cc30be9589280d9bde3ddaf676610c9b12af2a (diff)
downloaddabmux-7eb97a486a8a39ef3986b9c2c7c452e9ccf2693a.tar.gz
dabmux-7eb97a486a8a39ef3986b9c2c7c452e9ccf2693a.tar.bz2
dabmux-7eb97a486a8a39ef3986b9c2c7c452e9ccf2693a.zip
fixed bug DAB with protection level EEP_A 1-4
Diffstat (limited to 'src/fig')
-rw-r--r--src/fig/FIG0_13.cpp2
-rw-r--r--src/fig/FIG0_2.cpp17
-rw-r--r--src/fig/FIG0_24.cpp6
-rw-r--r--src/fig/FIG1.cpp6
4 files changed, 21 insertions, 10 deletions
diff --git a/src/fig/FIG0_13.cpp b/src/fig/FIG0_13.cpp
index 0bb7fd7..433838e 100644
--- a/src/fig/FIG0_13.cpp
+++ b/src/fig/FIG0_13.cpp
@@ -90,7 +90,7 @@ FillStatus FIG0_13::fill(uint8_t *buf, size_t max_size)
}
if ( m_transmit_programme &&
- (*subchannel)->type == subchannel_type_t::Audio &&
+ ((*subchannel)->type == subchannel_type_t::DABPlusAudio || (*subchannel)->type == subchannel_type_t::DABAudio) &&
(*componentFIG0_13)->audio.uaType != 0xffff) {
const int required_size = 3+4+11;
diff --git a/src/fig/FIG0_2.cpp b/src/fig/FIG0_2.cpp
index e587c2b..5275a22 100644
--- a/src/fig/FIG0_2.cpp
+++ b/src/fig/FIG0_2.cpp
@@ -161,7 +161,8 @@ FillStatus FIG0_2::fill(uint8_t *buf, size_t max_size)
etiLog.log(FIG0_2_TRACE, "FIG0_2::fill loop SId=%04x %s/%s",
(*serviceFIG0_2)->id,
m_inserting_audio_not_data ? "AUDIO" : "DATA",
- type == subchannel_type_t::Audio ? "Audio" :
+ type == subchannel_type_t::DABPlusAudio ? "DABPlusAudio" :
+ type == subchannel_type_t::DABAudio ? "DABAudio" :
type == subchannel_type_t::Packet ? "Packet" :
type == subchannel_type_t::DataDmb ? "DataDmb" :
type == subchannel_type_t::Fidc ? "Fidc" : "?");
@@ -202,7 +203,7 @@ FillStatus FIG0_2::fill(uint8_t *buf, size_t max_size)
break;
}
- if (type == subchannel_type_t::Audio) {
+ if (type == subchannel_type_t::DABPlusAudio || type == subchannel_type_t::DABAudio) {
auto fig0_2serviceAudio = (FIGtype0_2_Service*)buf;
fig0_2serviceAudio->SId = htons((*serviceFIG0_2)->id);
@@ -257,7 +258,17 @@ FillStatus FIG0_2::fill(uint8_t *buf, size_t max_size)
}
switch ((*subchannel)->type) {
- case subchannel_type_t::Audio:
+ case (subchannel_type_t::DABAudio):
+ {
+ auto audio_description = (FIGtype0_2_audio_component*)buf;
+ audio_description->TMid = 0;
+ audio_description->ASCTy = (*component)->type;
+ audio_description->SubChId = (*subchannel)->id;
+ audio_description->PS = ((curCpnt == 0) ? 1 : 0);
+ audio_description->CA_flag = 0;
+ }
+ break;
+ case (subchannel_type_t::DABPlusAudio):
{
auto audio_description = (FIGtype0_2_audio_component*)buf;
audio_description->TMid = 0;
diff --git a/src/fig/FIG0_24.cpp b/src/fig/FIG0_24.cpp
index 1441df2..960d261 100644
--- a/src/fig/FIG0_24.cpp
+++ b/src/fig/FIG0_24.cpp
@@ -93,7 +93,7 @@ FillStatus FIG0_24::fill(uint8_t *buf, size_t max_size)
}
}
- subchannel_type_t type = subchannel_type_t::Audio;
+ subchannel_type_t type = subchannel_type_t::DABAudio;
bool isProgramme = true;
bool oe = true;
@@ -107,7 +107,7 @@ FillStatus FIG0_24::fill(uint8_t *buf, size_t max_size)
oe,
serviceFIG0_24->service_id,
m_inserting_audio_not_data ? "AUDIO" : "DATA",
- type == subchannel_type_t::Audio ? "Audio" :
+ type == subchannel_type_t::DABAudio ? "Audio" :
type == subchannel_type_t::Packet ? "Packet" :
type == subchannel_type_t::DataDmb ? "DataDmb" :
type == subchannel_type_t::Fidc ? "Fidc" : "?");
@@ -147,7 +147,7 @@ FillStatus FIG0_24::fill(uint8_t *buf, size_t max_size)
break;
}
- if (type == subchannel_type_t::Audio) {
+ if (type == subchannel_type_t::DABAudio) {
auto fig0_2serviceAudio = (FIGtype0_24_audioservice*)buf;
fig0_2serviceAudio->SId = htons(serviceFIG0_24->service_id);
diff --git a/src/fig/FIG1.cpp b/src/fig/FIG1.cpp
index 8f41239..dd1e70b 100644
--- a/src/fig/FIG1.cpp
+++ b/src/fig/FIG1.cpp
@@ -90,7 +90,7 @@ FillStatus FIG1_1::fill(uint8_t *buf, size_t max_size)
break;
}
- if ((*service)->getType(ensemble) == subchannel_type_t::Audio) {
+ if ((*service)->getType(ensemble) == subchannel_type_t::DABPlusAudio || (*service)->getType(ensemble) == subchannel_type_t::DABAudio) {
auto fig1_1 = (FIGtype1_1 *)buf;
fig1_1->FIGtypeNumber = 1;
@@ -149,7 +149,7 @@ FillStatus FIG1_4::fill(uint8_t *buf, size_t max_size)
* a label, which is forbidden since V2.1.1 */
if (not (*component)->label.long_label().empty() ) {
- if ((*service)->getType(ensemble) == subchannel_type_t::Audio) {
+ if ((*service)->getType(ensemble) == subchannel_type_t::DABPlusAudio || (*service)->getType(ensemble) == subchannel_type_t::DABAudio) {
if (remaining < 5 + 16 + 2) {
break;
@@ -237,7 +237,7 @@ FillStatus FIG1_5::fill(uint8_t *buf, size_t max_size)
break;
}
- if ((*service)->getType(ensemble) != subchannel_type_t::Audio) {
+ if ((*service)->getType(ensemble) == subchannel_type_t::DABPlusAudio || (*service)->getType(ensemble) == subchannel_type_t::DABAudio) {
auto fig1_5 = (FIGtype1_5 *)buf;
fig1_5->FIGtypeNumber = 1;
fig1_5->Length = 23;