hksdkapi.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef HKSDKAPI_H
  2. #define HKSDKAPI_H
  3. #include "hksdkdefine.h"
  4. #include <QString>
  5. /* ========================================================================
  6. * ************************* 海康SDK的一些宏定义 ***************************
  7. * ======================================================================== */
  8. /* 加载动态库 */
  9. bool load_HKSDK_Library(QString libPath);
  10. /* 海康SDK Net API */
  11. bool NET_DVR_Init();
  12. bool NET_DVR_Cleanup();
  13. bool NET_DVR_SetConnectTime(DWORD dwWaitTime = 3000, DWORD dwTryTimes = 3);
  14. bool NET_DVR_SetReconnect(DWORD dwInterval = 30000, BOOL bEnableRecon = true);
  15. LONG NET_DVR_Login_V40(LPNET_DVR_USER_LOGIN_INFO pLoginInfo, LPNET_DVR_DEVICEINFO_V40 lpDeviceInfo);
  16. bool NET_DVR_Logout(LONG lUserID);
  17. DWORD NET_DVR_GetLastError();
  18. LONG NET_DVR_RealPlay_V40(LONG lUserID, LPNET_DVR_PREVIEWINFO lpPreviewInfo, REALDATACALLBACK fRealDataCallBack_V30, void* pUser);
  19. bool NET_DVR_StopRealPlay(LONG lRealHandle);
  20. bool NET_DVR_SetExceptionCallBack_V30(UINT reserved1, void* reserved2, void (CALLBACK* fExceptionCallBack)(DWORD dwType, LONG lUserID, LONG lHandle, void* pUser), void* pUser);
  21. /* 播放器 PlayM4 API */
  22. bool PlayM4_GetPort(LONG* nPort);
  23. bool PlayM4_FreePort(LONG nPort);
  24. bool PlayM4_Stop(LONG nPort);
  25. bool PlayM4_CloseStream(LONG nPort);
  26. bool PlayM4_PlaySound(LONG nPort);
  27. bool PlayM4_InputData(LONG nPort, PBYTE pBuf, DWORD nSize);
  28. DWORD PlayM4_GetLastError(LONG nPort);
  29. #if defined (Q_OS_WIN)
  30. bool PlayM4_Play(LONG nPort, HWND hWnd);
  31. bool PlayM4_OpenStream(LONG nPort, PBYTE pFileHeadBuf, DWORD nSize, DWORD nBufPoolSize);
  32. bool PlayM4_SetDecCallBackMend(LONG nPort, void (CALLBACK* DecCBFun)(long nPort, char* pBuf, long nSize, FRAME_INFO* pFrameInfo, void* nUser, void* nReserved2), void* nUser);
  33. #elif defined (Q_OS_LINUX)
  34. int PlayM4_Play(int nPort, PLAYM4_HWND hWnd);
  35. int PlayM4_OpenStream(int nPort, unsigned char* pFileHeadBuf, unsigned int nSize, unsigned int nBufPoolSize);
  36. int PlayM4_SetDecCallBackMend(int nPort, void (CALLBACK* DecCBFun)(int nPort, char* pBuf, int nSize, FRAME_INFO* pFrameInfo, void* nUser, int nReserved2), void* nUser);
  37. #endif
  38. #endif /* HKSDKAPI_H */