From 5d1b6420535c72d7a8df85a5db08ff1c0230690a Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 28 Jul 2017 16:11:32 +0200 Subject: Add work in progress odr-zmq2edi --- src/DabMultiplexer.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/DabMultiplexer.cpp') 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 >& 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 >& outputs shared_ptr md_edi_time = make_shared(edi_tagDETI.seconds); output->setMetadata(md_edi_time); + + shared_ptr md_dlfc = + make_shared(currentFrame % 5000); + output->setMetadata(md_dlfc); } } } @@ -708,6 +712,18 @@ void DabMultiplexer::mux_frame(std::vector >& outputs int frame_size = (FLtmp + 1 + 1 + 1 + 1) * 4; + for (auto output : outputs) { + auto out_zmq = std::dynamic_pointer_cast(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 md_sep = + make_shared(); + out_zmq->setMetadata(md_sep); + } + } + // Give the data to the outputs for (auto output : outputs) { if (output->Write(etiFrame, frame_size) == -1) { -- cgit v1.2.3