| | |
| | | return cameraSlice, true |
| | | } |
| | | |
| | | //UpdateResource 更新下级平台资源 |
| | | func (api Gb28181Api) UpdateResource(devID string) bool { |
| | | //updateResourceByID 更新下级平台资源 |
| | | func (api Gb28181Api) updateResourceByID(devID string) bool { |
| | | url := BASIC_URL + "/vss/get_catalog/" + devID |
| | | client := NewClient() |
| | | |
| | |
| | | return true |
| | | } |
| | | |
| | | func (api Gb28181Api) UpdateAllResource() { |
| | | devices, b := api.GetAllDevices() |
| | | if b && len(devices) > 0 { |
| | | for _, device := range devices { |
| | | api.updateResourceByID(device.PublicID) |
| | | } |
| | | } |
| | | } |
| | | |
| | | //SetCameraPtz 2.3 PTZ云台控制 |
| | | //"channelid": (字符串) 通道20位编号 |
| | | //"ptztype": (字符串) 控制类型:上"up",下"down",左"left",右"right",左上"leftup",左下"leftdown",右上"rightup",右下"rightdown",镜头近"zoomin",镜头远"zoomout", |