| | |
| | | import com.ycl.api.DH.lib.structure.*; |
| | | import com.ycl.platform.domain.result.OSDResult; |
| | | import com.ycl.utils.StringUtils; |
| | | import constant.ApiConstants; |
| | | import enumeration.DeviceType; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | return bRet; |
| | | } |
| | | |
| | | public static OSDResult getOsd(LLong loginId) { |
| | | public static OSDResult getOsd(String serialNumber,LLong loginId) { |
| | | OSDResult osdResult = new OSDResult(); |
| | | NetSDKLib.NET_TIME deviceTime = new NetSDKLib.NET_TIME(); |
| | | if (!netsdk.CLIENT_QueryDeviceTime(loginId, deviceTime, 3000)) { |
| | |
| | | |
| | | NET_CFG_GBMODE_INFO osdInfo = new NET_CFG_GBMODE_INFO(); |
| | | osdInfo.write(); |
| | | boolean b = netsdk.CLIENT_GetConfig(loginId, NET_EM_CFG_GBMODE, 0, osdInfo.getPointer(), osdInfo.size(), 3000, reserve.getPointer()); |
| | | boolean b = false; |
| | | /** |
| | | * 通过国标倒数第七位判断通道 0/全景 1/细节 |
| | | * 对于海康来说: 国标倒7: 0/全景/通道2 1/细节/通道1 |
| | | * 对于大华来说: 国标倒7: 0/全景/通道1 1/细节/通道2 |
| | | * 宇视单通道不考虑 |
| | | */ |
| | | if(serialNumber.charAt(ApiConstants.SerialNumber_Channel) == ApiConstants.SerialNumber_All ) { |
| | | b = netsdk.CLIENT_GetConfig(loginId, NET_EM_CFG_GBMODE, 0, osdInfo.getPointer(), osdInfo.size(), 3000, reserve.getPointer()); |
| | | }else if(serialNumber.charAt(ApiConstants.SerialNumber_Channel) == ApiConstants.SerialNumber_Detail){ |
| | | b = netsdk.CLIENT_GetConfig(loginId, NET_EM_CFG_GBMODE, 1, osdInfo.getPointer(), osdInfo.size(), 3000, reserve.getPointer()); |
| | | } |
| | | |
| | | if (!b) { |
| | | // log.error("CLIENT_GetConfig Failed!" + ToolKits.getErrorCodePrint()); |
| | | return null; |