Added basic stream fallback feature, allowing to redirect to a different stream name on stream source load errors

This commit is contained in:
Thulinma 2019-05-24 20:39:08 +02:00
parent 6e125707f1
commit 7beea43d31
4 changed files with 22 additions and 1 deletions

View file

@ -363,6 +363,7 @@ bool Util::startInput(std::string streamname, std::string filename, bool forkFir
// check required parameters
if (input.isMember("required")){
jsonForEachConst(input["required"], prm){
if (!prm->isMember("option")){continue;}
const std::string opt = (*prm)["option"].asStringRef();
// check for overrides
if (overrides.count(opt)){
@ -379,6 +380,7 @@ bool Util::startInput(std::string streamname, std::string filename, bool forkFir
// check optional parameters
if (input.isMember("optional")){
jsonForEachConst(input["optional"], prm){
if (!prm->isMember("option")){continue;}
const std::string opt = (*prm)["option"].asStringRef();
// check for overrides
if (overrides.count(opt)){