Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Section


Column
width35%50%


Panel
borderColor#CCCCCC
bgColor#FFFFFF
titleBGColor#F0F0F0
borderStylesolid
titleOn the page:
Table of Contents



Column


...

Connect(BSTR ip, BSTR login, BSTR password, BSTR arch_password, long param, long port) set up sets a connection to the Serverserver/Video Gate/Backup Archivevideo gate/backup archive.

  • BSTR ipIP address of the Video server;.
  • BSTR login login to connect to the Server server (can be blank);.
  • BSTR passwordpassword to set up a connection to the Video server (can be blank);.
  • BSTR arch_password password to access the archive (i.e. that is, admin password, can be blank);.

  • long param – Server server role. The parameter is mandatory.
    • 0 – 0video server;.
    • 1 – backup 1—online archive;.
    • 2video gate.2 – videogate;

  • long port port to connect Video to server. 
    • if 0, 1, or 2 are passed, the connection is established with the port 900, 901, or 902, correspondingly;.

    • if 100 is passed, the connection is with to the port 10504;.

    • if any other value is passed, the connection is with the port number "port + 20000". For example, if port=900, the connection is established with server port 20900.

The connection to Server the server is set up asynchronously.

Note
titleImportantAttention!

If login and password are not specified at the Connect() method call, all cameras are viewable in the control. It is to be considered when developing third-party application if access privileges are relevantIf differentiation of permissions is important, this must be taken into account at the development stage.

ShowCam

ShowCam(long cam_id, long compress, long show) shows/hides the camera on the monitor.

  • long cam_idcamera ID.
  • long compresslevel of video compression 0-5 (for local camera =0). If set to -1, video stream is displayed directly from the camera without compression
  • long showcheckbox: show/hide camera (1/0)

...

DoReactMonitor(BSTR react_string) – control over the —control monitor/camerascamera behavior.

  • BSTR react_stringreaction string view

How to create react_string:

Code Block
languagecpp
react_string = "MONITOR||ARCH_FRAME_TIME|cam<3>,date<dd-mm-yy>,time<hh:mm:ss>";

CamMonitor1->DoReactMonitor(react_string);

The result of calling the function with the this parameter:camera 3 will be in is switched to the archive mode, and the archive will be is positioned to date «dd"dd-mm-yy» yy" and time «hh"hh:mm:ss» ss" (date and time are to must be set in this format only).

The mode parameter takes can take the following values:

0 – 0video gate if it's specified (otherwise, video server).

1 – 1video server.

2 – long-time 2—backup archive.

“MONITOR|<id ignored>|ARCH_FRAME_TIME|...”

Info
titleNote:

Optionally, you can also specify positioning accuracy down to  Positioning accuracy can be specified in milliseconds, for instanceexample:

DoReactMonitor(“MONITOR||ARCH_FRAME_TIME|cam<3>,date<02-10

-05>,time<12:12:22.345>,mode<1>")

Example. Show 2nd the second stream from camera 14 on Monitor monitor 1:

"MONITOR|1|ADD_CAM|cam<14>,cam_id<14>,compress<1>,stream_id<14.2>"

Exapmle. Set fps FPS = 1 when viewing archive from Camera camera 11:

"MONITOR||CAM_PARAMS|cam<11>;arch_fps<1>"

Example. Get the coordinates of the fisheye camera 1 in the monitor (Monitor 1):

"MONITOR|1|GET_CAM_PARAMS|cam<1>"

RemoveAllCams

RemoveAllCams() : longremove all cameras from the monitor.

IsConnected

IsConnected() : booleanmethod shows if the Video video server is connected or disconnected.

GetCurIp

GetCurIp() : BSTRreturns the IP address of Server the server specified when calling calling Connect.

SendRawMessage

SendRawMessage(BSTR msg) – sends send the command to be executed to Video video server.

  • BSTR msgcommand string view.

How to call a function:

Code Block
languagecpp
m_Cam.SendRawMessage("CAM|1|REC");

...

Code Block
languagecpp
m_Cam.SendRawMessage("CAM|1|DISARM");

Disconnect

Disconnect()disconnect from the Video video server. 

SetCallBackOptions

SetCallBackOptions(int cam_id, int options) sets parameters of getting to get video from camera.

  • int cam_id camera ID (number).
  • int options – options. The possible values of the options parameter are:
    • WithoutVideoFrame = 0x00 do not send frames from the video module.
    • WithVideoFrame = 0x01 send frames from the video module.
    • WithExtendedParams = 0x02 – get get frames with extended parameters (time, fpsFPS, subtitlescaptions).
    • WithInformationLayout = 0x04 display video in the window with control elements (context menu).
    • WithCompressedData = 0x08 display video in the native original format without decompression (if any).
    • WithoutDecode =
    0x10 –
    • 0x10disable video decoding on the server.
    • WithoutSubtitles=0x20
    • disable subtitles.
Info
titleNote

The options parameter is created formed in the same way as the parameters of the CamMonitor.ocx component – see (see CamMonitor.ocx parameters).

SetParam

SetParam(BSTR param_name, BSTR param_value) sets the number of camera windows in CamMonitor.

  • BSTR param_name– a a string representation of the length or width.
  • BSTR param_value– the the number of camera windows.

How to call a function:

Code Block
languagecpp
m_cam.SetParam("monitor_ch", m_NH);
m_cam.SetParam("monitor_cw", m_NW);

...