diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-12-23 22:27:03 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-12-23 22:27:03 +0100 |
commit | 2b014e2f00df81eefe977b901ab601ea11ccb895 (patch) | |
tree | a5c6fe371838ff3e153c99c6a87554b55b2284d1 /src/DabMultiplexer.cpp | |
parent | 1d2c8bf95e8d9c7c6f282f266b149bc82f1c8371 (diff) | |
download | dabmux-2b014e2f00df81eefe977b901ab601ea11ccb895.tar.gz dabmux-2b014e2f00df81eefe977b901ab601ea11ccb895.tar.bz2 dabmux-2b014e2f00df81eefe977b901ab601ea11ccb895.zip |
Add EDI fragment interleaver
Diffstat (limited to 'src/DabMultiplexer.cpp')
-rw-r--r-- | src/DabMultiplexer.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp index a0c713b..6d3a51e 100644 --- a/src/DabMultiplexer.cpp +++ b/src/DabMultiplexer.cpp @@ -181,6 +181,10 @@ void DabMultiplexer::prepare() throw e; } } + + if (edi_conf.interleaver_enabled()) { + edi_interleaver.SetLatency(edi_conf.latency_frames); + } #endif // Shift ms by 14 to Timestamp level 2, see below in Section TIST @@ -707,8 +711,13 @@ void DabMultiplexer::mux_frame(std::vector<std::shared_ptr<DabOutput> >& outputs if (edi_conf.enable_pft) { // Apply PFT layer to AF Packet (Reed Solomon FEC and Fragmentation) - vector< edi::PFTFragment > edi_fragments = - edi_pft.Assemble(edi_afpacket); + vector<edi::PFTFragment> edi_fragments = edi_pft.Assemble(edi_afpacket); + + if (edi_conf.interleaver_enabled()) { + edi_interleaver.PushFragments(edi_fragments); + + edi_fragments = edi_interleaver.Interleave(); + } // Send over ethernet for (const auto& edi_frag : edi_fragments) { |