diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-12-18 10:06:07 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-12-18 10:06:07 +0100 |
commit | 5a0633d70a82e15f63a006489ffa1544fa37cb90 (patch) | |
tree | 5bc9ff8c7721a7f15b5fa322d50ebeed51225e9a /src/DabMultiplexer.cpp | |
parent | c56781de33a257cc83978132dee0b28e2cbfc719 (diff) | |
download | dabmux-5a0633d70a82e15f63a006489ffa1544fa37cb90.tar.gz dabmux-5a0633d70a82e15f63a006489ffa1544fa37cb90.tar.bz2 dabmux-5a0633d70a82e15f63a006489ffa1544fa37cb90.zip |
Allow user to specify TAI bulletin URLs
Diffstat (limited to 'src/DabMultiplexer.cpp')
-rw-r--r-- | src/DabMultiplexer.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp index 84d9704..719e767 100644 --- a/src/DabMultiplexer.cpp +++ b/src/DabMultiplexer.cpp @@ -66,6 +66,19 @@ const unsigned short BitRateTable[64] = { 384, 384, 384 }; +static vector<string> split_pipe_separated_string(const std::string& s) +{ + stringstream ss; + ss << s; + + string elem; + vector<string> components; + while (getline(ss, elem, '|')) { + components.push_back(elem); + } + return components; +} + DabMultiplexer::DabMultiplexer( boost::property_tree::ptree pt) : RemoteControllable("mux"), @@ -76,7 +89,7 @@ DabMultiplexer::DabMultiplexer( currentFrame(0), ensemble(std::make_shared<dabEnsemble>()), m_tai_clock_required(false), - m_clock_tai(), + m_clock_tai(split_pipe_separated_string(pt.get("general.tai_clock_bulletins", ""))), fig_carousel(ensemble) { RC_ADD_PARAMETER(frames, |