Added duplicate checking for manual pushes
This commit is contained in:
parent
acbdede296
commit
6254c285d6
5 changed files with 58 additions and 77 deletions
|
@ -325,14 +325,10 @@ bool Util::startInput(std::string streamname, std::string filename, bool forkFir
|
|||
}
|
||||
|
||||
/// Attempt to start a push for streamname to target.
|
||||
/// Both streamname and target may be changed by this function:
|
||||
/// - streamname is sanitized to a permissible streamname
|
||||
/// - target gets variables replaced and may be altered by the PUSH_OUT_START trigger response.
|
||||
/// streamname MUST be pre-sanitized
|
||||
/// target gets variables replaced and may be altered by the PUSH_OUT_START trigger response.
|
||||
/// Attempts to match the altered target to an output that can push to it.
|
||||
pid_t Util::startPush(std::string & streamname, std::string & target) {
|
||||
|
||||
sanitizeName(streamname);
|
||||
|
||||
pid_t Util::startPush(const std::string & streamname, std::string & target) {
|
||||
if (Triggers::shouldTrigger("PUSH_OUT_START", streamname)) {
|
||||
std::string payload = streamname+"\n"+target;
|
||||
std::string filepath_response;
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Util {
|
|||
void sanitizeName(std::string & streamname);
|
||||
bool streamAlive(std::string & streamname);
|
||||
bool startInput(std::string streamname, std::string filename = "", bool forkFirst = true);
|
||||
int startPush(std::string & streamname, std::string & target);
|
||||
int startPush(const std::string & streamname, std::string & target);
|
||||
JSON::Value getStreamConfig(std::string streamname);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue