Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ffmpeg=501
- if(Event.SourceType=="MACRO" && Event.Action=="RUN" && Event.SourceId==ffmpeg)
- {
- slave_id=Event.GetParam("sender");
- DebugLogString(slave_id)
- var index=slave_id.split("-");
- DebugLogString("Awaiting that macro start on WKS-VIDEO-"+index[2])
- monitors(index[2],slave_id);
- }
- function monitors(camid,slave_id)
- {
- //mon=515
- //switz(camid,mon,slave_id);
- DebugLogString(Var_var("mon"))
- if (Var_var("mon")!="515")
- {
- Var_var("mon")=515;
- switz(camid,Var_var("mon"),slave_id);
- DebugLogString(mon)
- }
- else {
- Var_var("mon")=516;
- switz(camid,Var_var("mon"),slave_id);
- // DebugLogString(mon)
- }
- }
- function rtsp(port,slave)
- {
- //slave=Event.GetParam("slave_id");
- var index=slave_id.split("-");
- //cmd="c:\\1\\ffmpeg.exe -f gdigrab -video_size 1920x1080 -offset_x 0 -offset_y 0 -i desktop -f rtsp -muxdelay 1 rtsp://10.131.37.97:600"+port+"/capture"
- cmd="c:\\1\\ffmpeg.exe -f gdigrab -video_size 1920x1080 -offset_x 0 -offset_y 0 -i desktop -b:v 16M -minrate 16M -maxrate 16M -bufsize 16M -f rtsp -muxdelay 0.1 rtsp://10.131.241.200:600"+port+"/capture -async 1 -vsync 1"
- DebugLogString("Running cmd command: "+cmd)
- DoReactGlobalStr("SLAVE",slave,"CREATE_PROCESS","command_line<"+cmd+">");
- }
- function switz(camid,mon,slave)
- {
- DebugLogString("Awiting switch on monitor with id "+mon)
- Var_var("cam")="111"+camid;
- DebugLogString("Awaiting that choosed cam id will "+Var_var("cam"));
- DoReactGlobalStr("MONITOR",mon,"REMOVE_ALL","__slave_id<WALL>");
- DebugLogString("cam<"+Var_var("cam")+">")
- DoReactGlobalStr("MONITOR",mon,"ADD_SHOW","cam<"+Var_var("cam")+">,__slave_id<WALL>");
- rtsp(camid,slave)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement