Go to documentation repository
...
| Code Block |
|---|
function check_cam(addr)
{
var scmd = "./Tools/openRTSP.exe -V -D 10 -d 1 "+addr;
DebugLogString("run:"+scmd);
var s = run_cmd_timeout(scmd, 10000);
DebugLogString(s);
if(s.indexOf("Receiving streamed data")< 0)
{
DebugLogString("restarting");
var msg = CreateMsg();
msg.StringToMsg("SLAVE|COMP_NAME|EXECUTE|restart<1>,command<streamingserver.run>"); //change COMP_NAME to the name of the computer where the process runs
DoReact(msg);
}
}
if(Event.SourceType == "LOCAL_TIMER" && Event.SourceId == "TEST_RTSP")
{
check_cam("rtsp://127.0.0.1:5544/1"); //the link is formed as described in the "Configuring the RTSP Server Module" section
check_cam("rtsp://127.0.0.1:5545/4");
} |