2006554111 发表于 2020-3-29 22:54

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;
请大佬帮忙转一下易语言

JuncoJet 发表于 2020-3-29 23:04

enum 直接数值就行了
struct 结构的话,不清楚

zyh666 发表于 2020-3-29 23:10

要是反过来多好
页: [1]
查看完整版本: C++代码转易语言