Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to stop calling the head interface for pending status through Onvif protocol?

Shulou Source: shulou.com Published: 2022-06-01 09:09:15 11月15日 Update

This article introduces in detail the corresponding analysis and solution to how to deal with the pending status by stopping the call to the head interface through the Onvif protocol, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

When the camera device supports the head, the video structured security intelligent platform EasyNVR supports calling the head control of the camera through the onvif protocol. However, if the user name and password are incorrect, the call to stop the head control API will always be in pending status.

The pending status of the interface can be seen through the browser debugging interface, but no content has been returned.

After analyzing the backend interface, it is found that there is a problem with the logic in the StopPTZ method. The logic currently used is as follows:

Func StopPTZ (host, username, password, deviceUrl string) (err error) {if dll = = nil {err = fmt.Errorf ("onvif dll not init") return} ptz: = fmt.Sprintf ("stop ptz host [% s] username [% s] password [% s] deviceUrl [% s]", host, username, password DeviceUrl) global.OperationLogger.Info (ptz) _ host: = uintptr (unsafe.Pointer (syscall.StringBytePtr (host) _ username: = uintptr (unsafe.Pointer (syscall.StringBytePtr (username) _ password: = uintptr (unsafe.Pointer (syscall.StringBytePtr (password) _ deviceUrl: = uintptr (unsafe.Pointer (syscall.StringBytePtr (deviceUrl) I: = 1 for I

Tags: Question interface head status content logic camera method more analysis help control camera support check solution run easy easy code Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Microsoft macOS Shulou Information OPPO Reno