mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-09-27 05:35:57 +08:00
bugfix:PTZ Move中,Xaddr的XAddr构建bug。
bugfix:onvif的PTZ的文档中的move方法,JSON结构错误,导致无法反序列化,另外不写Space参数,如果加了这个参数,海康会报错。
This commit is contained in:
@@ -930,14 +930,14 @@ POST /onvif/api/ptz
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"PanTilt": {
|
"Move":{
|
||||||
"X": 1,
|
"PanTilt": {
|
||||||
"Y": 1,
|
"X": 1,
|
||||||
"Space": "http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace"
|
"Y": 1
|
||||||
},
|
},
|
||||||
"Zoom": {
|
"Zoom": {
|
||||||
"X": 1,
|
"X": 1
|
||||||
"Space": "http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace"
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@@ -253,7 +253,7 @@ func (d *DeviceStatus) SetPtzPreset(name string, presetToken string) (*onvifType
|
|||||||
// PtzMove PTZ移动控制
|
// PtzMove PTZ移动控制
|
||||||
func (d *DeviceStatus) PtzMove(mode int, move ptz.Vector, speed ptz.Speed) error {
|
func (d *DeviceStatus) PtzMove(mode int, move ptz.Vector, speed ptz.Speed) error {
|
||||||
dev, err := donvif.NewDevice(donvif.DeviceParams{
|
dev, err := donvif.NewDevice(donvif.DeviceParams{
|
||||||
Xaddr: fmt.Sprintf("http://%s/onvif/device_service", d.IP),
|
Xaddr: fmt.Sprintf("%s:%s", d.IP, d.Port),
|
||||||
Username: d.Username,
|
Username: d.Username,
|
||||||
Password: d.Password,
|
Password: d.Password,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user