|
|
@ -6,7 +6,10 @@ import com.sun.jna.Pointer; |
|
|
|
import com.sun.jna.Structure; |
|
|
|
import com.sun.jna.ptr.IntByReference; |
|
|
|
import com.sun.jna.win32.StdCallLibrary; |
|
|
|
import com.sun.jna.Structure.ByValue; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
public interface NVSSDK extends Library { |
|
|
@ -141,8 +144,7 @@ public interface NVSSDK extends Library { |
|
|
|
public static final int RAW_AUDIO_AAC = 0x16; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static class RECT extends Structure implements Structure.ByValue { |
|
|
|
public static class RECT extends Structure implements ByValue { |
|
|
|
public int left; |
|
|
|
public int top; |
|
|
|
public int right; |
|
|
@ -150,7 +152,7 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("left", "top", "right", "bottom"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -162,8 +164,9 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("m_ulMajorVersion", "m_ulMinorVersion", "m_ulBuilder", "m_cVerInfo"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static class CLIENTINFO extends Structure { |
|
|
@ -171,11 +174,6 @@ public interface NVSSDK extends Library { |
|
|
|
allocateMemory(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
public int m_iServerID; |
|
|
|
public int m_iChannelNo; |
|
|
|
public byte[] m_cNetFile = new byte[255]; |
|
|
@ -190,6 +188,11 @@ public interface NVSSDK extends Library { |
|
|
|
public int m_iFlag; |
|
|
|
public int m_iPosition; |
|
|
|
public int m_iSpeed; |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return Arrays.asList("m_iServerID", "m_iChannelNo", "m_cNetFile", "m_cRemoteIP", "m_iNetMode", "m_iTimeout", "m_iTTL", "m_iBufferCount", "m_iDelayNum", "m_iDelayTime", "m_iStreamNO", "m_iFlag", "m_iPosition", "m_iSpeed"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -207,8 +210,9 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("m_cHostName", "m_cEncoder", "m_iRecvMode", "m_cProxy", "m_cFactoryID", "m_iPort", "m_nvsType", "m_iChanNum", "m_iLogonState", "m_iServerType"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static class PicTime extends Structure { |
|
|
@ -224,8 +228,9 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("uiYear", "uiMonth", "uiDay", "uiWeek", "uiHour", "uiMinute", "uiSecondsr", "uiMilliseconds"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static class PicData extends Structure { |
|
|
@ -236,7 +241,7 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("tPicTime", "iDataLen", "pcPicData"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -260,7 +265,7 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("iStructLen", "iWidth", "iHeight", "iChannelID", "iEventType", "iRuleID", "iTargetID", "iTargetType", "iTargetSpeed", "iTargetDirection", "tTargetPosition", "iPresetNo", "m_cRemoteIP", "iPicCount", "tPicData"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -270,7 +275,7 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("iType", "iValue"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -290,7 +295,7 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("iFaceId", "iDrop", "iFaceLevel", "tFaceRect", "iWidth", "iHeight", "iFaceAttrCount", "iFaceAttrStructSize", "ptFaceAttr", "iDataLen", "pcPicData"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -305,18 +310,19 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("iStructLen", "iSizeOfFull", "tFullData", "iFaceCount", "iSizeOfFace", "tPicData"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static class PICSTREAM_INFO extends Structure { |
|
|
|
|
|
|
|
public byte[] RecvBuffer = new byte[200*1024];//此处的400应不小于最大报警报文长度 |
|
|
|
public byte[] RecvBuffer = new byte[200 * 1024];//此处的400应不小于最大报警报文长度 |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("RecvBuffer"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -363,7 +369,7 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("iStructLen", "iChannelNo", "cbkPicStreamNotify", "pvUser"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -372,7 +378,7 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("pPointer"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -386,26 +392,28 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("iYear", "iMonth", "iDay", "iHour", "iMinute", "iSecond"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static class QueryFileChannel extends Structure{ |
|
|
|
public static class QueryFileChannel extends Structure { |
|
|
|
public int iChannelNo; |
|
|
|
public int iStreamNo; |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("iChannelNo", "iStreamNo"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static class ArrayQueryFileChannel extends Structure { |
|
|
|
|
|
|
|
public QueryFileChannel[] tArry = new QueryFileChannel[2]; |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("tArry"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -435,7 +443,8 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("iBufSize", "iQueryChannelNo", "iStreamNo", "iType", "tStartTime", "tStopTime", "iPageSize", "iPageNo", "iFiletype", "iDevType" |
|
|
|
, "cOtherQuery", "iTriggerType", "iTrigger", "iQueryType", "iQueryCondition", "cField", "iQueryChannelCount", "iBufferSize", "ptChannelList", "cLaneNo", "cVehicleType", "iFileAttr"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -448,11 +457,10 @@ public interface NVSSDK extends Library { |
|
|
|
public NVS_FILE_TIME tStopTime; //File end time |
|
|
|
public int iFileSize; //File size |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static class NVS_FILE_DATA_EX extends Structure { |
|
|
|
public int iSize; |
|
|
@ -460,11 +468,10 @@ public interface NVSSDK extends Library { |
|
|
|
public int iLocked; //add unlock state |
|
|
|
public int iFileAttr; //File attributes:0: nvr local storage; 10000: ipc storage |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static class DOWNLOAD_FILE extends Structure { |
|
|
|
public int m_iSize; //Structure size |
|
|
@ -484,11 +491,8 @@ public interface NVSSDK extends Library { |
|
|
|
public int m_iCryptType; //iCryptType = 0, no encryption; iCryptType = 1, is AES encryption |
|
|
|
public byte[] m_cCryptKey = new byte[32]; |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
public static class DOWNLOAD_TIMESPAN extends Structure { |
|
|
|
public int m_iSize; //Structure size |
|
|
@ -513,9 +517,10 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("m_iSize", "m_cLocalFilename", "m_iChannelNO", "m_tTimeBegin", "m_tTimeEnd", "m_iPosition", "m_iSpeed", "m_iIFrame", "m_iReqMode", "m_iVodTransEnable" |
|
|
|
, "m_iVodTransVideoSize", "m_iVodTransFrameRate", "m_iVodTransStreamRate", "m_iFileFlag", "m_iSaveFileType", "m_iStreamNo", "m_iFileAttr", "m_iCryptType", "m_cCryptKey"); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
public static class DOWNLOAD_CONTROL extends Structure { |
|
|
|
public int m_iSize; //Structure size |
|
|
@ -526,9 +531,9 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("m_iSize", "m_iPosition", "m_iSpeed", "m_iIFrame", "m_iReqMode"); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
public static class RAWFRAME_INFO extends Structure { |
|
|
|
public int nWidth; //Video width, audio data is 0 |
|
|
@ -543,9 +548,10 @@ public interface NVSSDK extends Library { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected List getFieldOrder() { |
|
|
|
return null; |
|
|
|
return Arrays.asList("nWidth", "nHeight", "nStamp", "nType", "nEnCoder","nFrameRate","nAbsStamp","ucBitsPerSample","uiSamplesPerSec"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
//Not decode the standard data before the pure h264 data |
|
|
|
public static interface RAWFRAME_NOTIFY extends StdCallLibrary.StdCallCallback { |
|
|
@ -588,13 +594,22 @@ public interface NVSSDK extends Library { |
|
|
|
int _iRecFileType); |
|
|
|
|
|
|
|
int NetClient_StopCaptureFile(int _ulConID); |
|
|
|
|
|
|
|
int NetClient_GetLogonStatus(int _iLogonID); |
|
|
|
int NetClient_GetDevInfo(int _iLogonID,ENCODERINFO _pEncoderInfo); |
|
|
|
|
|
|
|
int NetClient_GetDevInfo(int _iLogonID, ENCODERINFO _pEncoderInfo); |
|
|
|
|
|
|
|
int NetClient_Query_V4(int _iLogonID, int _iCmd, int _iChannel, Pointer _pvCmdBuf, int _iBufLen); |
|
|
|
|
|
|
|
int NetClient_NetFileGetFileCount(int _iLogonID, IntByReference _piTotalCount, IntByReference _piCurrentCount); |
|
|
|
int NetClient_NetFileGetQueryfileEx(int _iLogonID,int _iFileIndex, NVS_FILE_DATA_EX _pFileInfo); |
|
|
|
|
|
|
|
int NetClient_NetFileGetQueryfileEx(int _iLogonID, int _iFileIndex, NVS_FILE_DATA_EX _pFileInfo); |
|
|
|
|
|
|
|
int NetClient_NetFileDownload(IntByReference _uiConID, int _iLogonID, int _iCmd, Pointer _pvBuf, int _iBufSize); |
|
|
|
|
|
|
|
int NetClient_NetFileStopDownloadFile(int _uiConID); |
|
|
|
|
|
|
|
int NetClient_NetFileGetDownloadPos(int _uiConID, IntByReference _piPos, IntByReference _piDLSize); |
|
|
|
|
|
|
|
int NetClient_SetRawFrameCallBack(int _uiConID, RAWFRAME_NOTIFY _cbkGetFrame, Pointer _pContext); |
|
|
|
} |