[C++] 纯文本查看 复制代码
typedef enum
{
EPlayer_Msg_PlayStart = 1,
EPlayer_Msg_PlayStop = 2,
EPlayer_Msg_NetworkError = 3,
EPlayer_Msg_Video_BufferingStart = 4,
EPlayer_Msg_Video_BufferingStop = 5,
EPlayer_Msg_Audio_BufferingStart = 6,
EPlayer_Msg_Audio_BufferingStop = 7,
EPlayer_Msg_Audio_PlayFinished = 8,
EPlayer_Msg_Video_PlayFinished = 9,
EPlayer_Msg_Undefine = 0xFFFF,
} EPlayerMessage;
typedef enum
{
EPlayerStatus_Init,
EPlayerStatus_Opened,
EPlayerStatus_Playing,
EPlayerStatus_Seeking,
EPlayerStatus_Paused,
EPlayerStatus_Closed,
EPlayerStatus_Unknown = -1,
} EPlayerStatus;
typedef struct
{
bool hasAudio;
bool hasVideo;
unsigned int nDuration;
unsigned int nVideoWidth;
unsigned int nVideoHeight;
unsigned int nAudioChannels;
unsigned int nAudioSampleRate;
} MediaInfo;
typedef struct
{
void *pUserData;
void (*Callback)(void *pUserData, unsigned int msg);
} MediaNotifier;
typedef struct
{
void (*Init)();
void (*Uninit)();
int (*OpenMedia)(char* pMediaPath,
void* pVideoWindow,
unsigned int nWindowWidth,
unsigned int nWindowHeight);
int (*CloseMedia)();
int (*Play)();
int (*Pause)();
int (*Seek)(unsigned int nSeekPos/*ms*/);
int (*GetPlayingPos)();
int (*GetBufferingPos)();
EPlayerStatus (*GetPlayerStatus)();
void (*GetMeidaInfo)(MediaInfo* pMediaInfo);
void (*SetMessageNotifer)(MediaNotifier* pNotifier);
void (*ResizeVidoeScreen)(unsigned int nWidth, unsigned int nHeight);
void (*UpdateVideoScreen)(void* pScreen, unsigned int nWidth, unsigned int nHeight);
} EPlayerAPI;
请大佬帮忙转一下易语言 |