hksdkapi.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. // NET_DVR_API LONG __stdcall NET_DVR_RealPlay_V40(LONG lUserID, LPNET_DVR_PREVIEWINFO lpPreviewInfo, REALDATACALLBACK fRealDataCallBack_V30 = NULL, void* pUser = NULL);
  19. LONG NET_DVR_RealPlay_V40(LONG lUserID, LPNET_DVR_PREVIEWINFO lpPreviewInfo, REALDATACALLBACK fRealDataCallBack_V30, void* pUser);
  20. bool NET_DVR_StopRealPlay(LONG lRealHandle);
  21. bool NET_DVR_SetExceptionCallBack_V30(UINT reserved1, void* reserved2, void (CALLBACK* fExceptionCallBack)(DWORD dwType, LONG lUserID, LONG lHandle, void* pUser), void* pUser);
  22. /* 播放器 PlayM4 API */
  23. bool PlayM4_GetPort(LONG* nPort);
  24. bool PlayM4_FreePort(LONG nPort);
  25. bool PlayM4_Stop(LONG nPort);
  26. bool PlayM4_CloseStream(LONG nPort);
  27. bool PlayM4_PlaySound(LONG nPort);
  28. bool PlayM4_InputData(LONG nPort, PBYTE pBuf, DWORD nSize);
  29. DWORD PlayM4_GetLastError(LONG nPort);
  30. #if defined (Q_OS_WIN)
  31. bool PlayM4_Play(LONG nPort, HWND hWnd);
  32. bool PlayM4_OpenStream(LONG nPort, PBYTE pFileHeadBuf, DWORD nSize, DWORD nBufPoolSize);
  33. #endif
  34. #if defined (C_WIN32)
  35. bool PlayM4_SetDecCallBackMend(LONG nPort, DecodeCB DecCBFun, long nUser);
  36. #elif defined (C_WIN64)
  37. bool PlayM4_SetDecCallBackMend(LONG nPort, DecodeCB DecCBFun, void* nUser);
  38. #elif defined (C_LINUX)
  39. int PlayM4_Play(int nPort, PLAYM4_HWND hWnd);
  40. int PlayM4_OpenStream(int nPort, unsigned char* pFileHeadBuf, unsigned int nSize, unsigned int nBufPoolSize);
  41. int PlayM4_SetDecCallBackMend(int nPort, DecodeCB DecCBFun, void* nUser);
  42. #endif
  43. #endif /* HKSDKAPI_H */