CAMERADISPLAY
Management of security devices of type camera, including access to properties, AV stream handling and PTZ commands via the ONVIF control.
WebVue support - No. Returns an unsuccessful code if used in this context.
Mode | Mnemonic | Syntax | WebVue support |
1 | CONNECT | 1 | No |
2 | DISCONNECT | 2 | No |
3 | SNAPSHOT | 3 | No |
4 | PAN | 4 | No |
5 | TILT | 4 | No |
6 | ZOOM | 4 | No |
7 | STOPPTZ | 2 | No |
8 | SETHOME | 2 | No |
9 | GOTOHOME | 2 | No |
10 | ADDPRESET | 5 | No |
11 | GETPRESETNAME | 6 | No |
12 | GETPRESETCOUNT | 2 | No |
13 | GOTOPRESET | 5 | No |
14 | REMOVEPRESET | 5 | No |
15 | SETRESOLUTION | 7 | No |
16 | GETRESOLUTIONCOUNT | 8 | No |
17 | GETRESOLUTION | 9 | No |
18 | SETSTREAMPROP | 10 | No |
19 | GETSTREAMPROP | 11 | No |
20 | STARTGUARDTOUR | 12 | No |
21 | STOPGUARDTOUR | 2 | No |
22 | GETDEVICEINFO | 13 | No |
23 | GETGUARDTOURSTATUS | 2 | No |
Arguments common to more than one mode
Argument | Meaning |
Window | The name of the window that contains the ONVIF control. Type STR. |
Branch | The branch (if any) of the window. Use "*" to indicate the current branch of the program. Type STR. |
Identity | The identity of the ONVIF control within the specified window. Type STR. |
Device | The name of the camera device under the form NetworkId.DeviceId where NetworkId is the name of configured security device network and DeviceId is the name of a configured security device of type Camera. Type STR. |
EncodingType | The type of encoding. Type INTEGER.
1 - JPEG 2 - H264 3 - MPEG4 |
PropertyName | The name of a stream property. Either "QUALITY", "BITRATE" or "FRAMERATE". Type STR. |
Syntax 1
LongVal = CAMERADISPLAY(Mode, Window, Branch, Identity, Device);
Return type: LONG.
Execution
Mode |
Mnemonic |
Action |
1 | CONNECT | Connect to the camera device and display the live video stream. Return: 1 if successful, else 0. |
Syntax 2
LongVal = CAMERADISPLAY(Mode, Window, Branch, Identity);
Return type: LONG.
Execution
Mode | Mnemonic | Action |
2 | DISCONNECT | Disconnect the camera device associated to the graphic control. Return: 1 if successful, else 0. |
7 | STOPPTZ | Stop the current pan tilt or zoom operation. Return: 1 if successful, else 0. |
8 | SETHOME | Set the current PTZ as the Home preset position. Return: 1 if successful, else 0. |
9 | GOTOHOME | Move the camera to its Home preset position if any. Return: 1 if successful, else 0. |
12 | GETPRESETCOUNT | Retrieve the number of presets. Return: Number of available presets if successful, else -1. |
21 | STOPGUARDTOUR | Stop the guard tour. Return: 1 if successful, else 0. |
23 | GETGUARDTOURSTATUS | Return the status of the guard tour, running or not. Return: 1 if the guard tour is running, else 0 (guard tour not running or error). |
Syntax 3
LongVal = CAMERADISPLAY(Mode, Window, Branch, Identity, Device[, Path]);
Return type: LONG.
Argument | Meaning |
Path | The path in which to store the snapshot. If omitted, the snapshot directory configured on the control is used. If not configured, the project's TP folder is used. Optional. Type STR. |
Execution
Mode | Mnemonic | Action |
3 | SNAPSHOT | Take a snapshot and store it in the specified path. Return: 1 if successful, else 0. |
Syntax 4
LongVal = CAMERADISPLAY(Mode, Window, Branch, Identity, Direction[, Speed]);
Return type: LONG.
Argument | Meaning |
Direction | The movement direction. Type STR. |
Speed | Movement speed or velocity (optional). Range 1 to 100. Default 100. Type INTEGER. |
Execution
Mode | Mnemonic | Action |
4 |
PAN |
Pan the camera. Direction can be either "LEFT" or "RIGHT". Return: 1 if successful, else 0. |
5 | TILT | Tilt the camera. Direction can be either "UP" or "DOWN". Return: 1 if successful, else 0. |
6 | ZOOM | Zoom the camera. Direction can be either "IN" or "OUT". Return: 1 if successful, else 0. |
Syntax 5
LongVal = CAMERADISPLAY(Mode, Window, Branch, Identity, PresetName);
Return type: LONG.
Argument | Meaning |
PresetName | The name of a preset. Type STR. |
Execution
Mode | Mnemonic | Action |
10 |
ADDPRESET |
Adds the current PTZ position as a new preset named PresetName. Return: 1 if successful, else 0. |
13 | GOTOPRESET | Move the camera to the position defined by the preset PresetName. If the preset is empty, the PTZ will be set to the next one. Return: 1 if successful, else 0. |
14 | REMOVEPRESET | Remove the preset PresetName. Return: 1 if successful, else 0. |
Syntax 6
StrVal = CAMERADISPLAY(Mode, Window, Branch, Identity, Index);
Return type: STR.
Argument | Meaning |
Index | Index in the list of presets. Starts at 0. Type INTEGER. |
Execution
Mode | Mnemonic | Action |
11 |
GETPRESETNAME |
Get the preset name corresponding to the specified preset number Index. Return: Preset name if successful, else an empty string. |
Syntax 7
LongVal = CAMERADISPLAY(Mode, Window, Branch, Identity, Resolution);
Return type: LONG.
Argument | Meaning |
Resolution | New image resolution in the format <EncodingType> <Width>x<Height>. Type STR. For example "H264 1280x1024". Please refer to the documentation of the camera manufacturer for details related to camera's supported encoding types and image size. |
Execution
Mode | Mnemonic | Action |
15 |
SETRESOLUTION |
Change the resolution of the currently displayed stream. Return: 1 if successful, else 0. |
Syntax 8
LongVal = CAMERADISPLAY(Mode, Window, Branch, Identity, EncodingType);
Return type: Long.
Execution
Mode | Mnemonic | Action |
16 |
GETRESOLUTIONCOUNT |
Retrieve the available number of resolutions of the specified EncodingType. Return: Number of available resolutions if successful, else -1. |
Syntax 9
StrVal = CAMERADISPLAY(Mode, Window, Branch, Identity, EncodingType, Index);
Return type: STR.
Argument | Meaning |
Index | Index in the list of available resolutions. Starts at 0. Type INTEGER. |
Execution
Mode | Mnemonic | Action |
17 |
GETRESOLUTION |
Retrieve the resolution for the specified EncodingType and Index. Return: The resolution as a string if successful, else an empty string. |
Syntax 10
LongVal = CAMERADISPLAY(Mode, Window, Branch, Identity, PropertyName, PropertyValue);
Return type: LONG.
Argument | Meaning |
PropertyValue | The value for the property. Type INTEGER. Quality - Range 1 to 100 (camera-dependent) Bitrate max - Range 1 to 99999 (camera-dependent) Frame rate max - Range 1 to 30 (camera-dependent) |
Execution
Mode | Mnemonic | Action |
18 |
SETSTREAMPROP |
Set the property PropertyName with the value PropertyValue for the currently displayed stream. Return: 1 if successful, else 0. |
Syntax 11
IntVal = CAMERADISPLAY(Mode, Window, Branch, Identity, PropertyName);
Return type: INTEGER.
Execution
Mode | Mnemonic | Action |
19 |
GETSTREAMPROP |
Retrieve the value of the property PropertyName for the currently displayed stream. Return: The value of the property if successful, else -1. |
Syntax 12
IntVal = CAMERADISPLAY(Mode, Window, Branch, Identity, Delay[, StartPresetIndex[, EndPresetIndex]]);
Return type: INTEGER.
Argument | Meaning |
Delay | Time to spend on each preset before going to the next one in seconds. Minimum 5. Type INTEGER. |
StartPresetIndex | The index of the start preset. If omitted or less than 0 the start is the home position. Type INTEGER. |
EndPresetIndex | The index of the end preset. Must be more than or equal to the start preset. If omitted then it is the last preset. Type INTEGER. |
Execution
Mode | Mnemonic | Action |
20 |
STARTGUARDTOUR |
Start a camera guard tour. Return: 1 if successful, else 0. |
Syntax 13
StrVal = CAMERADISPLAY(Mode, Window, Branch, Identity, DevInfoName);
Return type: STR
Argument | Meaning |
DevInfoName |
The information to retrieve. Type STR. "Model" - The device model "Firmware" - The device firmware version "Hardware" - The device hardware version "Serial" - The device serial number |
Execution
Mode | Mnemonic | Action |
22 |
GETDEVICEINFO |
Retrieve the device information specified by DevInfoName. Return: The requested information as a string if successful, else an empty string. |