hksdk/CH-HCNetSDKV6.1.9.47_build2.../头文件/plaympeg4.h

761 lines
34 KiB
C
Raw Normal View History

2023-03-23 17:39:59 +08:00
#ifndef _PLAYM4_H_
#define _PLAYM4_H_
#if defined( _WINDLL)
#define PLAYM4_API extern "C" __declspec(dllexport)
#else
#define PLAYM4_API extern "C" __declspec(dllimport)
#endif
//Max channel numbers
#define PLAYM4_MAX_SUPPORTS 500
//Wave coef range;
#define MIN_WAVE_COEF -100
#define MAX_WAVE_COEF 100
//Timer type
#define TIMER_1 1 //Only 16 timers for every process.Default TIMER;
#define TIMER_2 2 //Not limit;But the precision less than TIMER_1;
//BUFFER AND DATA TYPE
#define BUF_VIDEO_SRC (1) //mixed input,total src buffer size;splited input,video src buffer size
#define BUF_AUDIO_SRC (2) //mixed input,not defined;splited input,audio src buffer size
#define BUF_VIDEO_RENDER (3) //video render node count
#define BUF_AUDIO_RENDER (4) //audio render node count
#define BUF_VIDEO_DECODED (5) //video decoded node count to render
#define BUF_AUDIO_DECODED (6) //audio decoded node count to render
#define BUF_DISPLAY_NODE (7) //display node
//Error code
#define PLAYM4_NOERROR 0 //no error
#define PLAYM4_PARA_OVER 1 //input parameter is invalid;
#define PLAYM4_ORDER_ERROR 2 //The order of the function to be called is error.
#define PLAYM4_TIMER_ERROR 3 //Create multimedia clock failed;
#define PLAYM4_DEC_VIDEO_ERROR 4 //Decode video data failed.
#define PLAYM4_DEC_AUDIO_ERROR 5 //Decode audio data failed.
#define PLAYM4_ALLOC_MEMORY_ERROR 6 //Allocate memory failed.
#define PLAYM4_OPEN_FILE_ERROR 7 //Open the file failed.
#define PLAYM4_CREATE_OBJ_ERROR 8 //Create thread or event failed
#define PLAYM4_CREATE_DDRAW_ERROR 9 //Create DirectDraw object failed.
#define PLAYM4_CREATE_OFFSCREEN_ERROR 10 //failed when creating off-screen surface.
#define PLAYM4_BUF_OVER 11 //buffer is overflow
#define PLAYM4_CREATE_SOUND_ERROR 12 //failed when creating audio device.
#define PLAYM4_SET_VOLUME_ERROR 13 //Set volume failed
#define PLAYM4_SUPPORT_FILE_ONLY 14 //The function only support play file.
#define PLAYM4_SUPPORT_STREAM_ONLY 15 //The function only support play stream.
#define PLAYM4_SYS_NOT_SUPPORT 16 //System not support.
#define PLAYM4_FILEHEADER_UNKNOWN 17 //No file header.
#define PLAYM4_VERSION_INCORRECT 18 //The version of decoder and encoder is not adapted.
#define PLAYM4_INIT_DECODER_ERROR 19 //Initialize decoder failed.
#define PLAYM4_CHECK_FILE_ERROR 20 //The file data is unknown.
#define PLAYM4_INIT_TIMER_ERROR 21 //Initialize multimedia clock failed.
#define PLAYM4_BLT_ERROR 22 //Blt failed.
#define PLAYM4_UPDATE_ERROR 23 //Update failed.
#define PLAYM4_OPEN_FILE_ERROR_MULTI 24 //openfile error, streamtype is multi
#define PLAYM4_OPEN_FILE_ERROR_VIDEO 25 //openfile error, streamtype is video
#define PLAYM4_JPEG_COMPRESS_ERROR 26 //JPEG compress error
#define PLAYM4_EXTRACT_NOT_SUPPORT 27 //Don't support the version of this file.
#define PLAYM4_EXTRACT_DATA_ERROR 28 //extract video data failed.
#define PLAYM4_SECRET_KEY_ERROR 29 //Secret key is error //add 20071218
#define PLAYM4_DECODE_KEYFRAME_ERROR 30 //add by hy 20090318
#define PLAYM4_NEED_MORE_DATA 31 //add by hy 20100617
#define PLAYM4_INVALID_PORT 32 //add by cj 20100913
#define PLAYM4_NOT_FIND 33 //add by cj 20110428
#define PLAYM4_NEED_LARGER_BUFFER 34 //add by pzj 20130528
#define PLAYM4_FAIL_UNKNOWN 99 //Fail, but the reason is unknown;
//<2F><><EFBFBD>۹<EFBFBD><DBB9>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD><EFBFBD>
#define PLAYM4_FEC_ERR_ENABLEFAIL 100 // <20><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
#define PLAYM4_FEC_ERR_NOTENABLE 101 // <20><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>û<EFBFBD>м<EFBFBD><D0BC><EFBFBD>
#define PLAYM4_FEC_ERR_NOSUBPORT 102 // <20>Ӷ˿<D3B6>û<EFBFBD>з<EFBFBD><D0B7><EFBFBD>
#define PLAYM4_FEC_ERR_PARAMNOTINIT 103 // û<>г<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>Ӧ<EFBFBD>˿ڵIJ<DAB5><C4B2><EFBFBD>
#define PLAYM4_FEC_ERR_SUBPORTOVER 104 // <20>Ӷ˿<D3B6><CBBF>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD>
#define PLAYM4_FEC_ERR_EFFECTNOTSUPPORT 105 // <20>ð<EFBFBD>װ<EFBFBD><D7B0>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>
#define PLAYM4_FEC_ERR_INVALIDWND 106 // <20>Ƿ<EFBFBD><C7B7>Ĵ<EFBFBD><C4B4><EFBFBD>
#define PLAYM4_FEC_ERR_PTZOVERFLOW 107 // PTZλ<5A><CEBB>Խ<EFBFBD><D4BD>
#define PLAYM4_FEC_ERR_RADIUSINVALID 108 // Բ<>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD>Ƿ<EFBFBD>
#define PLAYM4_FEC_ERR_UPDATENOTSUPPORT 109 // ָ<><D6B8><EFBFBD>İ<EFBFBD>װ<EFBFBD><D7B0>ʽ<EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD>֧<EFBFBD><D6A7>
#define PLAYM4_FEC_ERR_NOPLAYPORT 110 // <20><><EFBFBD>ſ<EFBFBD><C5BF>˿<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define PLAYM4_FEC_ERR_PARAMVALID 111 // <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
#define PLAYM4_FEC_ERR_INVALIDPORT 112 // <20>Ƿ<EFBFBD><C7B7>Ӷ˿<D3B6>
#define PLAYM4_FEC_ERR_PTZZOOMOVER 113 // PTZ<54><5A><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΧԽ<CEA7><D4BD>
#define PLAYM4_FEC_ERR_OVERMAXPORT 114 // <20><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD>ֵĽ<D6B5><C4BD><EFBFBD>ͨ<EFBFBD><CDA8>Ϊ<EFBFBD>ĸ<EFBFBD>
#define PLAYM4_FEC_ERR_ENABLED 115 //<2F>ö˿<C3B6><CBBF>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
#define PLAYM4_FEC_ERR_D3DACCENOTENABLE 116 // D3D<33><44><EFBFBD><EFBFBD>û<EFBFBD>п<EFBFBD><D0BF><EFBFBD>
//Max display regions.
#define MAX_DISPLAY_WND 4
//Display type
#define DISPLAY_NORMAL 0x00000001
#define DISPLAY_QUARTER 0x00000002
#define DISPLAY_YC_SCALE 0x00000004 //add by gb 20091116
#define DISPLAY_NOTEARING 0x00000008
//Display buffers
#define MAX_DIS_FRAMES 50
#define MIN_DIS_FRAMES 1
//Locate by
#define BY_FRAMENUM 1
#define BY_FRAMETIME 2
//Source buffer
#define SOURCE_BUF_MAX 1024*100000
#define SOURCE_BUF_MIN 1024*50
//Stream type
#define STREAME_REALTIME 0
#define STREAME_FILE 1
//frame type
#define T_AUDIO16 101
#define T_AUDIO8 100
#define T_UYVY 1
#define T_YV12 3
#define T_RGB32 7
//capability
#define SUPPORT_DDRAW 1
#define SUPPORT_BLT 2
#define SUPPORT_BLTFOURCC 4
#define SUPPORT_BLTSHRINKX 8
#define SUPPORT_BLTSHRINKY 16
#define SUPPORT_BLTSTRETCHX 32
#define SUPPORT_BLTSTRETCHY 64
#define SUPPORT_SSE 128
#define SUPPORT_MMX 256
// <20><><EFBFBD>º궨<C2BA><EAB6A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>HIK_MEDIAINFO<46>
#define FOURCC_HKMI 0x484B4D49 // "HKMI" HIK_MEDIAINFO<46><EFBFBD><E1B9B9><EFBFBD><EFBFBD>
// ϵͳ<CFB5><CDB3>װ<EFBFBD><D7B0>ʽ
#define SYSTEM_NULL 0x0 // û<><C3BB>ϵͳ<CFB5><EFBFBD><E3A3AC><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>
#define SYSTEM_HIK 0x1 // <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
#define SYSTEM_MPEG2_PS 0x2 // PS<50><53>װ
#define SYSTEM_MPEG2_TS 0x3 // TS<54><53>װ
#define SYSTEM_RTP 0x4 // rtp<74><70>װ
#define SYSTEM_RTPHIK 0x401 // rtp<74><70>װ
// <20><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define VIDEO_NULL 0x0 // û<><C3BB><EFBFBD><EFBFBD>Ƶ
#define VIDEO_H264 0x1 // <20><><EFBFBD><EFBFBD>H.264
#define VIDEO_MPEG4 0x3 // <20><>׼MPEG4
#define VIDEO_MJPEG 0x4
#define VIDEO_AVC264 0x0100
// <20><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define AUDIO_NULL 0x0000 // û<><C3BB><EFBFBD><EFBFBD>Ƶ
#define AUDIO_ADPCM 0x1000 // ADPCM
#define AUDIO_MPEG 0x2000 // MPEG ϵ<><CFB5><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>MPEG<45><47>Ƶ
#define AUDIO_AAC 0X2001 // AAC <20><><EFBFBD><EFBFBD>
// Gϵ<47><CFB5><EFBFBD><EFBFBD>Ƶ
#define AUDIO_RAW_DATA8 0x7000 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ8k<38><6B>ԭʼ<D4AD><CABC><EFBFBD><EFBFBD>
#define AUDIO_RAW_UDATA16 0x7001 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ16k<36><6B>ԭʼ<D4AD><CABC><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>L16
#define AUDIO_G711_U 0x7110
#define AUDIO_G711_A 0x7111
#define AUDIO_G722_1 0x7221
#define AUDIO_G723_1 0x7231
#define AUDIO_G726_U 0x7260
#define AUDIO_G726_A 0x7261
#define AUDIO_G726_16 0x7262
#define AUDIO_G729 0x7290
#define AUDIO_AMR_NB 0x3000
#define SYNCDATA_VEH 1 //ͬ<><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
#define SYNCDATA_IVS 2 //ͬ<><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
//motion flow type
#define MOTION_FLOW_NONE 0
#define MOTION_FLOW_CPU 1
#define MOTION_FLOW_GPU 2
//<2F><><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define ENCRYPT_AES_3R_VIDEO 1
#define ENCRYPT_AES_10R_VIDEO 2
#define ENCRYPT_AES_3R_AUDIO 1
#define ENCRYPT_AES_10R_AUDIO 2
//Frame position
typedef struct{
long nFilePos;
long nFrameNum;
long nFrameTime;
long nErrorFrameNum;
SYSTEMTIME *pErrorTime;
long nErrorLostFrameNum;
long nErrorFrameSize;
}FRAME_POS,*PFRAME_POS;
//Frame Info
typedef struct{
long nWidth;
long nHeight;
long nStamp;
long nType;
long nFrameRate;
DWORD dwFrameNum;
}FRAME_INFO;
typedef struct
{
long nPort; //ͨ<><CDA8><EFBFBD><EFBFBD>
char *pBuf; //<2F><><EFBFBD>صĵ<D8B5>һ·ͼ<C2B7><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>
unsigned int nBufLen; //<2F><><EFBFBD>صĵ<D8B5>һ·ͼ<C2B7><CDBC><EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD>С
char *pBuf1; //<2F><><EFBFBD>صĵڶ<C4B5>·ͼ<C2B7><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>
unsigned int nBufLen1; //<2F><><EFBFBD>صĵڶ<C4B5>·ͼ<C2B7><CDBC><EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD>С
char *pBuf2; //<2F><><EFBFBD>صĵ<D8B5><C4B5><EFBFBD>·ͼ<C2B7><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>
unsigned int nBufLen2; //<2F><><EFBFBD>صĵ<D8B5><C4B5><EFBFBD>·ͼ<C2B7><CDBC><EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD>С
unsigned int nWidth; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
unsigned int nHeight; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
unsigned int nStamp; //ʱ<><CAB1><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
unsigned int nType; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void *pUser; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>
unsigned int reserved[4]; //<2F><><EFBFBD><EFBFBD>
}DISPLAY_INFO_YUV;
//Frame
typedef struct{
char *pDataBuf;
long nSize;
long nFrameNum;
BOOL bIsAudio;
long nReserved;
}FRAME_TYPE;
//Watermark Info //add by gb 080119
typedef struct{
char *pDataBuf;
long nSize;
long nFrameNum;
BOOL bRsaRight;
long nReserved;
}WATERMARK_INFO;
typedef struct SYNCDATA_INFO
{
DWORD dwDataType; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD>ĸ<EFBFBD><C4B8><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ͣ<EFBFBD>Ŀǰ<C4BF>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
DWORD dwDataLen; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
BYTE* pData; //ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ݽṹ<DDBD><E1B9B9>ָ<EFBFBD><D6B8>,<2C><><EFBFBD><EFBFBD>IVS_INFO<46>
} SYNCDATA_INFO;
#ifndef _HIK_MEDIAINFO_FLAG_
#define _HIK_MEDIAINFO_FLAG_
typedef struct _HIK_MEDIAINFO_ // modified by gb 080425
{
unsigned int media_fourcc; // "HKMI": 0x484B4D49 Hikvision Media Information
unsigned short media_version; // <20><EFBFBD>ţ<EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ĿǰΪ0x0101,<2C><>1.01<EFBFBD><EFBFBD><EFBFBD>01<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>01<EFBFBD><EFBFBD><EFBFBD>Ӱ汾<EFBFBD>š<EFBFBD>
unsigned short device_id; // <20>豸ID<49><44><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD>/<2F><><EFBFBD><EFBFBD>
unsigned short system_format; // ϵͳ<CFB5><CDB3>װ<EFBFBD><D7B0>
unsigned short video_format; // <20><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
unsigned short audio_format; // <20><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
unsigned char audio_channels; // ͨ<><CDA8><EFBFBD><EFBFBD>
unsigned char audio_bits_per_sample; // <20><>λ<EFBFBD><CEBB>
unsigned int audio_samplesrate; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
unsigned int audio_bitrate; // ѹ<><D1B9><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>,<2C><>λ<EFBFBD><CEBB>bit
unsigned int reserved[4]; // <20><><EFBFBD><EFBFBD>
}HIK_MEDIAINFO;
#endif
typedef struct
{
long nPort;
char * pBuf;
long nBufLen;
long nWidth;
long nHeight;
long nStamp;
long nType;
long nUser;
}DISPLAY_INFO;
typedef struct
{
long nPort;
char *pVideoBuf;
long nVideoBufLen;
char *pPriBuf;
long nPriBufLen;
long nWidth;
long nHeight;
long nStamp;
long nType;
long nUser;
}DISPLAY_INFOEX;
typedef struct PLAYM4_SYSTEM_TIME //<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
{
DWORD dwYear; //<2F><>
DWORD dwMon; //<2F><>
DWORD dwDay; //<2F><>
DWORD dwHour; //ʱ
DWORD dwMin; //<2F><>
DWORD dwSec; //<2F><>
DWORD dwMs; //<2F><><EFBFBD><EFBFBD>
} PLAYM4_SYSTEM_TIME;
//ENCRYPT Info
typedef struct{
long nVideoEncryptType; //<2F><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
long nAudioEncryptType; //<2F><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
long nSetSecretKey; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ã<EFBFBD>1<EFBFBD><31>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Կ<EFBFBD><D4BF>0<EFBFBD><30>ʾû<CABE><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Կ
}ENCRYPT_INFO;
//////////////////////////////////////////////////////////////////////////////
//API
//////////////////////////////////////////////////////////////////////////////
////////////////ver 1.0///////////////////////////////////////
//Initialize DirecDraw.Now invalid.
PLAYM4_API BOOL __stdcall PlayM4_InitDDraw(HWND hWnd);
//Release directDraw; Now invalid.
PLAYM4_API BOOL __stdcall PlayM4_RealeseDDraw();
PLAYM4_API BOOL __stdcall PlayM4_OpenFile(LONG nPort,LPSTR sFileName);
PLAYM4_API BOOL __stdcall PlayM4_CloseFile(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_Play(LONG nPort, HWND hWnd);
PLAYM4_API BOOL __stdcall PlayM4_Stop(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_Pause(LONG nPort,DWORD nPause);
PLAYM4_API BOOL __stdcall PlayM4_Fast(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_Slow(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_OneByOne(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_SetPlayPos(LONG nPort,float fRelativePos);
PLAYM4_API float __stdcall PlayM4_GetPlayPos(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_SetFileEndMsg(LONG nPort,HWND hWnd,UINT nMsg);
PLAYM4_API BOOL __stdcall PlayM4_SetVolume(LONG nPort,WORD nVolume);
PLAYM4_API BOOL __stdcall PlayM4_StopSound();
PLAYM4_API BOOL __stdcall PlayM4_PlaySound(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_OpenStream(LONG nPort,PBYTE pFileHeadBuf,DWORD nSize,DWORD nBufPoolSize);
PLAYM4_API BOOL __stdcall PlayM4_InputData(LONG nPort,PBYTE pBuf,DWORD nSize);
PLAYM4_API BOOL __stdcall PlayM4_CloseStream(LONG nPort);
PLAYM4_API int __stdcall PlayM4_GetCaps();
PLAYM4_API DWORD __stdcall PlayM4_GetFileTime(LONG nPort);
PLAYM4_API DWORD __stdcall PlayM4_GetPlayedTime(LONG nPort);
PLAYM4_API DWORD __stdcall PlayM4_GetPlayedFrames(LONG nPort);
//23
////////////////ver 2.0 added///////////////////////////////////////
PLAYM4_API BOOL __stdcall PlayM4_SetDecCallBack(LONG nPort,void (CALLBACK* DecCBFun)(long nPort,char * pBuf,long nSize,FRAME_INFO * pFrameInfo, long nReserved1,long nReserved2));
PLAYM4_API BOOL __stdcall PlayM4_SetDisplayCallBackYUV(LONG nPort, void (CALLBACK* DisplayCBFun)(DISPLAY_INFO_YUV *pstDisplayInfo), BOOL bTrue, void* pUser);
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));
PLAYM4_API BOOL __stdcall PlayM4_ConvertToBmpFile(char * pBuf,long nSize,long nWidth,long nHeight,long nType,char *sFileName);
PLAYM4_API DWORD __stdcall PlayM4_GetFileTotalFrames(LONG nPort);
PLAYM4_API DWORD __stdcall PlayM4_GetCurrentFrameRate(LONG nPort);
PLAYM4_API DWORD __stdcall PlayM4_GetPlayedTimeEx(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_SetPlayedTimeEx(LONG nPort,DWORD nTime);
PLAYM4_API DWORD __stdcall PlayM4_GetCurrentFrameNum(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_SetStreamOpenMode(LONG nPort,DWORD nMode);
PLAYM4_API DWORD __stdcall PlayM4_GetFileHeadLength();
PLAYM4_API DWORD __stdcall PlayM4_GetSdkVersion();
//11
////////////////ver 2.2 added///////////////////////////////////////
PLAYM4_API DWORD __stdcall PlayM4_GetLastError(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_RefreshPlay(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_SetOverlayMode(LONG nPort,BOOL bOverlay,COLORREF colorKey);
PLAYM4_API BOOL __stdcall PlayM4_GetPictureSize(LONG nPort,LONG *pWidth,LONG *pHeight);
PLAYM4_API BOOL __stdcall PlayM4_SetPicQuality(LONG nPort,BOOL bHighQuality);
PLAYM4_API BOOL __stdcall PlayM4_PlaySoundShare(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_StopSoundShare(LONG nPort);
//7
////////////////ver 2.4 added///////////////////////////////////////
PLAYM4_API LONG __stdcall PlayM4_GetStreamOpenMode(LONG nPort);
PLAYM4_API LONG __stdcall PlayM4_GetOverlayMode(LONG nPort);
PLAYM4_API COLORREF __stdcall PlayM4_GetColorKey(LONG nPort);
PLAYM4_API WORD __stdcall PlayM4_GetVolume(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_GetPictureQuality(LONG nPort,BOOL *bHighQuality);
PLAYM4_API DWORD __stdcall PlayM4_GetSourceBufferRemain(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_ResetSourceBuffer(LONG nPort);
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);
PLAYM4_API BOOL __stdcall PlayM4_ResetSourceBufFlag(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_SetDisplayBuf(LONG nPort,DWORD nNum);
PLAYM4_API DWORD __stdcall PlayM4_GetDisplayBuf(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_OneByOneBack(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_SetFileRefCallBack(LONG nPort, void (__stdcall *pFileRefDone)(DWORD nPort,DWORD nUser),DWORD nUser);
PLAYM4_API BOOL __stdcall PlayM4_SetCurrentFrameNum(LONG nPort,DWORD nFrameNum);
PLAYM4_API BOOL __stdcall PlayM4_GetKeyFramePos(LONG nPort,DWORD nValue, DWORD nType, PFRAME_POS pFramePos);
PLAYM4_API BOOL __stdcall PlayM4_GetNextKeyFramePos(LONG nPort,DWORD nValue, DWORD nType, PFRAME_POS pFramePos);
#if (WINVER >= 0x0400)
//Note: These funtion must be builded under win2000 or above with Microsoft Platform sdk.
// You can download the sdk from "http://www.microsoft.com/msdownload/platformsdk/sdkupdate/";
PLAYM4_API BOOL __stdcall PlayM4_InitDDrawDevice();
PLAYM4_API void __stdcall PlayM4_ReleaseDDrawDevice();
PLAYM4_API DWORD __stdcall PlayM4_GetDDrawDeviceTotalNums();
PLAYM4_API BOOL __stdcall PlayM4_SetDDrawDevice(LONG nPort,DWORD nDeviceNum);
//PLAYM4_API BOOL __stdcall PlayM4_GetDDrawDeviceInfo(DWORD nDeviceNum,LPSTR lpDriverDescription,DWORD nDespLen,LPSTR lpDriverName ,DWORD nNameLen,HMONITOR *hhMonitor);
PLAYM4_API int __stdcall PlayM4_GetCapsEx(DWORD nDDrawDeviceNum);
#endif
PLAYM4_API BOOL __stdcall PlayM4_ThrowBFrameNum(LONG nPort,DWORD nNum);
//23
////////////////ver 2.5 added///////////////////////////////////////
PLAYM4_API BOOL __stdcall PlayM4_SetDisplayType(LONG nPort,LONG nType);
PLAYM4_API long __stdcall PlayM4_GetDisplayType(LONG nPort);
//2
////////////////ver 3.0 added///////////////////////////////////////
PLAYM4_API BOOL __stdcall PlayM4_SetDecCBStream(LONG nPort,DWORD nStream);
PLAYM4_API BOOL __stdcall PlayM4_SetDisplayRegion(LONG nPort,DWORD nRegionNum, RECT *pSrcRect, HWND hDestWnd, BOOL bEnable);
PLAYM4_API BOOL __stdcall PlayM4_RefreshPlayEx(LONG nPort,DWORD nRegionNum);
#if (WINVER >= 0x0400)
//Note: The funtion must be builded under win2000 or above with Microsoft Platform sdk.
// You can download the sdk from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/;
PLAYM4_API BOOL __stdcall PlayM4_SetDDrawDeviceEx(LONG nPort,DWORD nRegionNum,DWORD nDeviceNum);
#endif
//4
/////////////////v3.2 added/////////////////////////////////////////
PLAYM4_API BOOL __stdcall PlayM4_GetRefValue(LONG nPort,BYTE *pBuffer, DWORD *pSize);
PLAYM4_API BOOL __stdcall PlayM4_SetRefValue(LONG nPort,BYTE *pBuffer, DWORD nSize);
PLAYM4_API BOOL __stdcall PlayM4_OpenStreamEx(LONG nPort,PBYTE pFileHeadBuf,DWORD nSize,DWORD nBufPoolSize);
PLAYM4_API BOOL __stdcall PlayM4_CloseStreamEx(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_InputVideoData(LONG nPort,PBYTE pBuf,DWORD nSize);
PLAYM4_API BOOL __stdcall PlayM4_InputAudioData(LONG nPort,PBYTE pBuf,DWORD nSize);
PLAYM4_API BOOL __stdcall PlayM4_RegisterDrawFun(LONG nPort,void (CALLBACK* DrawFun)(long nPort,HDC hDc,LONG nUser),LONG nUser);
PLAYM4_API BOOL __stdcall PlayM4_RigisterDrawFun(LONG nPort,void (CALLBACK* DrawFun)(long nPort,HDC hDc,LONG nUser),LONG nUser);
//8
//////////////////v3.4/////////////////////////////////////////////////////
PLAYM4_API BOOL __stdcall PlayM4_SetTimerType(LONG nPort,DWORD nTimerType,DWORD nReserved);
PLAYM4_API BOOL __stdcall PlayM4_GetTimerType(LONG nPort,DWORD *pTimerType,DWORD *pReserved);
PLAYM4_API BOOL __stdcall PlayM4_ResetBuffer(LONG nPort,DWORD nBufType);
PLAYM4_API DWORD __stdcall PlayM4_GetBufferValue(LONG nPort,DWORD nBufType);
//////////////////V3.6/////////////////////////////////////////////////////////
PLAYM4_API BOOL __stdcall PlayM4_AdjustWaveAudio(LONG nPort,LONG nCoefficient);
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);
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);
PLAYM4_API BOOL __stdcall PlayM4_SetEncTypeChangeCallBack(LONG nPort,void(CALLBACK *funEncChange)(long nPort,long nUser),long nUser);
PLAYM4_API BOOL __stdcall PlayM4_SetColor(LONG nPort, DWORD nRegionNum, int nBrightness, int nContrast, int nSaturation, int nHue);
PLAYM4_API BOOL __stdcall PlayM4_GetColor(LONG nPort, DWORD nRegionNum, int *pBrightness, int *pContrast, int *pSaturation, int *pHue);
PLAYM4_API BOOL __stdcall PlayM4_SetEncChangeMsg(LONG nPort,HWND hWnd,UINT nMsg);
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);
PLAYM4_API BOOL __stdcall PlayM4_GetFileSpecialAttr(LONG nPort, DWORD *pTimeStamp,DWORD *pFileNum ,DWORD *pReserved);
PLAYM4_API DWORD __stdcall PlayM4_GetSpecialData(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_SetCheckWatermarkCallBack(LONG nPort,void(CALLBACK* funCheckWatermark)(long nPort,WATERMARK_INFO* pWatermarkInfo,DWORD nUser),DWORD nUser);
PLAYM4_API BOOL __stdcall PlayM4_SetImageSharpen(LONG nPort,DWORD nLevel);
PLAYM4_API BOOL __stdcall PlayM4_SetDecodeFrameType(LONG nPort,DWORD nFrameType);
PLAYM4_API BOOL __stdcall PlayM4_SetPlayMode(LONG nPort,BOOL bNormal);
PLAYM4_API BOOL __stdcall PlayM4_SetOverlayFlipMode(LONG nPort,BOOL bTrue);
PLAYM4_API BOOL __stdcall PlayM4_SetOverlayPriInfoFlag(LONG nPort, DWORD nIntelType, BOOL bTrue,const char *pFontPath);
//PLAYM4_API DWORD __stdcall PlayM4_GetAbsFrameNum(LONG nPort);
//////////////////V4.7.0.0//////////////////////////////////////////////////////
////convert yuv to jpeg
PLAYM4_API BOOL __stdcall PlayM4_ConvertToJpegFile(char * pBuf,long nSize,long nWidth,long nHeight,long nType,char *sFileName);
PLAYM4_API BOOL __stdcall PlayM4_SetJpegQuality(long nQuality);
//set deflash
PLAYM4_API BOOL __stdcall PlayM4_SetDeflash(LONG nPort,BOOL bDefalsh);
//PLAYM4_API BOOL __stdcall PlayM4_SetDecCallBackEx(LONG nPort,void (CALLBACK* DecCBFun)(long nPort,char * pBuf,long nSize,FRAME_INFO * pFrameInfo, long nReserved1,long nReserved2), char* pDest, long nDestSize);
//////////////////V4.8.0.0/////////////////////////////////////////////////////////
//check discontinuous frame number as error data?
PLAYM4_API BOOL __stdcall PlayM4_CheckDiscontinuousFrameNum(LONG nPort, BOOL bCheck);
//get bmp or jpeg
PLAYM4_API BOOL __stdcall PlayM4_GetBMP(LONG nPort,PBYTE pBitmap,DWORD nBufSize,DWORD* pBmpSize);
PLAYM4_API BOOL __stdcall PlayM4_GetJPEG(LONG nPort,PBYTE pJpeg,DWORD nBufSize,DWORD* pJpegSize);
//dec call back mend
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);
PLAYM4_API BOOL __stdcall PlayM4_SetSecretKey(LONG nPort, LONG lKeyType, char *pSecretKey, LONG lKeyLen);
// add by gb 2007-12-23
PLAYM4_API BOOL __stdcall PlayM4_SetFileEndCallback(LONG nPort, void(CALLBACK*FileEndCallback)(long nPort, void *pUser), void *pUser);
// add by gb 080131 version 4.9.0.1
PLAYM4_API BOOL __stdcall PlayM4_GetPort(LONG* nPort);
PLAYM4_API BOOL __stdcall PlayM4_FreePort(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_SetDisplayCallBackEx(LONG nPort,void (CALLBACK* DisplayCBFun)(DISPLAY_INFO *pstDisplayInfo), long nUser);
PLAYM4_API BOOL __stdcall PlayM4_SkipErrorData(LONG nPort, BOOL bSkip);
PLAYM4_API BOOL __stdcall PlayM4_SetDecCallBackExMend(LONG nPort, void (CALLBACK* DecCBFun)(long nPort, char* pBuf, long nSize, FRAME_INFO* pFrameInfo,
long nUser, long nReserved2), char* pDest, long nDestSize, long nUser);
//reverse play add by chenjie 110609
PLAYM4_API BOOL __stdcall PlayM4_ReversePlay(LONG nPort);
PLAYM4_API BOOL __stdcall PlayM4_GetSystemTime(LONG nPort, PLAYM4_SYSTEM_TIME *pstSystemTime);
//PLAYM4_API BOOL __stdcall PlayM4_SetDecodeERC(long nPort, unsigned int nLevel);
#ifndef PLAYM4_SESSION_INFO_TAG
#define PLAYM4_SESSION_INFO_TAG
//nProtocolType
#define PLAYM4_PROTOCOL_RTSP 1
//nSessionInfoType
#define PLAYM4_SESSION_INFO_SDP 1
typedef struct _PLAYM4_SESSION_INFO_ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>
{
int nSessionInfoType; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD><EFBFBD>SDP<44><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7BAA3>˽<EFBFBD><CBBD><EFBFBD><EFBFBD>Ϣͷ
int nSessionInfoLen; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
unsigned char* pSessionInfoData; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
} PLAYM4_SESSION_INFO;
#endif
PLAYM4_API BOOL __stdcall PlayM4_OpenStreamAdvanced(LONG nPort, int nProtocolType, PLAYM4_SESSION_INFO* pstSessionInfo, DWORD nBufPoolSize);
#define R_ANGLE_0 -1 //<2F><><EFBFBD><EFBFBD>ת
#define R_ANGLE_L90 0 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת90<39><30>
#define R_ANGLE_R90 1 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת90<39><30>
#define R_ANGLE_180 2 //<2F><>ת180<38><30>
PLAYM4_API BOOL __stdcall PlayM4_SetRotateAngle(LONG nPort, DWORD nRegionNum, DWORD dwType);
#ifndef PLAYM4_ADDITION_INFO_TAG
#define PLAYM4_ADDITION_INFO_TAG
typedef struct _PLAYM4_ADDITION_INFO_ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>
{
BYTE* pData; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DWORD dwDatalen; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
DWORD dwDataType; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
DWORD dwTimeStamp; //<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
} PLAYM4_ADDITION_INFO;
#endif
//dwGroupIndex <20><>Լ<EFBFBD><D4BC>ȡֵ0~3<><33><EFBFBD><EFBFBD>һ<EFBFBD>汾ȡ<E6B1BE><C8A1>ͬ<EFBFBD><CDAC>ֻ<EFBFBD><D6BB>ͬ<EFBFBD><CDAC>closestream<61><6D><EFBFBD><EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_SetSycGroup(LONG nPort, DWORD dwGroupIndex);
//<2F>ݲ<EFBFBD>ʵ<EFBFBD>ִ˺<D6B4><CBBA><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD>ʼʱ<CABC>һ<E4B2BB>£<EFBFBD><C2A3><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><D0A1>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㣬ͬһ<CDAC><D2BB><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>һ·
PLAYM4_API BOOL __stdcall PlayM4_SetSycStartTime(LONG nPort, PLAYM4_SYSTEM_TIME *pstSystemTime);
// <20><><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صĽӿ<C4BD>
#ifndef FISH_EYE_TAG
#define FISH_EYE_TAG
// <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>
typedef enum tagFECPlaceType
{
FEC_PLACE_WALL = 0x1, // <20><>װ<EFBFBD><D7B0>ʽ (<28><><EFBFBD><EFBFBD>ˮƽ)
FEC_PLACE_FLOOR = 0x2, // <20><><EFBFBD>氲װ (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
FEC_PLACE_CEILING = 0x3, // <20><>װ<EFBFBD><D7B0>ʽ (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
}FECPLACETYPE;
typedef enum tagFECCorrectType
{
FEC_CORRECT_PTZ = 0x100, // PTZ
FEC_CORRECT_180 = 0x200, // 180<38>Ƚ<EFBFBD><C8BD><EFBFBD> <20><><EFBFBD><EFBFBD>Ӧ2P<32><50>
FEC_CORRECT_360 = 0x300, // 360ȫ<30><C8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ӧ1P<31><50>
FEC_CORRECT_LAT = 0x400 //γ<><CEB3>չ<EFBFBD><D5B9>
}FECCORRECTTYPE;
typedef struct tagCycleParam
{
float fRadiusLeft; // Բ<><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD><58><EFBFBD><EFBFBD>
float fRadiusRight; // Բ<><D4B2><EFBFBD><EFBFBD><EFBFBD>ұ<EFBFBD>X<EFBFBD><58><EFBFBD><EFBFBD>
float fRadiusTop; // Բ<><D4B2><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD>Y<EFBFBD><59><EFBFBD><EFBFBD>
float fRadiusBottom; // Բ<><D4B2><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>Y<EFBFBD><59><EFBFBD><EFBFBD>
}CYCLEPARAM;
typedef struct tagPTZParam
{
float fPTZPositionX; // PTZ <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB> X<><58><EFBFBD><EFBFBD>
float fPTZPositionY; // PTZ <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB> Y<><59><EFBFBD><EFBFBD>
}PTZPARAM;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/*********************************************
********************************************/
// <20><><EFBFBD>±<EFBFBD><C2B1>DZ<EFBFBD><C7B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define FEC_UPDATE_RADIUS 0x1
#define FEC_UPDATE_PTZZOOM 0x2
#define FEC_UPDATE_WIDESCANOFFSET 0x4
#define FEC_UPDATE_PTZPARAM 0x8
typedef struct tagFECParam
{
unsigned int nUpDateType; // <20><><EFBFBD>µ<EFBFBD><C2B5><EFBFBD><EFBFBD><EFBFBD>
unsigned int nPlaceAndCorrect; // <20><>װ<EFBFBD><D7B0>ʽ<EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD>ڻ<EFBFBD>ȡ<EFBFBD><C8A1>SetParam<61><6D>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>Ч,<2C><>ֵ<EFBFBD><D6B5>ʾ<EFBFBD><CABE>װ<EFBFBD><D7B0>ʽ<EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>ĺ<EFBFBD>
PTZPARAM stPTZParam; // PTZ У<><D0A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
CYCLEPARAM stCycleParam; // <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>Բ<EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
float fZoom; // PTZ <20><>ʾ<EFBFBD>ķ<EFBFBD>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD>
float fWideScanOffset; // 180<38><30><EFBFBD><EFBFBD>360<36><30>У<EFBFBD><D0A3><EFBFBD><EFBFBD>ƫ<EFBFBD>ƽǶ<C6BD>
int nResver[16]; // <20><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>
}FISHEYEPARAM;
typedef void (__stdcall * FISHEYE_CallBack )( void* pUser , unsigned int nSubPort , unsigned int nCBType , void * hDC , unsigned int nWidth , unsigned int nHeight);
#endif
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_FEC_Enable(LONG nPort);
// <20>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
PLAYM4_API BOOL __stdcall PlayM4_FEC_Disable(LONG nPort);
// <20><>ȡ<EFBFBD><C8A1><EFBFBD>۽<EFBFBD><DBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӷ˿<D3B6> [1~31]
PLAYM4_API BOOL __stdcall PlayM4_FEC_GetPort(LONG nPort, unsigned int* nSubPort,FECPLACETYPE emPlaceType,FECCORRECTTYPE emCorrectType);
// ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD>۽<EFBFBD><DBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӷ˿<D3B6>
PLAYM4_API BOOL __stdcall PlayM4_FEC_DelPort(LONG nPort , unsigned int nSubPort);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>۽<EFBFBD><DBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_FEC_SetParam(LONG nPort , unsigned int nSubPort , FISHEYEPARAM * pPara);
// <20><>ȡ<EFBFBD><C8A1><EFBFBD>۽<EFBFBD><DBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_FEC_GetParam(LONG nPort , unsigned int nSubPort , FISHEYEPARAM * pPara);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>л<EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_FEC_SetWnd(LONG nPort , unsigned int nSubPort , void * hWnd);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>۴<EFBFBD><DBB4>ڵĻ<DAB5>ͼ<EFBFBD>ص<EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_FEC_SetCallBack(LONG nPort , unsigned int nSubPort , FISHEYE_CallBack cbFunc , void * pUser);
//motionflow
PLAYM4_API BOOL __stdcall PlayM4_MotionFlow(LONG nPort, DWORD dwAdjustType);
//ͼ<><CDBC><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF><EFBFBD><EFBFBD>
#ifndef PLAYM4_HIKVIE_TAG
#define PLAYM4_HIKVIE_TAG
typedef struct _PLAYM4_VIE_DYNPARAM_
{
int moduFlag; //<2F><><EFBFBD>õ<EFBFBD><C3B5><EFBFBD><E3B7A8><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD><E9A3AC>PLAYM4_VIE_MODULES<45>ж<EFBFBD><D0B6><EFBFBD>
//<2F><> PLAYM4_VIE_MODU_ADJ | PLAYM4_VIE_MODU_EHAN
//ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD>ú󣬱<C3BA><F3A3ACB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>
//PLAYM4_VIE_MODU_ADJ
int brightVal; //<2F><><EFBFBD>ȵ<EFBFBD><C8B5><EFBFBD>ֵ<EFBFBD><D6B5>[-255, 255]
int contrastVal; //<2F>Աȶȵ<C8B6><C8B5><EFBFBD>ֵ<EFBFBD><D6B5>[-256, 255]
int colorVal; //<2F><><EFBFBD>Ͷȵ<CDB6><C8B5><EFBFBD>ֵ<EFBFBD><D6B5>[-256, 255]
//PLAYM4_VIE_MODU_EHAN
int toneScale; //<2F>˲<EFBFBD><CBB2><EFBFBD>Χ<EFBFBD><CEA7>[0, 100]
int toneGain; //<2F>Աȶȵ<C8B6><C8B5>ڣ<EFBFBD>ȫ<EFBFBD>ֶԱȶ<D4B1><C8B6><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>[-256, 255]
int toneOffset; //<2F><><EFBFBD>ȵ<EFBFBD><C8B5>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><C6BD>ֵƫ<D6B5>ƣ<EFBFBD>[-255, 255]
int toneColor; //<2F><>ɫ<EFBFBD><C9AB><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>[-256, 255]
//PLAYM4_VIE_MODU_DEHAZE
int dehazeLevel; //ȥ<><C8A5>ǿ<EFBFBD>ȣ<EFBFBD>[0, 255]
int dehazeTrans; //͸<><CDB8>ֵ<EFBFBD><D6B5>[0, 255]
int dehazeBright; //<2F><><EFBFBD>Ȳ<EFBFBD><C8B2><EFBFBD><EFBFBD><EFBFBD>[0, 255]
//PLAYM4_VIE_MODU_DENOISE
int denoiseLevel; //ȥ<><C8A5>ǿ<EFBFBD>ȣ<EFBFBD>[0, 255]
//PLAYM4_VIE_MODU_SHARPEN
int usmAmount; //<2F><><EFBFBD><EFBFBD>ǿ<EFBFBD>ȣ<EFBFBD>[0, 255]
int usmRadius; //<2F>񻯰뾶<F1BBAFB0><EBBEB6>[1, 15]
int usmThreshold; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>[0, 255]
//PLAYM4_VIE_MODU_DEBLOCK
int deblockLevel; //ȥ<><C8A5>ǿ<EFBFBD>ȣ<EFBFBD>[0, 100]
//PLAYM4_VIE_MODU_LENS
int lensWarp; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>[-256, 255]
int lensZoom; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>[-256, 255]
//PLAYM4_VIE_MODU_CRB
//<2F><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>
} PLAYM4_VIE_PARACONFIG;
typedef enum _PLAYM4_VIE_MODULES
{
PLAYM4_VIE_MODU_ADJ = 0x00000001, //ͼ<><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PLAYM4_VIE_MODU_EHAN = 0x00000002, //<2F>ֲ<EFBFBD><D6B2><EFBFBD>ǿģ<C7BF><C4A3>
PLAYM4_VIE_MODU_DEHAZE = 0x00000004, //ȥ<><C8A5>ģ<EFBFBD><C4A3>
PLAYM4_VIE_MODU_DENOISE = 0x00000008, //ȥ<><C8A5>ģ<EFBFBD><C4A3>
PLAYM4_VIE_MODU_SHARPEN = 0x00000010, //<2F><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
PLAYM4_VIE_MODU_DEBLOCK = 0x00000020, //ȥ<><C8A5><EFBFBD>˲<EFBFBD>ģ<EFBFBD><C4A3>
PLAYM4_VIE_MODU_CRB = 0x00000040, //ɫ<><C9AB>ƽ<EFBFBD><C6BD>ģ<EFBFBD><C4A3>
PLAYM4_VIE_MODU_LENS = 0x00000080, //<2F><>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
}PLAYM4_VIE_MODULES;
#endif
//<2F><><EFBFBD>ùر<C3B9>/<2F><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
//dwModuFlag<61><67>ӦPLAYM4_VIE_MODULES<45><53>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD><E9BFAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD>ϵIJ<CFB5><C4B2><EFBFBD>;
//<2F>ر<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>õIJ<C3B5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//<2F><><EFBFBD><EFBFBD><EFBFBD>ӿڵ<D3BF><DAB5>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڸýӿڿ<D3BF><DABF><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>󣻷<EFBFBD><F3A3BBB7>򣬷<EFBFBD><F2A3ACB7>ش<EFBFBD><D8B4><EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_VIE_SetModuConfig(LONG lPort,int nModuFlag,BOOL bEnable);
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>NULLȫͼ<C8AB><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫͼ<C8AB><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫͼ<C8AB><CDBC><EFBFBD><EFBFBD>С<EFBFBD><D0A1><EFBFBD><EFBFBD>16*16<31><36><EFBFBD><EFBFBD>
//<2F><>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƚ<EFBFBD>˵4<CBB5><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><E6B1BE><EFBFBD><EFBFBD>ֻ֧<D6BB><D6A7>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5>ͱ<EFBFBD><CDB1><EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_VIE_SetRegion(LONG lPort,LONG lRegNum,RECT* pRect);
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
PLAYM4_API BOOL __stdcall PlayM4_VIE_GetModuConfig(LONG lPort,int* pdwModuFlag);
//<2F><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>
//δ<><CEB4><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_VIE_SetParaConfig(LONG lPort,PLAYM4_VIE_PARACONFIG* pParaConfig);
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_VIE_GetParaConfig(LONG lPort,PLAYM4_VIE_PARACONFIG* pParaConfig);
//<2F><><EFBFBD><EFBFBD>Ƶͬ<C6B5><CDAC><EFBFBD>ӿ<EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_SyncToAudio(LONG nPort, BOOL bSyncToAudio);
// ˽<><CBBD><EFBFBD><EFBFBD>Ϣģ<CFA2><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
typedef enum _PLAYM4_PRIDATA_RENDER
{
PLAYM4_RENDER_ANA_INTEL_DATA = 0x00000001, //<2F><><EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD>
PLAYM4_RENDER_MD = 0x00000002, //<2F>ƶ<EFBFBD><C6B6><EFBFBD><EFBFBD><EFBFBD>
PLAYM4_RENDER_ADD_POS = 0x00000004, //POS<4F><53>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PLAYM4_RENDER_ADD_PIC = 0x00000008, //ͼƬ<CDBC><C6AC><EFBFBD><EFBFBD>
PLAYM4_RENDER_FIRE_DETCET = 0x00000010, //<2F>ȳ<EFBFBD><C8B3><EFBFBD><EFBFBD><EFBFBD>Ϣ
PLAYM4_RENDER_TEM = 0x00000020, //<2F><EFBFBD><C2B6><EFBFBD>Ϣ
PLAYM4_RENDER_TRACK_TEM = 0x00000040, //<2F><EFBFBD><ECBCA3>Ϣ
PLAYM4_RENDER_THERMAL = 0x00000080 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̻<EFBFBD><CCBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
}PLAYM4_PRIDATA_RENDER;
typedef enum _PLAYM4_THERMAL_FLAG
{
PLAYM4_THERMAL_FIREMASK = 0x00000001, //<2F>̻<EFBFBD><CCBB><EFBFBD><EFBFBD><EFBFBD>
PLAYM4_THERMAL_RULEGAS = 0x00000002, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PLAYM4_THERMAL_TARGETGAS = 0x00000004 //Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
}PLAYM4_THERMAL_FLAG;
typedef enum _PLAYM4_FIRE_ALARM{
PLAYM4_FIRE_FRAME_DIS = 0x00000001, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
PLAYM4_FIRE_MAX_TEMP = 0x00000002, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PLAYM4_FIRE_MAX_TEMP_POSITION = 0x00000004, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ʾ
PLAYM4_FIRE_DISTANCE = 0x00000008, //<2F><><EFBFBD><EFBFBD><EFBFBD>¶Ⱦ<C2B6><C8BE><EFBFBD>}PLAYM4_FIRE_ALARM
}PLAYM4_FIRE_ALARM;
typedef enum _PLAYM4_TEM_FLAG{
PLAYM4_TEM_REGION_BOX = 0x00000001, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PLAYM4_TEM_REGION_LINE = 0x00000002, //<2F>߲<EFBFBD><DFB2><EFBFBD>
PLAYM4_TEM_REGION_POINT = 0x00000004, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}PLAYM4_TEM_FLAG
}PLAYM4_TEM_FLAG;
typedef enum _PLAYM4_TRACK_FLAG
{
PLAYM4_TRACK_PEOPLE = 0x00000001, //<2F>˹켣
PLAYM4_TRACK_VEHICLE = 0x00000002, //<2F><><EFBFBD>
}PLAYM4_TRACK_FLAG;
typedef struct TI_PTZ_INFO_
{
unsigned short dwDefVer; //<2F><EFBFBD><E1B9B9><EFBFBD>
unsigned short dwLength; //PTZ_info<66><6F><EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD>8<EFBFBD>ֽ<EFBFBD>Ϊ<EFBFBD><CEAA>λ
DWORD dwP; //P<><50>0~3600<30><30>
DWORD dwT; //T<><54>0~3600<30><30>
DWORD dwZ; //Z<><5A>0~3600<30><30>
BYTE chFSMState; //<2F><><EFBFBD><EFBFBD>״̬
BYTE bClearFocusState; //<2F>۽<EFBFBD><DBBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC>0,1<><31>
BYTE reserved[6]; //6<><36><EFBFBD>ֽڱ<D6BD><DAB1><EFBFBD>
}PTZ_INFO;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_RenderPrivateData(LONG nPort, int nIntelType, BOOL bTrue);
PLAYM4_API BOOL __stdcall PlayM4_RenderPrivateDataEx(LONG nPort, int nIntelType, int nSubType, BOOL bTrue);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>,nType=0<><30>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻص<CDBB><D8B5><EFBFBD>nType=1<><31>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><D0BC><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>
PLAYM4_API BOOL __stdcall PlayM4_SetEncryptTypeCallBack(LONG nPort, DWORD nType,
void (CALLBACK* EncryptTypeCBFun)(long nPort, ENCRYPT_INFO* pEncryptInfo, long nUser, long nReserved2), long nUser);
//lType: 1 <20><>ʾ<EFBFBD><CABE>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><C7B0>ʾ֡PTZ<54><5A>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD><D8B6><EFBFBD><E1B9B9><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><E6B4A2>pInfo<66>ڣ<EFBFBD>plLen<65><6E><EFBFBD>س<EFBFBD><D8B3><EFBFBD><EFBFBD><EFBFBD>Ϣ
PLAYM4_API BOOL __stdcall PlayM4_GetStreamAdditionalInfo(LONG nPort, LONG lType, BYTE* pInfo, LONG* plLen);
#endif //_PLAYM4_H_