1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #pragma once
- #include <stdio.h>
- #ifdef _WIN32
- #ifdef LIBPICTUREPLAYER_EXPORTS
- #define LIBPICTUREPLAYER_API __declspec(dllexport)
- #else
- #define LIBPICTUREPLAYER_API __declspec(dllimport)
- #endif
- # elif ( defined(__GNUC__) && __GNUC__ >= 4 )
- #define LIBPICTUREPLAYER_API __attribute__((visibility("default")))
- #else // _WIN32
- #define LIBPICTUREPLAYER_API
- #endif // _WIN32
- #ifdef _WIN32
- #ifndef RVC_NO_VTABLE
- #define RVC_NO_VTABLE __declspec(novtable)
- #endif // !RVC_NO_VTABLE
- #else
- #ifndef RVC_NO_VTABLE
- #define RVC_NO_VTABLE
- #endif // !RVC_NO_VTABLE
- #endif // _WIN32
- #ifndef MAX_FILECOUNT
- #define MAX_FILECOUNT 32
- #endif // !MAX_FILECOUNT
- #ifndef MAX_PATH
- #define MAX_PATH 260
- #endif
- struct CPicPlayConfig
- {
- 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 RVC_NO_VTABLE CPicHostApi
- {
- virtual void PicDebug(const char* fmt, ...) = 0;
- virtual int LoadPlayConfig(CPicPlayConfig &config, int CfgInx = 0) = 0;
- };
- class libpictureplayer_impl;
- class LIBPICTUREPLAYER_API Clibpictureplayer
- {
- public:
- Clibpictureplayer(CPicHostApi* pHostApi);
- ~Clibpictureplayer();
- void Play(int nCfgInx, int nWndX, int nWndY, int nWndWidth, int nWndHeight);
- void PlayMedia(CPicPlayConfig& config);
- bool checkIsStop();
- bool checkIsPlay(void* pthreadid);
- void Close();
- private:
- libpictureplayer_impl* m_pImpl;
- };
|