1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- #pragma once
- #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 // RVC_OS_WIN
- #ifndef TIME_LEN
- #define TIME_LEN 16
- #endif // !TIME_LEN
- #ifndef MAX_FILECOUNT
- #define MAX_FILECOUNT 32
- #endif // !MAX_FILECOUNT
- #ifndef MAX_PATH
- #define MAX_PATH 260
- #endif // !MAX_PATH
- typedef struct audio_param_s {
- int freq;
- int channels;
- int channel_layout;
- int fmt;
- int frame_size;
- int bytes_per_sec;
- }audio_param_t;
- enum media_loglevel {
- MEDIA_LOG_NO,
- MEDIA_LOG_DEBUG,
- MEDIA_LOG_INFO,
- MEDIA_LOG_ERROR
- };
- enum MediaPlayModeEnum
- {
- MEDIA_UNKNOWN = -1,
- MEDIA_SINGLE,
- MEDIA_LOCALAUDIO,
- MEDIA_LOCALVIDEO
- };
- struct CMediaPlayConfig
- {
- char strVideoRunTime_S[TIME_LEN];
- char strVideoRunTime_E[TIME_LEN];
- bool bFullScreen;
- bool bPrimMonitor;
- bool bSimpleMode;
- MediaPlayModeEnum eMode;
- int nWndX;
- int nWndY;
- int nWndWidth;
- int nWndHeight;
- int nFileCnt;
- int nPlayCnt;
- int nPlayInterval;
- char strNamePrefix[MAX_PATH];
- char strRootPath[MAX_PATH];
- char strFileNames[MAX_FILECOUNT][MAX_PATH];
- int nVolume;
- };
- struct RVC_NO_VTABLE CMediaHostApi
- {
- virtual int LoadPlayConfig(CMediaPlayConfig& config, int CfgInx = 0) = 0;
- virtual void Debug(media_loglevel log_level, const char* fmt, ...) = 0;
- virtual void MediaPlayFinished(int iMediaType) = 0;
- virtual int GetMediaPlayerIcoPath(char* strPath, int iLen) = 0;
- virtual int GetAudioOutDevName(char* strDev, int iLen) = 0;
- virtual int PlayingAudioDataCallback(audio_param_t *param, const void* input, unsigned long uaudiolen) = 0;
- };
|