1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #pragma once
- #ifdef LIBIMGPLAYER_EXPORTS
- #define LIBIMGPLAYER_API __declspec(dllexport)
- #else
- #define LIBIMGPLAYER_API __declspec(dllimport)
- #endif
- #ifndef MAX_FILECOUNT
- #define MAX_FILECOUNT 32
- #endif // !MAX_FILECOUNT
- struct CImgPlayConfig
- {
- bool bFullScreen; // 是否全屏
- bool bPrimMonitor; // 是否主屏显示
- int nWndX; // 窗口X坐标
- int nWndY; // 窗口Y坐标
- int nWndWidth; // 窗口宽度
- int nWndHeight; // 窗口高度
- int nFileCnt; // 文件个数
- int nPlayCnt; // 播放次数
- int nPlayInterval; // 播放时间间隔
- char strRootPath[MAX_PATH]; // 根目录
- char strFileNames[MAX_FILECOUNT][MAX_PATH]; // 文件名数组
- };
- struct __declspec(novtable) CImgHostApi
- {
- virtual BOOL LoadPlayConfig(CImgPlayConfig &config, int CfgInx = 0) = 0;
- virtual void ImgDebug(const char *fmt, ...) = 0;
- };
- class libimgplayer_impl; // 桥接
- class LIBIMGPLAYER_API Clibimgplayer
- {
- public:
- Clibimgplayer(CImgHostApi *pHostApi);
- ~Clibimgplayer();
- VOID Play(int nCfgInx, int nWndX, int nWndY, int nWndWidth, int nWndHeight);
- VOID PlayMedia(CImgPlayConfig &config);
- BOOL checkIsStop();
- BOOL checkIsPlay(HANDLE &curThread);
- VOID Close();
- private:
- libimgplayer_impl *m_pImpl;
- };
|