summaryrefslogtreecommitdiffstats
path: root/src/ConfigParser.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/ConfigParser.cpp
parent80da341c45f7b1b75a2227f931585633a048ce4e (diff)
downloaddabmux-c0788a90a0d6e047488980a2ad5bb4f9cf108682.tar.gz
dabmux-c0788a90a0d6e047488980a2ad5bb4f9cf108682.tar.bz2
dabmux-c0788a90a0d6e047488980a2ad5bb4f9cf108682.zip
Take BufferManagement setting into account
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r--src/ConfigParser.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index 3142bb3..b1e785a 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -1021,6 +1021,17 @@ static void setup_subchannel_from_ptree(shared_ptr<DabSubchannel>& subchan,
}
}
+ const string bufferManagement = pt.get("buffer-management", "prebuffering");
+ if (bufferManagement == "prebuffering") {
+ subchan->bufferManagement = BufferManagement::Prebuffering;
+ }
+ else if (bufferManagement == "timestamped") {
+ subchan->bufferManagement = BufferManagement::Timestamped;
+ }
+ else {
+ throw runtime_error("Subchannel with uid " + subchanuid + " has invalid buffer-management !");
+ }
+
subchan->startAddress = 0;
dabProtection* protection = &subchan->protection;