| | |
| | | return bool; |
| | | } |
| | | |
| | | public String getFocusMode(CameraCmd cmd) |
| | | { |
| | | String cameraId = cmd.getCameraId(); |
| | | Integer channelNum = cmd.getChannelNum(); |
| | | if (!GlobalVariable.loginMap.containsKey(cameraId)) { |
| | | return ""; |
| | | } |
| | | Integer userId = GlobalVariable.loginMap.get(cameraId); |
| | | NET_DVR_FOCUSMODE_CFG struFocusMode = new NET_DVR_FOCUSMODE_CFG(); |
| | | Pointer point = struFocusMode.getPointer(); |
| | | IntByReference ibrBytesReturned = new IntByReference(0); |
| | | boolean b_GetCameraParam = hCNetSDK.NET_DVR_GetDVRConfig(userId, NET_DVR_GET_FOCUSMODECFG, channelNum, point, struFocusMode.size(), ibrBytesReturned); |
| | | if (!b_GetCameraParam) { |
| | | System.out.println("获取前端参数失败,错误码:" + hCNetSDK.NET_DVR_GetLastError()); |
| | | } |
| | | struFocusMode.read(); |
| | | log.info("当前聚焦模式:" + struFocusMode.byFocusMode); |
| | | return String.valueOf(struFocusMode.byFocusMode); |
| | | } |
| | | /** |
| | | * @描述 云台加热开关 |
| | | * @参数 [userId, channelNum, enable] |