diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-07-19 20:33:15 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-07-19 20:33:15 +0200 |
commit | 96c01650c01d8dfe43c22d3d19e711e64ce377b5 (patch) | |
tree | 7b96e2c61144fd798be85ce63244ecb58056d1fa /src/fig/FIG0.cpp | |
parent | 42970488bba01fdecab1b9f2f7df60c4998e7680 (diff) | |
download | dabmux-96c01650c01d8dfe43c22d3d19e711e64ce377b5.tar.gz dabmux-96c01650c01d8dfe43c22d3d19e711e64ce377b5.tar.bz2 dabmux-96c01650c01d8dfe43c22d3d19e711e64ce377b5.zip |
Fix FIB0 padding, FIG init and deadline handling
Diffstat (limited to 'src/fig/FIG0.cpp')
-rw-r--r-- | src/fig/FIG0.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/fig/FIG0.cpp b/src/fig/FIG0.cpp index 67c462a..458116e 100644 --- a/src/fig/FIG0.cpp +++ b/src/fig/FIG0.cpp @@ -61,15 +61,19 @@ size_t FIG0_0::fill(uint8_t *buf, size_t max_size) //=========== FIG 0/1 =========== FIG0_1::FIG0_1(FIGRuntimeInformation *rti) : - m_rti(rti) + m_rti(rti), + m_initialised(false) { - subchannelFIG0_1 = m_rti->ensemble->subchannels.end(); } size_t FIG0_1::fill(uint8_t *buf, size_t max_size) { size_t remaining = max_size; + if (not m_initialised) { + subchannelFIG0_1 = m_rti->ensemble->subchannels.end(); + } + if (max_size < 6) { return 0; } @@ -155,9 +159,9 @@ size_t FIG0_1::fill(uint8_t *buf, size_t max_size) //=========== FIG 0/2 =========== FIG0_2::FIG0_2(FIGRuntimeInformation *rti) : - m_rti(rti) + m_rti(rti), + m_initialised(false) { - serviceFIG0_2 = m_rti->ensemble->services.end(); } size_t FIG0_2::fill(uint8_t *buf, size_t max_size) @@ -166,6 +170,10 @@ size_t FIG0_2::fill(uint8_t *buf, size_t max_size) int cur = 0; ssize_t remaining = max_size; + if (not m_initialised) { + serviceFIG0_2 = m_rti->ensemble->services.end(); + } + auto ensemble = m_rti->ensemble; // Rotate through the subchannels until there is no more @@ -396,14 +404,19 @@ size_t FIG0_3::fill(uint8_t *buf, size_t max_size) //=========== FIG 0/17 =========== FIG0_17::FIG0_17(FIGRuntimeInformation *rti) : - m_rti(rti) + m_rti(rti), + m_initialised(false) { - serviceFIG0_17 = m_rti->ensemble->services.end(); } size_t FIG0_17::fill(uint8_t *buf, size_t max_size) { ssize_t remaining = max_size; + + if (not m_initialised) { + serviceFIG0_17 = m_rti->ensemble->services.end(); + } + auto ensemble = m_rti->ensemble; FIGtype0* fig0 = NULL; |