You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
Java
37 lines
1.1 KiB
Java
1 year ago
|
package com.shxy.xyhkcamera;
|
||
|
|
||
|
import org.junit.jupiter.api.Test;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||
|
|
||
|
@SpringBootTest
|
||
|
class XyhkcameraApplicationTests {
|
||
|
|
||
|
// @Autowired
|
||
|
// HcNetSdkUtil hcNetSdkUtil;
|
||
|
@Test
|
||
|
void contextLoads() {
|
||
|
// hcNetSdkUtil.init();
|
||
|
// HCNetSDK instance = hcNetSdkUtil.createSDKInstance();
|
||
|
// if (b) {
|
||
|
// int admin = instance.NET_DVR_Login_V30("192.168.1.64", (short) 8000, "admin", "SHxy@510", new HCNetSDK.NET_DVR_DEVICEINFO_V30());
|
||
|
// System.out.println(admin);
|
||
|
// }
|
||
|
|
||
|
// String loadLibrary = OSUtils.getLoadLibrary();
|
||
|
// System.out.println(loadLibrary);
|
||
|
|
||
|
|
||
|
HCNetSDK.NET_DVR_SDKSTATE sdkState = new HCNetSDK.NET_DVR_SDKSTATE();
|
||
|
//获取当前SDK状态信息
|
||
|
boolean result = SdkInitService.hCNetSDK.NET_DVR_GetSDKState(sdkState);
|
||
|
if (result) {
|
||
|
sdkState.read();
|
||
|
} else {
|
||
|
int error = SdkInitService.hCNetSDK.NET_DVR_GetLastError();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|