diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2022-10-05 16:09:31 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2022-10-05 16:09:31 +0200 |
commit | 7c1c779cfd01162d020d0c276bb605adfe338df9 (patch) | |
tree | 415265244ecc90de6e01ff705b25edc67b813448 /src/ConfigParser.cpp | |
parent | b76df807e61e25e07fa3ee075dab255355b278fd (diff) | |
download | dabmux-7c1c779cfd01162d020d0c276bb605adfe338df9.tar.gz dabmux-7c1c779cfd01162d020d0c276bb605adfe338df9.tar.bz2 dabmux-7c1c779cfd01162d020d0c276bb605adfe338df9.zip |
Add load_entire_file option for file inputs
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r-- | src/ConfigParser.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index dbbc2fb..a845bef 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -1090,16 +1090,24 @@ static void setup_subchannel_from_ptree(shared_ptr<DabSubchannel>& subchan, throw runtime_error(ss.str()); } - const bool nonblock = pt.get("nonblock", false); - if (nonblock) { + if (pt.get("nonblock", false)) { if (auto filein = dynamic_pointer_cast<Inputs::FileBase>(subchan->input)) { - filein->setNonblocking(nonblock); + filein->setNonblocking(true); } else { etiLog.level(warn) << "The nonblock option is not supported"; } } + if (pt.get("load_entire_file", false)) { + if (auto filein = dynamic_pointer_cast<Inputs::FileBase>(subchan->input)) { + filein->setLoadEntireFile(true); + } + else { + etiLog.level(warn) << "The load_entire_file option is not supported"; + } + } + const string bufferManagement = pt.get("buffer-management", "prebuffering"); if (bufferManagement == "prebuffering") { subchan->input->setBufferManagement(Inputs::BufferManagement::Prebuffering); |