HikPlayMpeg4.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. ///////////////////////////////////////////////////////////////////
  2. //File: HikPlayMpeg4.h
  3. //Date: 2003-12-06
  4. //Description: Interface for HikPlayM4.dll
  5. //Copyright: Copyright(C)HangZhou Hikvision Digital Technology Co,.Ltd 2002-2008. All rights reserved.
  6. ///////////////////////////////////////////////////////////////////
  7. #ifndef _HIK_PLAY_M4
  8. #define _HIK_PLAY_M4
  9. #if defined( _WINDLL)
  10. #define HIK_PLAYM4_API extern "C"__declspec(dllexport)
  11. #else
  12. #define HIK_PLAYM4_API extern "C" //__declspec(dllimport)
  13. #endif
  14. //Max channel numbers
  15. #define HIK_PLAYM4_MAX_SUPPORTS 500
  16. //Wave coef range;
  17. #define MIN_WAVE_COEF -100
  18. #define MAX_WAVE_COEF 100
  19. //Timer type
  20. #define TIMER_1 1 //Only 16 timers for every process.Default TIMER;
  21. #define TIMER_2 2 //Not limit;But the precision less than TIMER_1;
  22. //BUFFER TYPE
  23. #define BUF_VIDEO_SRC 1
  24. #define BUF_AUDIO_SRC 2
  25. #define BUF_VIDEO_RENDER 3
  26. #define BUF_AUDIO_RENDER 4
  27. //Error code
  28. #define HIK_PLAYM4_NOERROR 0 //no error
  29. #define HIK_PLAYM4_PARA_OVER 1 //input parameter is invalid;
  30. #define HIK_PLAYM4_ORDER_ERROR 2 //The order of the function to be called is error.
  31. #define HIK_PLAYM4_TIMER_ERROR 3 //Create multimedia clock failed;
  32. #define HIK_PLAYM4_DEC_VIDEO_ERROR 4 //Decode video data failed.
  33. #define HIK_PLAYM4_DEC_AUDIO_ERROR 5 //Decode audio data failed.
  34. #define HIK_PLAYM4_ALLOC_MEMORY_ERROR 6 //Allocate memory failed.
  35. #define HIK_PLAYM4_OPEN_FILE_ERROR 7 //Open the file failed.
  36. #define HIK_PLAYM4_CREATE_OBJ_ERROR 8 //Create thread or event failed
  37. #define HIK_PLAYM4_CREATE_DDRAW_ERROR 9 //Create DirectDraw object failed.
  38. #define HIK_PLAYM4_CREATE_OFFSCREEN_ERROR 10 //failed when creating off-screen surface.
  39. #define HIK_PLAYM4_BUF_OVER 11 //buffer is overflow
  40. #define HIK_PLAYM4_CREATE_SOUND_ERROR 12 //failed when creating audio device.
  41. #define HIK_PLAYM4_SET_VOLUME_ERROR 13 //Set volume failed
  42. #define HIK_PLAYM4_SUPPORT_FILE_ONLY 14 //The function only support play file.
  43. #define HIK_PLAYM4_SUPPORT_STREAM_ONLY 15 //The function only support play stream.
  44. #define HIK_PLAYM4_SYS_NOT_SUPPORT 16 //System not support.
  45. #define HIK_PLAYM4_FILEHEADER_UNKNOWN 17 //No file header.
  46. #define HIK_PLAYM4_VERSION_INCORRECT 18 //The version of decoder and encoder is not adapted.
  47. #define HIK_PLAYM4_INIT_DECODER_ERROR 19 //Initialize decoder failed.
  48. #define HIK_PLAYM4_CHECK_FILE_ERROR 20 //The file data is unknown.
  49. #define HIK_PLAYM4_INIT_TIMER_ERROR 21 //Initialize multimedia clock failed.
  50. #define HIK_PLAYM4_BLT_ERROR 22 //Blt failed.
  51. #define HIK_PLAYM4_UPDATE_ERROR 23 //Update failed.
  52. #define HIK_PLAYM4_OPEN_FILE_ERROR_MULTI 24 //openfile error, streamtype is multi
  53. #define HIK_PLAYM4_OPEN_FILE_ERROR_VIDEO 25 //openfile error, streamtype is video
  54. #define HIK_PLAYM4_JPEG_COMPRESS_ERROR 26 //JPEG compress error
  55. #define HIK_PLAYM4_EXTRACT_NOT_SUPPORT 27 //Don't support the version of this file.
  56. #define HIK_PLAYM4_EXTRACT_DATA_ERROR 28 //extract video data failed.
  57. #define HIK_PLAYM4_SECRET_KEY_ERROR 29 //Secret key is error //add 20071218
  58. //Max display regions.
  59. #define MAX_DISPLAY_WND 4
  60. //Display type
  61. #define DISPLAY_NORMAL 1
  62. #define DISPLAY_QUARTER 2
  63. //Display buffers
  64. #define MAX_DIS_FRAMES 50
  65. #define MIN_DIS_FRAMES 6
  66. //Locate by
  67. #define BY_FRAMENUM 1
  68. #define BY_FRAMETIME 2
  69. //Source buffer
  70. #define SOURCE_BUF_MAX 1024*100000
  71. #define SOURCE_BUF_MIN 1024*50
  72. //Stream type
  73. #define STREAME_REALTIME 0
  74. #define STREAME_FILE 1
  75. //frame type
  76. #define T_AUDIO16 101
  77. #define T_AUDIO8 100
  78. #define T_UYVY 1
  79. #define T_YV12 3
  80. #define T_RGB32 7
  81. //capability
  82. #define SUPPORT_DDRAW 1
  83. #define SUPPORT_BLT 2
  84. #define SUPPORT_BLTFOURCC 4
  85. #define SUPPORT_BLTSHRINKX 8
  86. #define SUPPORT_BLTSHRINKY 16
  87. #define SUPPORT_BLTSTRETCHX 32
  88. #define SUPPORT_BLTSTRETCHY 64
  89. #define SUPPORT_SSE 128
  90. #define SUPPORT_MMX 256
  91. //Frame position
  92. typedef struct{
  93. long nFilePos;
  94. long nFrameNum;
  95. long nFrameTime;
  96. long nErrorFrameNum;
  97. SYSTEMTIME *pErrorTime;
  98. long nErrorLostFrameNum;
  99. long nErrorFrameSize;
  100. }FRAME_POS,*PFRAME_POS;
  101. //Frame Info
  102. typedef struct{
  103. long nWidth;
  104. long nHeight;
  105. long nStamp;
  106. long nType;
  107. long nFrameRate;
  108. DWORD dwFrameNum;
  109. }FRAME_INFO;
  110. //Frame
  111. typedef struct{
  112. char *pDataBuf;
  113. long nSize;
  114. long nFrameNum;
  115. BOOL bIsAudio;
  116. long nReserved;
  117. }FRAME_TYPE;
  118. //Watermark Info //add by gb 080119
  119. typedef struct{
  120. char *pDataBuf;
  121. long nSize;
  122. long nFrameNum;
  123. BOOL bRsaRight;
  124. long nReserved;
  125. }WATERMARK_INFO;
  126. #ifndef _HIK_MEDIAINFO_FLAG_
  127. #define _HIK_MEDIAINFO_FLAG_
  128. typedef struct _HIK_MEDIAINFO_ // add by gb 080321
  129. {
  130. unsigned short system_format; // 系统封装层
  131. unsigned short video_format; // 视频编码类型
  132. unsigned short audio_format; // 音频编码类型
  133. unsigned char audio_channels; // 通道数
  134. unsigned char audio_bits_per_sample; // 样位率
  135. unsigned int audio_samplesrate; // 采样率
  136. unsigned int audio_bitrate; // 音频码率
  137. unsigned short audio_blocksize; // 音频压缩包大小
  138. unsigned short audio_reserved; // 保留
  139. unsigned int reserved[5]; // 保留
  140. }HIK_MEDIAINFO;
  141. #endif
  142. //////////////////////////////////////////////////////////////////////////////
  143. //API
  144. //////////////////////////////////////////////////////////////////////////////
  145. ////////////////ver 1.0///////////////////////////////////////
  146. //Initialize DirecDraw.Now invalid.
  147. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_InitDDraw(HWND hWnd);
  148. //Release directDraw; Now invalid.
  149. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_RealeseDDraw();
  150. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_OpenFile(LONG nPort,LPSTR sFileName);
  151. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_CloseFile(LONG nPort);
  152. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_Play(LONG nPort, HWND hWnd);
  153. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_Stop(LONG nPort);
  154. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_Pause(LONG nPort,DWORD nPause);
  155. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_Fast(LONG nPort);
  156. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_Slow(LONG nPort);
  157. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_OneByOne(LONG nPort);
  158. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetPlayPos(LONG nPort,float fRelativePos);
  159. HIK_PLAYM4_API float __stdcall Hik_PlayM4_GetPlayPos(LONG nPort);
  160. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetFileEndMsg(LONG nPort,HWND hWnd,UINT nMsg);
  161. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetVolume(LONG nPort,WORD nVolume);
  162. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_StopSound();
  163. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_PlaySound(LONG nPort);
  164. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_OpenStream(LONG nPort,PBYTE pFileHeadBuf,DWORD nSize,DWORD nBufPoolSize);
  165. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_InputData(LONG nPort,PBYTE pBuf,DWORD nSize);
  166. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_CloseStream(LONG nPort);
  167. HIK_PLAYM4_API int __stdcall Hik_PlayM4_GetCaps();
  168. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetFileTime(LONG nPort);
  169. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetPlayedTime(LONG nPort);
  170. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetPlayedFrames(LONG nPort);
  171. ////////////////ver 2.0 added///////////////////////////////////////
  172. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetDecCallBack(LONG nPort,void (CALLBACK* DecCBFun)(long nPort,char * pBuf,long nSize,FRAME_INFO * pFrameInfo, long nReserved1,long nReserved2));
  173. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetDisplayCallBack(LONG nPort,void (CALLBACK* DisplayCBFun)(long nPort,char * pBuf,long nSize,long nWidth,long nHeight,long nStamp,long nType,long nReserved));
  174. HIK_PLAYM4_API BOOL __stdcall Hik_PLayM4_ConvertToBmpFile(char * pBuf,long nSize,long nWidth,long nHeight,long nType,char *sFileName);
  175. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_ConvertToBmpFile(char * pBuf,long nSize,long nWidth,long nHeight,long nType,char *sFileName);
  176. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetFileTotalFrames(LONG nPort);
  177. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetCurrentFrameRate(LONG nPort);
  178. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetPlayedTimeEx(LONG nPort);
  179. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetPlayedTimeEx(LONG nPort,DWORD nTime);
  180. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetCurrentFrameNum(LONG nPort);
  181. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetStreamOpenMode(LONG nPort,DWORD nMode);
  182. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetFileHeadLength();
  183. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetSdkVersion();
  184. ////////////////ver 2.2 added///////////////////////////////////////
  185. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetLastError(LONG nPort);
  186. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_RefreshPlay(LONG nPort);
  187. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetOverlayMode(LONG nPort,BOOL bOverlay,COLORREF colorKey);
  188. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetPictureSize(LONG nPort,LONG *pWidth,LONG *pHeight);
  189. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetPicQuality(LONG nPort,BOOL bHighQuality);
  190. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_PlaySoundShare(LONG nPort);
  191. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_StopSoundShare(LONG nPort);
  192. ////////////////ver 2.4 added///////////////////////////////////////
  193. HIK_PLAYM4_API LONG __stdcall Hik_PlayM4_GetStreamOpenMode(LONG nPort);
  194. HIK_PLAYM4_API LONG __stdcall Hik_PlayM4_GetOverlayMode(LONG nPort);
  195. HIK_PLAYM4_API COLORREF __stdcall Hik_PlayM4_GetColorKey(LONG nPort);
  196. HIK_PLAYM4_API WORD __stdcall Hik_PlayM4_GetVolume(LONG nPort);
  197. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetPictureQuality(LONG nPort,BOOL *bHighQuality);
  198. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetSourceBufferRemain(LONG nPort);
  199. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_ResetSourceBuffer(LONG nPort);
  200. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetSourceBufCallBack(LONG nPort,DWORD nThreShold,void (CALLBACK * SourceBufCallBack)(long nPort,DWORD nBufSize,DWORD dwUser,void*pResvered),DWORD dwUser,void *pReserved);
  201. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_ResetSourceBufFlag(LONG nPort);
  202. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetDisplayBuf(LONG nPort,DWORD nNum);
  203. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetDisplayBuf(LONG nPort);
  204. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_OneByOneBack(LONG nPort);
  205. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetFileRefCallBack(LONG nPort, void (__stdcall *pFileRefDone)(DWORD nPort,DWORD nUser),DWORD nUser);
  206. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetCurrentFrameNum(LONG nPort,DWORD nFrameNum);
  207. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetKeyFramePos(LONG nPort,DWORD nValue, DWORD nType, PFRAME_POS pFramePos);
  208. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetNextKeyFramePos(LONG nPort,DWORD nValue, DWORD nType, PFRAME_POS pFramePos);
  209. #if (WINVER >= 0x0400)
  210. //Note: These funtion must be builded under win2000 or above with Microsoft Platform sdk.
  211. // You can download the sdk from "http://www.microsoft.com/msdownload/platformsdk/sdkupdate/";
  212. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_InitDDrawDevice();
  213. HIK_PLAYM4_API void __stdcall Hik_PlayM4_ReleaseDDrawDevice();
  214. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetDDrawDeviceTotalNums();
  215. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetDDrawDevice(LONG nPort,DWORD nDeviceNum);
  216. //HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetDDrawDeviceInfo(DWORD nDeviceNum,LPSTR lpDriverDescription,DWORD nDespLen,LPSTR lpDriverName ,DWORD nNameLen,HMONITOR *hhMonitor);
  217. HIK_PLAYM4_API int __stdcall Hik_PlayM4_GetCapsEx(DWORD nDDrawDeviceNum);
  218. #endif
  219. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_ThrowBFrameNum(LONG nPort,DWORD nNum);
  220. ////////////////ver 2.5 added///////////////////////////////////////
  221. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetDisplayType(LONG nPort,LONG nType);
  222. HIK_PLAYM4_API long __stdcall Hik_PlayM4_GetDisplayType(LONG nPort);
  223. ////////////////ver 3.0 added///////////////////////////////////////
  224. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetDecCBStream(LONG nPort,DWORD nStream);
  225. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetDisplayRegion(LONG nPort,DWORD nRegionNum, RECT *pSrcRect, HWND hDestWnd, BOOL bEnable);
  226. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_RefreshPlayEx(LONG nPort,DWORD nRegionNum);
  227. #if (WINVER >= 0x0400)
  228. //Note: The funtion must be builded under win2000 or above with Microsoft Platform sdk.
  229. // You can download the sdk from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/;
  230. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetDDrawDeviceEx(LONG nPort,DWORD nRegionNum,DWORD nDeviceNum);
  231. #endif
  232. /////////////////v3.2 added/////////////////////////////////////////
  233. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetRefValue(LONG nPort,BYTE *pBuffer, DWORD *pSize);
  234. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetRefValue(LONG nPort,BYTE *pBuffer, DWORD nSize);
  235. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_OpenStreamEx(LONG nPort,PBYTE pFileHeadBuf,DWORD nSize,DWORD nBufPoolSize);
  236. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_CloseStreamEx(LONG nPort);
  237. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_InputVideoData(LONG nPort,PBYTE pBuf,DWORD nSize);
  238. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_InputAudioData(LONG nPort,PBYTE pBuf,DWORD nSize);
  239. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_RigisterDrawFun(LONG nPort,void (CALLBACK* DrawFun)(long nPort,HDC hDc,LONG nUser),LONG nUser);
  240. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_RegisterDrawFun(LONG nPort,void (CALLBACK* DrawFun)(long nPort,HDC hDc,LONG nUser),LONG nUser);
  241. //////////////////v3.4/////////////////////////////////////////////////////
  242. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetTimerType(LONG nPort,DWORD nTimerType,DWORD nReserved);
  243. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetTimerType(LONG nPort,DWORD *pTimerType,DWORD *pReserved);
  244. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_ResetBuffer(LONG nPort,DWORD nBufType);
  245. HIK_PLAYM4_API DWORD __stdcall Hik_PlayM4_GetBufferValue(LONG nPort,DWORD nBufType);
  246. //////////////////V3.6/////////////////////////////////////////////////////////
  247. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_AdjustWaveAudio(LONG nPort,LONG nCoefficient);
  248. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetVerifyCallBack(LONG nPort, DWORD nBeginTime, DWORD nEndTime, void (__stdcall * funVerify)(long nPort, FRAME_POS * pFilePos, DWORD bIsVideo, DWORD nUser), DWORD nUser);
  249. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetAudioCallBack(LONG nPort, void (__stdcall * funAudio)(long nPort, char * pAudioBuf, long nSize, long nStamp, long nType, long nUser), long nUser);
  250. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetEncTypeChangeCallBack(LONG nPort,void(CALLBACK *funEncChange)(long nPort,long nUser),long nUser);
  251. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetColor(LONG nPort, DWORD nRegionNum, int nBrightness, int nContrast, int nSaturation, int nHue);
  252. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetColor(LONG nPort, DWORD nRegionNum, int *pBrightness, int *pContrast, int *pSaturation, int *pHue);
  253. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetEncChangeMsg(LONG nPort,HWND hWnd,UINT nMsg);
  254. HIK_PLAYM4_API BOOL __stdcall Hik_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);
  255. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetFileSpecialAttr(LONG nPort, DWORD *pTimeStamp,DWORD *pFileNum ,DWORD *pReserved);
  256. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetCheckWatermarkCallBack(LONG nPort,void(CALLBACK* funCheckWatermark)(long nPort,WATERMARK_INFO* pWatermarkInfo,DWORD nUser),DWORD nUser);
  257. //////////////////V4.7.0.0/////////////////////////////////////////////////////////
  258. //convert yuv to jpeg
  259. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_ConvertToJpegFile(char * pBuf,long nSize,long nWidth,long nHeight,long nType,char *sFileName);
  260. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetJpegQuality(long nQuality);
  261. //set deflash
  262. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetDeflash(LONG nPort,BOOL bDeflash);
  263. //input filehead
  264. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_InputFileHead(LONG nPort,PBYTE pFileHeadBuf,DWORD nSize);
  265. //////////////////V4.8.0.0/////////////////////////////////////////////////////////
  266. //check discontinuous frame number as error data?
  267. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_CheckDiscontinuousFrameNum(LONG nPort, BOOL bCheck);
  268. //get bmp or jpeg
  269. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetBMP(LONG nPort,PBYTE pBitmap,DWORD nBufSize,DWORD* pBmpSize);
  270. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetJPEG(LONG nPort,PBYTE pJpeg,DWORD nBufSize,DWORD* pJpegSize);
  271. //dec call back mend
  272. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetDecCallBackMend(LONG nPort,void (CALLBACK* DecCBFun)(long nPort,char * pBuf,long nSize,FRAME_INFO * pFrameInfo, long nReserved1,long nReserved2), long nUser);
  273. // add by jyh 2007-12-18
  274. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_MakeStreamHeader(PBYTE pBuf, DWORD dwSysFormat, DWORD dwVideoFormat, DWORD dwAudioFormat, DWORD dwReserved);
  275. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_SetSecretKey(LONG nPort, LONG lKeyType, char *pSecretKey, LONG lKeyLen);
  276. // add by gb 080131
  277. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_GetPort(LONG* nPort);
  278. HIK_PLAYM4_API BOOL __stdcall Hik_PlayM4_FreePort(LONG nPort);
  279. #endif