summaryrefslogtreecommitdiffstats
path: root/src/DabMultiplexer.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-09-05 11:15:58 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-09-05 11:15:58 +0200
commitc0788a90a0d6e047488980a2ad5bb4f9cf108682 (patch)
tree284b7c184b15e71b8839c1c259d8f888f3c2a5c1 /src/DabMultiplexer.cpp
parent80da341c45f7b1b75a2227f931585633a048ce4e (diff)
downloaddabmux-c0788a90a0d6e047488980a2ad5bb4f9cf108682.tar.gz
dabmux-c0788a90a0d6e047488980a2ad5bb4f9cf108682.tar.bz2
dabmux-c0788a90a0d6e047488980a2ad5bb4f9cf108682.zip
Take BufferManagement setting into account
Diffstat (limited to 'src/DabMultiplexer.cpp')
-rw-r--r--src/DabMultiplexer.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp
index 498e9e0..6b887bd 100644
--- a/src/DabMultiplexer.cpp
+++ b/src/DabMultiplexer.cpp
@@ -581,8 +581,16 @@ void DabMultiplexer::mux_frame(std::vector<std::shared_ptr<DabOutput> >& outputs
edi::TagESTn& tag = edi_subchannelToTag[subchannel.get()];
int sizeSubchannel = subchannel->getSizeByte();
- int result = subchannel->input->readFrame(
- &etiFrame[index], sizeSubchannel);
+ int result = -1;
+ switch (subchannel->bufferManagement) {
+ case BufferManagement::Prebuffering:
+ result = subchannel->input->readFrame(&etiFrame[index], sizeSubchannel);
+ break;
+ case BufferManagement::Timestamped:
+ // no need to check enableTist because we always increment the timestamp
+ result = subchannel->input->readFrame(&etiFrame[index], sizeSubchannel, edi_time + m_tist_offset, timestamp);
+ break;
+ }
if (result < 0) {
etiLog.log(info,