plaympeg4.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. ///////////////////////////////////////////////////////////////////
  2. //File: PlayMpeg4.h
  3. //Date: 2004-07-10
  4. //Description: Interface for PlayM4.dll
  5. ///////////////////////////////////////////////////////////////////
  6. #ifndef PLAY_M4
  7. #define PLAY_M4
  8. #if defined( _WINDLL)
  9. #define PLAYM4_API extern "C"__declspec(dllexport)
  10. #else
  11. #define PLAYM4_API extern "C" __declspec(dllimport)
  12. #endif
  13. //Max channel numbers
  14. #define PLAYM4_MAX_SUPPORTS 500
  15. //Wave coef range;
  16. #define MIN_WAVE_COEF -100
  17. #define MAX_WAVE_COEF 100
  18. //Timer type
  19. #define TIMER_1 1 //Only 16 timers for every process.Default TIMER;
  20. #define TIMER_2 2 //Not limit;But the precision less than TIMER_1;
  21. //BUFFER TYPE
  22. #define BUF_VIDEO_SRC 1
  23. #define BUF_AUDIO_SRC 2
  24. #define BUF_VIDEO_RENDER 3
  25. #define BUF_AUDIO_RENDER 4
  26. //Error code
  27. #define PLAYM4_NOERROR 0 //no error
  28. #define PLAYM4_PARA_OVER 1 //input parameter is invalid;
  29. #define PLAYM4_ORDER_ERROR 2 //The order of the function to be called is error.
  30. #define PLAYM4_TIMER_ERROR 3 //Create multimedia clock failed;
  31. #define PLAYM4_DEC_VIDEO_ERROR 4 //Decode video data failed.
  32. #define PLAYM4_DEC_AUDIO_ERROR 5 //Decode audio data failed.
  33. #define PLAYM4_ALLOC_MEMORY_ERROR 6 //Allocate memory failed.
  34. #define PLAYM4_OPEN_FILE_ERROR 7 //Open the file failed.
  35. #define PLAYM4_CREATE_OBJ_ERROR 8 //Create thread or event failed
  36. #define PLAYM4_CREATE_DDRAW_ERROR 9 //Create DirectDraw object failed.
  37. #define PLAYM4_CREATE_OFFSCREEN_ERROR 10 //failed when creating off-screen surface.
  38. #define PLAYM4_BUF_OVER 11 //buffer is overflow
  39. #define PLAYM4_CREATE_SOUND_ERROR 12 //failed when creating audio device.
  40. #define PLAYM4_SET_VOLUME_ERROR 13 //Set volume failed
  41. #define PLAYM4_SUPPORT_FILE_ONLY 14 //The function only support play file.
  42. #define PLAYM4_SUPPORT_STREAM_ONLY 15 //The function only support play stream.
  43. #define PLAYM4_SYS_NOT_SUPPORT 16 //System not support.
  44. #define PLAYM4_FILEHEADER_UNKNOWN 17 //No file header.
  45. #define PLAYM4_VERSION_INCORRECT 18 //The version of decoder and encoder is not adapted.
  46. #define PLAYM4_INIT_DECODER_ERROR 19 //Initialize decoder failed.
  47. #define PLAYM4_CHECK_FILE_ERROR 20 //The file data is unknown.
  48. #define PLAYM4_INIT_TIMER_ERROR 21 //Initialize multimedia clock failed.
  49. #define PLAYM4_BLT_ERROR 22 //Blt failed.
  50. #define PLAYM4_UPDATE_ERROR 23 //Update failed.
  51. #define PLAYM4_OPEN_FILE_ERROR_MULTI 24 //openfile error, streamtype is multi
  52. #define PLAYM4_OPEN_FILE_ERROR_VIDEO 25 //openfile error, streamtype is video
  53. #define PLAYM4_JPEG_COMPRESS_ERROR 26 //JPEG compress error
  54. #define PLAYM4_EXTRACT_NOT_SUPPORT 27 //Don't support the version of this file.
  55. #define PLAYM4_EXTRACT_DATA_ERROR 28 //extract video data failed.
  56. #define PLAYM4_SECRET_KEY_ERROR 29 //Secret key is error //add 20071218
  57. //Max display regions.
  58. #define MAX_DISPLAY_WND 4
  59. //Display type
  60. #define DISPLAY_NORMAL 1
  61. #define DISPLAY_QUARTER 2
  62. //Display buffers
  63. #define MAX_DIS_FRAMES 50
  64. #define MIN_DIS_FRAMES 6
  65. //Locate by
  66. #define BY_FRAMENUM 1
  67. #define BY_FRAMETIME 2
  68. //Source buffer
  69. #define SOURCE_BUF_MAX 1024*100000
  70. #define SOURCE_BUF_MIN 1024*50
  71. //Stream type
  72. #define STREAME_REALTIME 0
  73. #define STREAME_FILE 1
  74. //frame type
  75. #define T_AUDIO16 101
  76. #define T_AUDIO8 100
  77. #define T_UYVY 1
  78. #define T_YV12 3
  79. #define T_RGB32 7
  80. //capability
  81. #define SUPPORT_DDRAW 1
  82. #define SUPPORT_BLT 2
  83. #define SUPPORT_BLTFOURCC 4
  84. #define SUPPORT_BLTSHRINKX 8
  85. #define SUPPORT_BLTSHRINKY 16
  86. #define SUPPORT_BLTSTRETCHX 32
  87. #define SUPPORT_BLTSTRETCHY 64
  88. #define SUPPORT_SSE 128
  89. #define SUPPORT_MMX 256
  90. // 以下宏定义用于HIK_MEDIAINFO结构
  91. #define FOURCC_HKMI 0x484B4D49 // "HKMI" HIK_MEDIAINFO结构标记
  92. // 系统封装格式
  93. #define SYSTEM_NULL 0x0 // 没有系统层,纯音频流或视频流
  94. #define SYSTEM_HIK 0x1 // 海康文件层
  95. #define SYSTEM_MPEG2_PS 0x2 // PS封装
  96. #define SYSTEM_MPEG2_TS 0x3 // TS封装
  97. #define SYSTEM_RTP 0x4 // rtp封装
  98. // 视频编码类型
  99. #define VIDEO_NULL 0x0 // 没有视频
  100. #define VIDEO_H264 0x1 // 标准H.264和海康H.264都可以用这个定义
  101. #define VIDEO_MPEG2 0x2 // 标准MPEG2
  102. #define VIDEO_MPEG4 0x3 // 标准MPEG4
  103. // 音频编码类型
  104. #define AUDIO_NULL 0x0000 // 没有音频
  105. #define AUDIO_ADPCM 0x1000 // ADPCM
  106. #define AUDIO_MPEG 0x2000 // MPEG 系列音频,解码器能自适应各种MPEG音频
  107. // G系列音频
  108. #define AUDIO_G711_U 0x7110
  109. #define AUDIO_G711_A 0x7111
  110. #define AUDIO_G722_1 0x7221
  111. #define AUDIO_G723_1 0x7231
  112. #define AUDIO_G726 0x7260
  113. #define AUDIO_G729 0x7290
  114. //Frame position
  115. typedef struct{
  116. long nFilePos;
  117. long nFrameNum;
  118. long nFrameTime;
  119. long nErrorFrameNum;
  120. SYSTEMTIME *pErrorTime;
  121. long nErrorLostFrameNum;
  122. long nErrorFrameSize;
  123. }FRAME_POS,*PFRAME_POS;
  124. //Frame Info
  125. typedef struct{
  126. long nWidth;
  127. long nHeight;
  128. long nStamp;
  129. long nType;
  130. long nFrameRate;
  131. DWORD dwFrameNum;
  132. }FRAME_INFO;
  133. //Frame
  134. typedef struct{
  135. char *pDataBuf;
  136. long nSize;
  137. long nFrameNum;
  138. BOOL bIsAudio;
  139. long nReserved;
  140. }FRAME_TYPE;
  141. //Watermark Info //add by gb 080119
  142. typedef struct{
  143. char *pDataBuf;
  144. long nSize;
  145. long nFrameNum;
  146. BOOL bRsaRight;
  147. long nReserved;
  148. }WATERMARK_INFO;
  149. #ifndef _HIK_MEDIAINFO_FLAG_
  150. #define _HIK_MEDIAINFO_FLAG_
  151. typedef struct _HIK_MEDIAINFO_ // modified by gb 080425
  152. {
  153. unsigned int media_fourcc; // "HKMI": 0x484B4D49 Hikvision Media Information
  154. unsigned short media_version; // 版本号:指本信息结构版本号,目前为0x0101,即1.01版本,01:主版本号;01:子版本号。
  155. unsigned short device_id; // 设备ID,便于跟踪/分析
  156. unsigned short system_format; // 系统封装层
  157. unsigned short video_format; // 视频编码类型
  158. unsigned short audio_format; // 音频编码类型
  159. unsigned char audio_channels; // 通道数
  160. unsigned char audio_bits_per_sample; // 样位率
  161. unsigned int audio_samplesrate; // 采样率
  162. unsigned int audio_bitrate; // 压缩音频码率,单位:bit
  163. unsigned int reserved[4]; // 保留
  164. }HIK_MEDIAINFO;
  165. #endif
  166. //////////////////////////////////////////////////////////////////////////////
  167. //API
  168. //////////////////////////////////////////////////////////////////////////////
  169. ////////////////ver 1.0///////////////////////////////////////
  170. //Initialize DirecDraw.Now invalid.
  171. PLAYM4_API BOOL __stdcall PlayM4_InitDDraw(HWND hWnd);
  172. //Release directDraw; Now invalid.
  173. PLAYM4_API BOOL __stdcall PlayM4_RealeseDDraw();
  174. PLAYM4_API BOOL __stdcall PlayM4_OpenFile(LONG nPort,LPSTR sFileName);
  175. PLAYM4_API BOOL __stdcall PlayM4_CloseFile(LONG nPort);
  176. PLAYM4_API BOOL __stdcall PlayM4_Play(LONG nPort, HWND hWnd);
  177. PLAYM4_API BOOL __stdcall PlayM4_Stop(LONG nPort);
  178. PLAYM4_API BOOL __stdcall PlayM4_Pause(LONG nPort,DWORD nPause);
  179. PLAYM4_API BOOL __stdcall PlayM4_Fast(LONG nPort);
  180. PLAYM4_API BOOL __stdcall PlayM4_Slow(LONG nPort);
  181. PLAYM4_API BOOL __stdcall PlayM4_OneByOne(LONG nPort);
  182. PLAYM4_API BOOL __stdcall PlayM4_SetPlayPos(LONG nPort,float fRelativePos);
  183. PLAYM4_API float __stdcall PlayM4_GetPlayPos(LONG nPort);
  184. PLAYM4_API BOOL __stdcall PlayM4_SetFileEndMsg(LONG nPort,HWND hWnd,UINT nMsg);
  185. PLAYM4_API BOOL __stdcall PlayM4_SetVolume(LONG nPort,WORD nVolume);
  186. PLAYM4_API BOOL __stdcall PlayM4_StopSound();
  187. PLAYM4_API BOOL __stdcall PlayM4_PlaySound(LONG nPort);
  188. PLAYM4_API BOOL __stdcall PlayM4_OpenStream(LONG nPort,PBYTE pFileHeadBuf,DWORD nSize,DWORD nBufPoolSize);
  189. PLAYM4_API BOOL __stdcall PlayM4_InputData(LONG nPort,PBYTE pBuf,DWORD nSize);
  190. PLAYM4_API BOOL __stdcall PlayM4_CloseStream(LONG nPort);
  191. PLAYM4_API int __stdcall PlayM4_GetCaps();
  192. PLAYM4_API DWORD __stdcall PlayM4_GetFileTime(LONG nPort);
  193. PLAYM4_API DWORD __stdcall PlayM4_GetPlayedTime(LONG nPort);
  194. PLAYM4_API DWORD __stdcall PlayM4_GetPlayedFrames(LONG nPort);
  195. ////////////////ver 2.0 added///////////////////////////////////////
  196. PLAYM4_API BOOL __stdcall PlayM4_SetDecCallBack(LONG nPort,void (CALLBACK* DecCBFun)(long nPort,char * pBuf,long nSize,FRAME_INFO * pFrameInfo, long nReserved1,long nReserved2));
  197. PLAYM4_API BOOL __stdcall PlayM4_SetDisplayCallBack(LONG nPort,void (CALLBACK* DisplayCBFun)(long nPort,char * pBuf,long nSize,long nWidth,long nHeight,long nStamp,long nType,long nReserved));
  198. PLAYM4_API BOOL __stdcall PLayM4_ConvertToBmpFile(char * pBuf,long nSize,long nWidth,long nHeight,long nType,char *sFileName);
  199. PLAYM4_API BOOL __stdcall PlayM4_ConvertToBmpFile(char * pBuf,long nSize,long nWidth,long nHeight,long nType,char *sFileName);
  200. PLAYM4_API BOOL __stdcall PLayM4_ConvertToBmpFile(char * pBuf,long nSize,long nWidth,long nHeight,long nType,char *sFileName);
  201. PLAYM4_API DWORD __stdcall PlayM4_GetFileTotalFrames(LONG nPort);
  202. PLAYM4_API DWORD __stdcall PlayM4_GetCurrentFrameRate(LONG nPort);
  203. PLAYM4_API DWORD __stdcall PlayM4_GetPlayedTimeEx(LONG nPort);
  204. PLAYM4_API BOOL __stdcall PlayM4_SetPlayedTimeEx(LONG nPort,DWORD nTime);
  205. PLAYM4_API DWORD __stdcall PlayM4_GetCurrentFrameNum(LONG nPort);
  206. PLAYM4_API BOOL __stdcall PlayM4_SetStreamOpenMode(LONG nPort,DWORD nMode);
  207. PLAYM4_API DWORD __stdcall PlayM4_GetFileHeadLength();
  208. PLAYM4_API DWORD __stdcall PlayM4_GetSdkVersion();
  209. ////////////////ver 2.2 added///////////////////////////////////////
  210. PLAYM4_API DWORD __stdcall PlayM4_GetLastError(LONG nPort);
  211. PLAYM4_API BOOL __stdcall PlayM4_RefreshPlay(LONG nPort);
  212. PLAYM4_API BOOL __stdcall PlayM4_SetOverlayMode(LONG nPort,BOOL bOverlay,COLORREF colorKey);
  213. PLAYM4_API BOOL __stdcall PlayM4_GetPictureSize(LONG nPort,LONG *pWidth,LONG *pHeight);
  214. PLAYM4_API BOOL __stdcall PlayM4_SetPicQuality(LONG nPort,BOOL bHighQuality);
  215. PLAYM4_API BOOL __stdcall PlayM4_PlaySoundShare(LONG nPort);
  216. PLAYM4_API BOOL __stdcall PlayM4_StopSoundShare(LONG nPort);
  217. ////////////////ver 2.4 added///////////////////////////////////////
  218. PLAYM4_API LONG __stdcall PlayM4_GetStreamOpenMode(LONG nPort);
  219. PLAYM4_API LONG __stdcall PlayM4_GetOverlayMode(LONG nPort);
  220. PLAYM4_API COLORREF __stdcall PlayM4_GetColorKey(LONG nPort);
  221. PLAYM4_API WORD __stdcall PlayM4_GetVolume(LONG nPort);
  222. PLAYM4_API BOOL __stdcall PlayM4_GetPictureQuality(LONG nPort,BOOL *bHighQuality);
  223. PLAYM4_API DWORD __stdcall PlayM4_GetSourceBufferRemain(LONG nPort);
  224. PLAYM4_API BOOL __stdcall PlayM4_ResetSourceBuffer(LONG nPort);
  225. PLAYM4_API BOOL __stdcall PlayM4_SetSourceBufCallBack(LONG nPort,DWORD nThreShold,void (CALLBACK * SourceBufCallBack)(long nPort,DWORD nBufSize,DWORD dwUser,void*pResvered),DWORD dwUser,void *pReserved);
  226. PLAYM4_API BOOL __stdcall PlayM4_ResetSourceBufFlag(LONG nPort);
  227. PLAYM4_API BOOL __stdcall PlayM4_SetDisplayBuf(LONG nPort,DWORD nNum);
  228. PLAYM4_API DWORD __stdcall PlayM4_GetDisplayBuf(LONG nPort);
  229. PLAYM4_API BOOL __stdcall PlayM4_OneByOneBack(LONG nPort);
  230. PLAYM4_API BOOL __stdcall PlayM4_SetFileRefCallBack(LONG nPort, void (__stdcall *pFileRefDone)(DWORD nPort,DWORD nUser),DWORD nUser);
  231. PLAYM4_API BOOL __stdcall PlayM4_SetCurrentFrameNum(LONG nPort,DWORD nFrameNum);
  232. PLAYM4_API BOOL __stdcall PlayM4_GetKeyFramePos(LONG nPort,DWORD nValue, DWORD nType, PFRAME_POS pFramePos);
  233. PLAYM4_API BOOL __stdcall PlayM4_GetNextKeyFramePos(LONG nPort,DWORD nValue, DWORD nType, PFRAME_POS pFramePos);
  234. #if (WINVER >= 0x0400)
  235. //Note: These funtion must be builded under win2000 or above with Microsoft Platform sdk.
  236. // You can download the sdk from "http://www.microsoft.com/msdownload/platformsdk/sdkupdate/";
  237. PLAYM4_API BOOL __stdcall PlayM4_InitDDrawDevice();
  238. PLAYM4_API void __stdcall PlayM4_ReleaseDDrawDevice();
  239. PLAYM4_API DWORD __stdcall PlayM4_GetDDrawDeviceTotalNums();
  240. PLAYM4_API BOOL __stdcall PlayM4_SetDDrawDevice(LONG nPort,DWORD nDeviceNum);
  241. //PLAYM4_API BOOL __stdcall PlayM4_GetDDrawDeviceInfo(DWORD nDeviceNum,LPSTR lpDriverDescription,DWORD nDespLen,LPSTR lpDriverName ,DWORD nNameLen,HMONITOR *hhMonitor);
  242. PLAYM4_API int __stdcall PlayM4_GetCapsEx(DWORD nDDrawDeviceNum);
  243. #endif
  244. PLAYM4_API BOOL __stdcall PlayM4_ThrowBFrameNum(LONG nPort,DWORD nNum);
  245. ////////////////ver 2.5 added///////////////////////////////////////
  246. PLAYM4_API BOOL __stdcall PlayM4_SetDisplayType(LONG nPort,LONG nType);
  247. PLAYM4_API long __stdcall PlayM4_GetDisplayType(LONG nPort);
  248. ////////////////ver 3.0 added///////////////////////////////////////
  249. PLAYM4_API BOOL __stdcall PlayM4_SetDecCBStream(LONG nPort,DWORD nStream);
  250. PLAYM4_API BOOL __stdcall PlayM4_SetDisplayRegion(LONG nPort,DWORD nRegionNum, RECT *pSrcRect, HWND hDestWnd, BOOL bEnable);
  251. PLAYM4_API BOOL __stdcall PlayM4_RefreshPlayEx(LONG nPort,DWORD nRegionNum);
  252. #if (WINVER >= 0x0400)
  253. //Note: The funtion must be builded under win2000 or above with Microsoft Platform sdk.
  254. // You can download the sdk from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/;
  255. PLAYM4_API BOOL __stdcall PlayM4_SetDDrawDeviceEx(LONG nPort,DWORD nRegionNum,DWORD nDeviceNum);
  256. #endif
  257. /////////////////v3.2 added/////////////////////////////////////////
  258. PLAYM4_API BOOL __stdcall PlayM4_GetRefValue(LONG nPort,BYTE *pBuffer, DWORD *pSize);
  259. PLAYM4_API BOOL __stdcall PlayM4_SetRefValue(LONG nPort,BYTE *pBuffer, DWORD nSize);
  260. PLAYM4_API BOOL __stdcall PlayM4_OpenStreamEx(LONG nPort,PBYTE pFileHeadBuf,DWORD nSize,DWORD nBufPoolSize);
  261. PLAYM4_API BOOL __stdcall PlayM4_CloseStreamEx(LONG nPort);
  262. PLAYM4_API BOOL __stdcall PlayM4_InputVideoData(LONG nPort,PBYTE pBuf,DWORD nSize);
  263. PLAYM4_API BOOL __stdcall PlayM4_InputAudioData(LONG nPort,PBYTE pBuf,DWORD nSize);
  264. PLAYM4_API BOOL __stdcall PlayM4_RigisterDrawFun(LONG nPort,void (CALLBACK* DrawFun)(long nPort,HDC hDc,LONG nUser),LONG nUser);
  265. PLAYM4_API BOOL __stdcall PlayM4_RegisterDrawFun(LONG nPort,void (CALLBACK* DrawFun)(long nPort,HDC hDc,LONG nUser),LONG nUser);
  266. //////////////////v3.4/////////////////////////////////////////////////////
  267. PLAYM4_API BOOL __stdcall PlayM4_SetTimerType(LONG nPort,DWORD nTimerType,DWORD nReserved);
  268. PLAYM4_API BOOL __stdcall PlayM4_GetTimerType(LONG nPort,DWORD *pTimerType,DWORD *pReserved);
  269. PLAYM4_API BOOL __stdcall PlayM4_ResetBuffer(LONG nPort,DWORD nBufType);
  270. PLAYM4_API DWORD __stdcall PlayM4_GetBufferValue(LONG nPort,DWORD nBufType);
  271. //////////////////V3.6/////////////////////////////////////////////////////////
  272. PLAYM4_API BOOL __stdcall PlayM4_AdjustWaveAudio(LONG nPort,LONG nCoefficient);
  273. PLAYM4_API BOOL __stdcall PlayM4_SetVerifyCallBack(LONG nPort, DWORD nBeginTime, DWORD nEndTime, void (__stdcall * funVerify)(long nPort, FRAME_POS * pFilePos, DWORD bIsVideo, DWORD nUser), DWORD nUser);
  274. PLAYM4_API BOOL __stdcall PlayM4_SetAudioCallBack(LONG nPort, void (__stdcall * funAudio)(long nPort, char * pAudioBuf, long nSize, long nStamp, long nType, long nUser), long nUser);
  275. PLAYM4_API BOOL __stdcall PlayM4_SetEncTypeChangeCallBack(LONG nPort,void(CALLBACK *funEncChange)(long nPort,long nUser),long nUser);
  276. PLAYM4_API BOOL __stdcall PlayM4_SetColor(LONG nPort, DWORD nRegionNum, int nBrightness, int nContrast, int nSaturation, int nHue);
  277. PLAYM4_API BOOL __stdcall PlayM4_GetColor(LONG nPort, DWORD nRegionNum, int *pBrightness, int *pContrast, int *pSaturation, int *pHue);
  278. PLAYM4_API BOOL __stdcall PlayM4_SetEncChangeMsg(LONG nPort,HWND hWnd,UINT nMsg);
  279. PLAYM4_API BOOL __stdcall PlayM4_GetOriginalFrameCallBack(LONG nPort, BOOL bIsChange,BOOL bNormalSpeed,long nStartFrameNum,long nStartStamp,long nFileHeader,void(CALLBACK *funGetOrignalFrame)(long nPort,FRAME_TYPE *frameType, long nUser),long nUser);
  280. PLAYM4_API BOOL __stdcall PlayM4_GetFileSpecialAttr(LONG nPort, DWORD *pTimeStamp,DWORD *pFileNum ,DWORD *pReserved);
  281. PLAYM4_API DWORD __stdcall PlayM4_GetSpecialData(LONG nPort);
  282. PLAYM4_API BOOL __stdcall PlayM4_SetCheckWatermarkCallBack(LONG nPort,void(CALLBACK* funCheckWatermark)(long nPort,WATERMARK_INFO* pWatermarkInfo,DWORD nUser),DWORD nUser);
  283. PLAYM4_API BOOL __stdcall PlayM4_SetImageSharpen(LONG nPort,DWORD nLevel);
  284. PLAYM4_API BOOL __stdcall PlayM4_GetThrowBFrameCallBack(LONG nPort,void(CALLBACK* funThrowBFrame)(long nPort,DWORD nBFrame,DWORD nUser),DWORD nUser);
  285. PLAYM4_API BOOL __stdcall PlayM4_SetDecodeFrameType(LONG nPort,DWORD nFrameType);
  286. PLAYM4_API BOOL __stdcall PlayM4_SetPlayMode(LONG nPort,BOOL bNormal);
  287. PLAYM4_API BOOL __stdcall PlayM4_SetGetUserDataCallBack(LONG nPort,void(CALLBACK* funGetUserData)(long nPort,BYTE *pUserBuf,DWORD nBufLen,DWORD nUser),DWORD nUser);
  288. PLAYM4_API BOOL __stdcall PlayM4_SetOverlayFlipMode(LONG nPort,BOOL bTrue);
  289. PLAYM4_API DWORD __stdcall PlayM4_GetAbsFrameNum(LONG nPort);
  290. //////////////////V4.7.0.0//////////////////////////////////////////////////////
  291. ////convert yuv to jpeg
  292. PLAYM4_API BOOL __stdcall PlayM4_ConvertToJpegFile(char * pBuf,long nSize,long nWidth,long nHeight,long nType,char *sFileName);
  293. PLAYM4_API BOOL __stdcall PlayM4_SetJpegQuality(long nQuality);
  294. //set deflash
  295. PLAYM4_API BOOL __stdcall PlayM4_SetDeflash(LONG nPort,BOOL bDefalsh);
  296. //////////////////V4.8.0.0/////////////////////////////////////////////////////////
  297. //check discontinuous frame number as error data?
  298. PLAYM4_API BOOL __stdcall PlayM4_CheckDiscontinuousFrameNum(LONG nPort, BOOL bCheck);
  299. //get bmp or jpeg
  300. PLAYM4_API BOOL __stdcall PlayM4_GetBMP(LONG nPort,PBYTE pBitmap,DWORD nBufSize,DWORD* pBmpSize);
  301. PLAYM4_API BOOL __stdcall PlayM4_GetJPEG(LONG nPort,PBYTE pJpeg,DWORD nBufSize,DWORD* pJpegSize);
  302. //dec call back mend
  303. PLAYM4_API BOOL __stdcall PlayM4_SetDecCallBackMend(LONG nPort,void (CALLBACK* DecCBFun)(long nPort,char * pBuf,long nSize,FRAME_INFO * pFrameInfo, long nUser,long nReserved2), long nUser);
  304. PLAYM4_API BOOL __stdcall PlayM4_SetSecretKey(LONG nPort, LONG lKeyType, char *pSecretKey, LONG lKeyLen);
  305. // add by gb 2007-12-23
  306. PLAYM4_API BOOL __stdcall PlayM4_SetFileEndCallback(LONG nPort, void(CALLBACK*FileEndCallback)(long nPort, void *pUser), void *pUser);
  307. // add by gb 080131 version 4.9.0.1
  308. PLAYM4_API BOOL __stdcall PlayM4_GetPort(LONG* nPort);
  309. PLAYM4_API BOOL __stdcall PlayM4_FreePort(LONG nPort);
  310. #endif