package ClientDemo;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import com.sun.jna.ptr.IntByReference;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
public class HIKSDKSaveRealData {
public static void main(String[] args) {
HIKSDKSaveRealData HikSdk= new HIKSDKSaveRealData();
short port =8000;
//初始化连接信息 用户名密码IP地址端口号
CameraInfo cameraInfo = new CameraInfo();
cameraInfo.setAddress("192.168.1.64");
cameraInfo.setPort(port);
cameraInfo.setUserName("admin");
cameraInfo.setPwd("gw*123456");
HikSdk.SaveRealDataformDir(cameraInfo);
}
/*
* 通过云台参数控制摄像机位置
* param: CameraInfo 摄像机连接的基本信息
* return: null
* */
void SaveRealDataformDir(CameraInfo cameraInfo){
//设置设备通道号 查看Demo代码 通道号为1
NativeLong channel = new NativeLong(1);
cameraInfo.setChannel(channel);
//初始化HCNetSDK接口 实例化对象
HCNetSDK sdk = HCNetSDK.INSTANCE;
if (!sdk.NET_DVR_Init()) {
System.out.println("初始化失败..................");
}
//创建设备
H