summaryrefslogtreecommitdiffstats
path: root/src/fig/FIG0_2.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-13 09:29:47 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-13 09:29:47 +0100
commit8594e81beadc395b3fc2568dc29b48712acb2561 (patch)
treeb22d00fc01aa81a095b0664b3b947781a1064a49 /src/fig/FIG0_2.cpp
parentc4833640f8dddbe556cc6d40211223a05d5270b8 (diff)
parent7eb97a486a8a39ef3986b9c2c7c452e9ccf2693a (diff)
downloaddabmux-8594e81beadc395b3fc2568dc29b48712acb2561.tar.gz
dabmux-8594e81beadc395b3fc2568dc29b48712acb2561.tar.bz2
dabmux-8594e81beadc395b3fc2568dc29b48712acb2561.zip
Merge KuntzeM's pull request fixing #35 into next
ETI with DAB (MUSICAM) and EEP_A protection level was not possible.
Diffstat (limited to 'src/fig/FIG0_2.cpp')
-rw-r--r--src/fig/FIG0_2.cpp17
1 files changed, 14 insertions, 3 deletions
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;