Call this API to set and call preset.
BOOL NET_DVR_PTZPreset_Other( LONG lUserID, LONG lChannel, DWORD dwPTZPresetCmd, DWORD dwPresetIndex );
[IN] Value returned by NET_DVR_Login_V40
[IN] Channel No.
[IN] Preset commands, see details in the following table:
Command |
Command No. |
Description |
---|---|---|
SET_PRESET |
8 |
Set preset. |
CLE_PRESET |
9 |
Clear preset. |
GOTO_PRESET |
39 |
Call preset. |
[IN] Preset No. (starts from 1), up to 300 presets can be supported.
Returns TRUE for success, and returns FALSE for failure.
If returning failed, you can call NET_DVR_GetLastError to get the error code.
The preset commands correspond to the control codes between device and PTZ, the device will send the control codes to PTZ according to the configured decoder type and address. If the decoder of device and PTZ mismatches, you should configure the device decoder again. If the PTZ decoder is not supported by device, it is not available to call this API to set and call preset.
If you call this API to control the PTZ, the device directly returns TRUE after receiving the control command. But for NET_DVR_PTZPreset, the device returns TRUE only when operation completed.