diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-07-28 16:11:32 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-07-28 16:11:32 +0200 |
commit | 5d1b6420535c72d7a8df85a5db08ff1c0230690a (patch) | |
tree | f1263f6d67776b884fd484fdb87552a2fa147656 /src/DabMultiplexer.cpp | |
parent | a1921a1a967b65c99a830141e9faaecd77b0f317 (diff) | |
download | dabmux-5d1b6420535c72d7a8df85a5db08ff1c0230690a.tar.gz dabmux-5d1b6420535c72d7a8df85a5db08ff1c0230690a.tar.bz2 dabmux-5d1b6420535c72d7a8df85a5db08ff1c0230690a.zip |
Add work in progress odr-zmq2edi
Diffstat (limited to 'src/DabMultiplexer.cpp')
-rw-r--r-- | src/DabMultiplexer.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp index c109919..8265b34 100644 --- a/src/DabMultiplexer.cpp +++ b/src/DabMultiplexer.cpp @@ -417,7 +417,7 @@ void DabMultiplexer::mux_frame(std::vector<std::shared_ptr<DabOutput> >& outputs //****** FCT ******// // Incremente for each frame, overflows at 249 fc->FCT = currentFrame % 250; - edi_tagDETI.dflc = currentFrame % 5000; + edi_tagDETI.dlfc = currentFrame % 5000; //****** FICF ******// // Fast Information Channel Flag, 1 bit, =1 if FIC present @@ -669,6 +669,10 @@ void DabMultiplexer::mux_frame(std::vector<std::shared_ptr<DabOutput> >& outputs shared_ptr<OutputMetadata> md_edi_time = make_shared<OutputMetadataEDITime>(edi_tagDETI.seconds); output->setMetadata(md_edi_time); + + shared_ptr<OutputMetadata> md_dlfc = + make_shared<OutputMetadataDLFC>(currentFrame % 5000); + output->setMetadata(md_dlfc); } } } @@ -708,6 +712,18 @@ void DabMultiplexer::mux_frame(std::vector<std::shared_ptr<DabOutput> >& outputs int frame_size = (FLtmp + 1 + 1 + 1 + 1) * 4; + for (auto output : outputs) { + auto out_zmq = std::dynamic_pointer_cast<DabOutputZMQ>(output); + if (out_zmq) { + // The separator allows the receiver to associate the right + // metadata with the right ETI frame, since the output gathers + // four ETI frames into one message + shared_ptr<OutputMetadata> md_sep = + make_shared<OutputMetadataSeparation>(); + out_zmq->setMetadata(md_sep); + } + } + // Give the data to the outputs for (auto output : outputs) { if (output->Write(etiFrame, frame_size) == -1) { |