Go to documentation repository
...
Switch camera to the color mode and start recording from it when arming the first camera.
Code Block |
---|
OnEvent("CAM","1","ARM") //first camera is armed { DoReact("CAM","1","SETUP","color<1>"); // set color mode of camera DoReact("CAM","1","REC"); //record from the first camera } |
Arm the first camera when disabling the fifth camera.
Code Block |
---|
OnEvent("CAM","5","DETACH") // fifth camera is disabled { DoReact("CAM","1","ARM"); //first camera is armed } |
Use half of resources when recording from the first camera (it means, if four cameras are connected through the first video capture device than the first camera will record with speed of 6 FPS, and other three cameras—with speed of 2-2.5 FPS) if it is in the alarm state.
Code Block |
---|
OnEvent("CAM","1","MD_START") //first camera is in alarm state { DoReact("CAM","1","SETUP","rec_priority<2>"); // use half of resources when recording } |
Set maximum compression synchronously with the fourth microphone of audio card on the first camera when recording on disk from the first camera.
Code Block |
---|
OnEvent("CAM","1","REC") //first camera recording on disk { DoReact("CAM","1", "SETUP", "compression<5>, audio_type<OLXA_LINE>, audio_id<4>"); //first camera, maximum compression, synchronously with the forth microphone of audio card. |
Start recording from the first camera with minimum quality in black and white mode when it isn't alarmed.
Code Block |
---|
OnEvent("CAM","1","MD_STOP") // first camera stopped to be in alarm state { value = 5; DoReact("CAM", "1", "SETUP", "compression<" + value + ">,color<0>"); //start recording from the first camera with minimum quality in the black and white mode. } |
Start recording from the first camera in the “rollback” mode when it is disarmed.
Code Block |
---|
OnEvent("CAM","1","DISARM") //first camera is disarmed { DoReact("CAM","1","REC","rollback<1>"); // Start recording from the first camera in the "rollback" mode } |
Set new parameters of video signal when connecting the first camera.
Code Block |
---|
OnEvent("CAM","1","ATTACH") //first camera is connected { VIDEO_CANAL_ID = GETOBJECTPARAM("CAM","1","PARENT_ID"); // define ID of video channel to which the first camera belongs DoReact("GRABBER",VIDEO_CANAL_ID,"SETUP","chan<0>,mode<0>,resolution<1>,format<pal>"); //set new parameters of video channel } |
Start auto cruising on Camera 1 when Macro 2 is run.
Code Block |
---|
OnEvent ("MACRO","2","RUN") { DoReact("CAM","1","CRUISE_START","cruise_id<1>,action<CRUISE_START>,cam_id<1>"); } |
Code Block |
---|
OnInit() { run=0; } OnEvent("MACRO","1","RUN") { run=1; flag=""; num=8; for(i=1;i<str(num+1);i=str(i+1)) { DoReact("CAM",i,"DISARM"); DoReact("CAM",i,"REC_STOP"); DoReact("CAM",i,"ARM"); flag=flag+"N"; if(i<num) {flag=flag+"|";} } } OnEvent("CAM",N,"MD_START") { if(run) { nn=str((N*2)-1); flag=strleft(flag,str(nn-1))+"Y"+strright(flag,str(((num*2)-1)-nn)); } } OnEvent("MACRO","2","RUN") { run=0; fin=0; for(i=1;i<str(num+1);i=str(i+1)) { tmp=extract_substr(flag,"|",str(i-1)); if(strequal(tmp,"Y")) {fin=str(fin+1);} DoReact("CAM",i,"DISARM"); } tmp="ВсегоAll:"+str(num)+" СработалоWorked:"+str(fin); rez=MessageBox("",tmp,0); } |
Code Block |
---|
OnEvent("CAM","1","MD_START") { DoReact("CAM","1","CLEAR_SUBTITLES","title_id<1>"); //delete all captions from video image DoReact("CAM","1","ADD_SUBTITLES","command<Camera 1 Alarm " + time + "\r>,page<BEGIN>,title_id<1>"); //the time parameter allows you to include the time of event registration in captions } OnEvent("CAM","1","MD_STOP") { DoReact("CAM","1","ADD_SUBTITLES","command<Camera 1 End of alarm " + time + "\r>,page<END>,title_id<1>"); } |
Info | ||
---|---|---|
| ||
When you use the page<BEGIN> and page<END> parameters, the corresponding fields in the captions database will be filled in, which will make it possible to search for data using the Captions search interface object. |
...