|
|
@ -1,8 +1,6 @@
|
|
|
|
package com.hcsdk;
|
|
|
|
package com.hcsdk;
|
|
|
|
|
|
|
|
|
|
|
|
import com.sun.jna.*;
|
|
|
|
import com.sun.jna.*;
|
|
|
|
import com.sun.jna.examples.win32.W32API;
|
|
|
|
|
|
|
|
import com.sun.jna.examples.win32.W32API.HWND;
|
|
|
|
|
|
|
|
import com.sun.jna.ptr.ByteByReference;
|
|
|
|
import com.sun.jna.ptr.ByteByReference;
|
|
|
|
import com.sun.jna.ptr.IntByReference;
|
|
|
|
import com.sun.jna.ptr.IntByReference;
|
|
|
|
import com.sun.jna.ptr.ShortByReference;
|
|
|
|
import com.sun.jna.ptr.ShortByReference;
|
|
|
@ -4141,7 +4139,7 @@ DVR实现巡航数据结构
|
|
|
|
public static class NET_DVR_CLIENTINFO extends Structure {
|
|
|
|
public static class NET_DVR_CLIENTINFO extends Structure {
|
|
|
|
public int lChannel;
|
|
|
|
public int lChannel;
|
|
|
|
public int lLinkMode;
|
|
|
|
public int lLinkMode;
|
|
|
|
public HWND hPlayWnd;
|
|
|
|
// public HWND hPlayWnd;
|
|
|
|
public String sMultiCastIP;
|
|
|
|
public String sMultiCastIP;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -4423,7 +4421,7 @@ DVR实现巡航数据结构
|
|
|
|
public NET_DVR_STREAM_INFO struIDInfo;
|
|
|
|
public NET_DVR_STREAM_INFO struIDInfo;
|
|
|
|
public NET_DVR_TIME struBeginTime;
|
|
|
|
public NET_DVR_TIME struBeginTime;
|
|
|
|
public NET_DVR_TIME struEndTime;
|
|
|
|
public NET_DVR_TIME struEndTime;
|
|
|
|
public HWND hWnd;
|
|
|
|
// public HWND hWnd;
|
|
|
|
public byte byDrawFrame; //0:不抽帧,1:抽帧
|
|
|
|
public byte byDrawFrame; //0:不抽帧,1:抽帧
|
|
|
|
public byte byVolumeType; //0-普通录像卷 1-存档卷
|
|
|
|
public byte byVolumeType; //0-普通录像卷 1-存档卷
|
|
|
|
public byte byVolumeNum; //卷号,目前指存档卷号
|
|
|
|
public byte byVolumeNum; //卷号,目前指存档卷号
|
|
|
@ -9755,9 +9753,9 @@ DVR实现巡航数据结构
|
|
|
|
public void invoke(int dwType, int lUserID, int lHandle, Pointer pUser);
|
|
|
|
public void invoke(int dwType, int lUserID, int lHandle, Pointer pUser);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static interface FDrawFun extends Callback {
|
|
|
|
// public static interface FDrawFun extends Callback {
|
|
|
|
public void invoke(int lRealHandle, W32API.HDC hDc, int dwUser);
|
|
|
|
// public void invoke(int lRealHandle, W32API.HDC hDc, int dwUser);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
public static interface FStdDataCallBack extends Callback {
|
|
|
|
public static interface FStdDataCallBack extends Callback {
|
|
|
|
public void invoke(int lRealHandle, int dwDataType, ByteByReference pBuffer, int dwBufSize, int dwUser);
|
|
|
|
public void invoke(int lRealHandle, int dwDataType, ByteByReference pBuffer, int dwBufSize, int dwUser);
|
|
|
@ -9853,9 +9851,9 @@ DVR实现巡航数据结构
|
|
|
|
|
|
|
|
|
|
|
|
boolean NET_DVR_UnlockFileByName(int lUserID, String sUnlockFileName);
|
|
|
|
boolean NET_DVR_UnlockFileByName(int lUserID, String sUnlockFileName);
|
|
|
|
|
|
|
|
|
|
|
|
int NET_DVR_PlayBackByName(int lUserID, String sPlayBackFileName, HWND hWnd);
|
|
|
|
// int NET_DVR_PlayBackByName(int lUserID, String sPlayBackFileName, HWND hWnd);
|
|
|
|
|
|
|
|
|
|
|
|
int NET_DVR_PlayBackByTime(int lUserID, int lChannel, NET_DVR_TIME lpStartTime, NET_DVR_TIME lpStopTime, HWND hWnd);
|
|
|
|
// int NET_DVR_PlayBackByTime(int lUserID, int lChannel, NET_DVR_TIME lpStartTime, NET_DVR_TIME lpStopTime, HWND hWnd);
|
|
|
|
|
|
|
|
|
|
|
|
int NET_DVR_PlayBackByTime_V40(int lUserID, NET_DVR_VOD_PARA pVodPara);
|
|
|
|
int NET_DVR_PlayBackByTime_V40(int lUserID, NET_DVR_VOD_PARA pVodPara);
|
|
|
|
|
|
|
|
|
|
|
@ -9958,7 +9956,7 @@ DVR实现巡航数据结构
|
|
|
|
|
|
|
|
|
|
|
|
boolean NET_DVR_StopRealPlay(int lRealHandle);
|
|
|
|
boolean NET_DVR_StopRealPlay(int lRealHandle);
|
|
|
|
|
|
|
|
|
|
|
|
boolean NET_DVR_RigisterDrawFun(int lRealHandle, FDrawFun fDrawFun, int dwUser);
|
|
|
|
// boolean NET_DVR_RigisterDrawFun(int lRealHandle, FDrawFun fDrawFun, int dwUser);
|
|
|
|
|
|
|
|
|
|
|
|
boolean NET_DVR_SetPlayerBufNumber(int lRealHandle, int dwBufNum);
|
|
|
|
boolean NET_DVR_SetPlayerBufNumber(int lRealHandle, int dwBufNum);
|
|
|
|
|
|
|
|
|
|
|
@ -10860,77 +10858,3 @@ DVR实现巡航数据结构
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//播放库函数声明,PlayCtrl.dll
|
|
|
|
|
|
|
|
interface PlayCtrl extends Library {
|
|
|
|
|
|
|
|
public static final int STREAME_REALTIME = 0;
|
|
|
|
|
|
|
|
public static final int STREAME_FILE = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean PlayM4_GetPort(IntByReference nPort);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean PlayM4_OpenStream(int nPort, ByteByReference pFileHeadBuf, int nSize, int nBufPoolSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean PlayM4_InputData(int nPort, ByteByReference pBuf, int nSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean PlayM4_CloseStream(int nPort);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean PlayM4_SetStreamOpenMode(int nPort, int nMode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean PlayM4_Play(int nPort, HWND hWnd);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean PlayM4_Stop(int nPort);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean PlayM4_SetSecretKey(int nPort, int lKeyType, String pSecretKey, int lKeyLen);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean PlayM4_GetPictureSize(int nPort, IntByReference pWidth, IntByReference pHeight);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean PlayM4_GetJPEG(int nPort, Pointer pBitmap, int nBufSize, IntByReference pBmpSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int PlayM4_GetLastError(int nPort);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean PlayM4_SetDecCallBackExMend(int nPort, DecCallBack decCBFun, Pointer pDest, int nDestSize, int nUser);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static interface DecCallBack extends Callback {
|
|
|
|
|
|
|
|
void invoke(int nPort, Pointer pBuf, int nSize, FRAME_INFO pFrameInfo, int nReserved1, int nReserved2);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class FRAME_INFO extends Structure {
|
|
|
|
|
|
|
|
public int nWidth; /* 画面宽,单位像素。如果是音频数据,则为音频声道数 */
|
|
|
|
|
|
|
|
public int nHeight; /* 画面高,单位像素。如果是音频数据,则为样位率 */
|
|
|
|
|
|
|
|
public int nStamp; /* 时标信息,单位毫秒 */
|
|
|
|
|
|
|
|
public int nType; /* 数据类型,T_AUDIO16, T_RGB32, T_YV12 */
|
|
|
|
|
|
|
|
public int nFrameRate; /* 编码时产生的图像帧率,如果是音频数据则为采样率 */
|
|
|
|
|
|
|
|
public int dwFrameNum; /* 帧号 */
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//windows gdi接口,gdi32.dll in system32 folder, 在设置遮挡区域,移动侦测区域等情况下使用
|
|
|
|
|
|
|
|
interface GDI32 extends W32API {
|
|
|
|
|
|
|
|
GDI32 INSTANCE = (GDI32) Native.loadLibrary("gdi32", GDI32.class, DEFAULT_OPTIONS);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static final int TRANSPARENT = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int SetBkMode(HDC hdc, int i);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HANDLE CreateSolidBrush(int icolor);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//windows user32接口,user32.dll in system32 folder, 在设置遮挡区域,移动侦测区域等情况下使用
|
|
|
|
|
|
|
|
interface USER32 extends W32API {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
USER32 INSTANCE = (USER32) Native.loadLibrary("user32", USER32.class, DEFAULT_OPTIONS);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static final int BF_LEFT = 0x0001;
|
|
|
|
|
|
|
|
public static final int BF_TOP = 0x0002;
|
|
|
|
|
|
|
|
public static final int BF_RIGHT = 0x0004;
|
|
|
|
|
|
|
|
public static final int BF_BOTTOM = 0x0008;
|
|
|
|
|
|
|
|
public static final int BDR_SUNKENOUTER = 0x0002;
|
|
|
|
|
|
|
|
public static final int BF_RECT = (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean DrawEdge(HDC hdc, com.sun.jna.examples.win32.GDI32.RECT qrc, int edge, int grfFlags);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int FillRect(HDC hDC, com.sun.jna.examples.win32.GDI32.RECT lprc, HANDLE hbr);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|