#ifndef HKPLAY_TYPES_H
#define HKPLAY_TYPES_H

#include "HKNET_Types.h"

/*******************************************************************************************************
*
*
*
*
********************************************************************************************************/
typedef struct {
    long nWidth;
    long nHeight;
    long nStamp;
    long nType;
    long nFrameRate;
    DWORD dwFrameNum;
}FRAME_INFO;

/*******************************************************************************************************
*
*
*
*
********************************************************************************************************/
typedef s32(__stdcall* func_PlayM4_GetLastError)(LONG nPort);
typedef s32(__stdcall* func_PlayM4_GetPort)(LONG* nPort);
typedef s32(__stdcall* func_PlayM4_FreePort)(LONG nPort);

typedef s32(__stdcall* func_PlayM4_OpenStream)(LONG nPort, PBYTE pFileHeadBuf, DWORD nSize, DWORD nBufPoolSize);
typedef s32(__stdcall* func_PlayM4_CloseStream)(LONG nPort);

typedef s32(__stdcall* func_PlayM4_InputData)(LONG nPort, PBYTE pBuf, DWORD nSize);

typedef void (CALLBACK* func_DecCallback)(long nPort, char* pBuf, long nSize, FRAME_INFO* pFrameInfo, long nUser, long nReserved2);
typedef s32(__stdcall* func_PlayM4_SetDecCallBack)(LONG nPort, func_DecCallback cb);
typedef s32(__stdcall* func_PlayM4_SetDecCallBackEx)(LONG nPort, func_DecCallback cb, char* pDest, long nDestSize);
typedef s32(__stdcall* func_PlayM4_SetDecCallBackExMend)(LONG nPort, func_DecCallback cb, char* pDest, long nDestSize, long nUser);//decode+display(hwnd)

typedef s32(__stdcall* func_PlayM4_Play)(LONG nPort, void* hWnd);
typedef s32(__stdcall* func_PlayM4_Stop)(LONG nPort);
typedef s32(__stdcall* func_PlayM4_Pause)(LONG nPort, DWORD nPause);

typedef s32(__stdcall* func_PlayM4_PlaySound)(LONG nPort);
typedef s32(__stdcall* func_PlayM4_StopSound)();
typedef s32(__stdcall* func_PlayM4_SetVolume)(LONG nPort, WORD nVolume);

#endif
