Skip to content

NET_SDK_PTZControl

Interface Definition

1
2
3
4
BOOL NET_SDK_PTZControl(
    POINTERHANDLE lLiveHandle,
    DWORD dwPTZCommand,
    DWORD dwSpeed);
1
2
3
4
public static extern bool NET_SDK_PTZControl(
    POINTERHANDLE lLiveHandle,
    int dwPTZCommand,
    int dwSpeed);

Function Description

PTZ control operation (image preview must be started first).

Parameter Description

Parameters Type Remark
lLiveHandlein POINTERHANDLE The preview handle, which is the return value of NET_SDK_LivePlay or NET_SDK_LivePlayEx.
dwPTZCommandin DWORD PTZ control command, refer to PTZ_CMD_TYPE.
dwSpeedin DWORD PTZ speed, refer to PTZ_SPEED.

Return Value

  • type:BOOL

  • remark:Returns TRUE if successful, FALSE if failed.

Remarks

Each action of the PTZ needs to be called twice, namely start and stop control, which is determined by the start and stop in the dwPTZCommand parameter in the interface. You need to open the preview before calling this interface. The commands of various PTZ operations between the device and the PTZ correspond to the control code between the device and the PTZ. The device will send the control code to the PTZ according to the currently set decoder type and decoder address. If the decoder currently set on the device does not match the PTZ device, the decoder of the device needs to be reconfigured. If the decoder device required by the PTZ device is not supported, it cannot be controlled by this interface. The PTZ moves at the maximum speed by default.

Error Code