1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- #pragma once
- #ifdef LIBWMPPLAYER_EXPORTS
- #define LIBWMPPLAYER_API __declspec(dllexport)
- #else
- #define LIBWMPPLAYER_API __declspec(dllimport)
- #endif
- #define TIME_LEN 9
- #define MAX_FILECOUNT 32
- enum PlayModeEnum
- {
- UNKNOWN = -1, // 未知
- SINGLE, // 单一
- SALESRECORD, // 客户经理
- LOCALAUDIO, // 本地音频
- LOCALVIDEO, // 本地视频
- THRIDSALESRECORD // 3.0客户经理双录
- };
- struct CWmpPlayConfig
- {
- char strVideoRunTime_S[TIME_LEN]; // 每天允许视频播放的起始时间
- char strVideoRunTime_E[TIME_LEN]; // 每天允许视频播放的终止时间
- bool bFullScreen; // 是否全屏
- bool bPrimMonitor; // 是否主屏显示
- bool bSimpleMode; // 是否简洁模式
- PlayModeEnum eMode; // 播放模式
- int nWndX; // 窗口X坐标
- int nWndY; // 窗口Y坐标
- int nWndWidth; // 窗口宽度
- int nWndHeight; // 窗口高度
- int nFileCnt; // 文件个数
- int nPlayCnt; // 播放次数
- int nPlayInterval; // 播放时间间隔
- char strNamePrefix[MAX_PATH]; // 客户经理录像名前缀
- char strRootPath[MAX_PATH]; // 根目录
- char strFileNames[MAX_FILECOUNT][MAX_PATH]; // 文件名数组
- // add by ly
- HANDLE h_WMPCreateEvent;
- HANDLE h_WMPPlayEndEvent;
- int nVolume; // 音量
- };
- struct __declspec(novtable) CWmpHostApi
- {
- virtual BOOL LoadPlayConfig(CWmpPlayConfig &config, int CfgInx = 0) = 0;
- virtual void WmpDebug(const char *fmt, ...) = 0;
- };
- class libwmpplayer_impl; // 桥接
- class LIBWMPPLAYER_API Clibwmpplayer
- {
- public:
- Clibwmpplayer(CWmpHostApi *pHostApi);
- ~Clibwmpplayer();
- VOID PlayVideo(const char *pVideoDir, const char *pNamePrefix = NULL, int nVideoCount = 1);
- VOID PlayLocalAudio(const char *pAudioNames);
- VOID PlayLocalVideo(int nCfgInx, int nWndX, int nWndY, int nWndWidth, int nWndHeight);
- VOID Close();
- BOOL checkIsPlay(HANDLE &curThread);
- BOOL checkIsStop();
- VOID PlayMedia(CWmpPlayConfig &config);
- VOID SetVolume(int nVolume);
- VOID PlaySalesRecordVideo(int nWndX, int nWndY, int nWndWidth, int nWndHeight, const char *pVideoDir, const char *pNamePrefix = NULL, int nVideoCount = 1);
- private:
- libwmpplayer_impl *m_pImpl;
- };
|