Skip to content

Commit aa61d1a

Browse files
committed
Hide realtime option, only use internally
1 parent 54820bf commit aa61d1a

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

lib/stream.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,19 @@ bool Util::startInput(std::string streamname, std::string filename, bool forkFir
688688
if (!prm->isMember("type") && str_args.count(opt)){str_args[opt] = "";}
689689
}
690690
}
691+
// check internal parameters
692+
if (input.isMember("internal")) {
693+
jsonForEachConst (input["internal"], prm) {
694+
if (!prm->isMember("option")) { continue; }
695+
const std::string opt = (*prm)["option"].asStringRef();
696+
// check for overrides
697+
if (overrides.count(prm.key())) {
698+
HIGH_MSG("Overriding option '%s' to '%s'", prm.key().c_str(), overrides.at(prm.key()).c_str());
699+
str_args[opt] = overrides.at(prm.key());
700+
}
701+
if (!prm->isMember("type") && str_args.count(opt)) { str_args[opt] = ""; }
702+
}
703+
}
691704

692705
if (isProvider){
693706
// Set environment variable so we can know if we have a provider when re-exec'ing.

src/input/input.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ namespace Mist{
233233
option["short"] = "r";
234234
option["help"] = "Feed the results of this input in realtime to the buffer";
235235
config->addOption("realtime", option);
236-
capa["optional"]["realtime"]["name"] = "Simulated Live";
237-
capa["optional"]["realtime"]["help"] = "Make this input run as a simulated live stream";
238-
capa["optional"]["realtime"]["option"] = "--realtime";
236+
capa["internal"]["realtime"]["name"] = "Simulated Live";
237+
capa["internal"]["realtime"]["help"] = "Make this input run as a simulated live stream";
238+
capa["internal"]["realtime"]["option"] = "--realtime";
239239

240240
option.null();
241241
option["short"] = "P";

0 commit comments

Comments
 (0)