libimgplayer.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #ifdef LIBIMGPLAYER_EXPORTS
  3. #define LIBIMGPLAYER_API __declspec(dllexport)
  4. #else
  5. #define LIBIMGPLAYER_API __declspec(dllimport)
  6. #endif
  7. #define MAX_FILECOUNT 32
  8. struct CImgPlayConfig
  9. {
  10. bool bFullScreen; // 是否全屏
  11. bool bPrimMonitor; // 是否主屏显示
  12. int nWndX; // 窗口X坐标
  13. int nWndY; // 窗口Y坐标
  14. int nWndWidth; // 窗口宽度
  15. int nWndHeight; // 窗口高度
  16. int nFileCnt; // 文件个数
  17. int nPlayCnt; // 播放次数
  18. int nPlayInterval; // 播放时间间隔
  19. char strRootPath[MAX_PATH]; // 根目录
  20. char strFileNames[MAX_FILECOUNT][MAX_PATH]; // 文件名数组
  21. };
  22. struct __declspec(novtable) CImgHostApi
  23. {
  24. virtual bool LoadPlayConfig(CImgPlayConfig &config, int CfgInx = 0) = 0;
  25. virtual void ImgDebug(const char *fmt, ...) = 0;
  26. };
  27. class libimgplayer_impl; // 桥接
  28. class LIBIMGPLAYER_API Clibimgplayer
  29. {
  30. public:
  31. Clibimgplayer(CImgHostApi *pHostApi);
  32. ~Clibimgplayer();
  33. VOID Play(int nCfgInx, int nWndX, int nWndY, int nWndWidth, int nWndHeight);
  34. VOID PlayMedia(CImgPlayConfig &config);
  35. BOOL checkIsStop();
  36. BOOL checkIsPlay(HANDLE &curThread);
  37. VOID Close();
  38. private:
  39. libimgplayer_impl *m_pImpl;
  40. };