📄 hcnetsdk.h
字号:
#include "stdafx.h"
#define NET_DVR_API extern "C"__declspec(dllimport)
#define NET_DVR_NOERROR 0 //no error
#define NET_DVR_PASSWORD_ERROR 1 //username, password error
#define NET_DVR_NOENOUGHPRI 2 //no power right
#define NET_DVR_NOINIT 3 //not initialize
#define NET_DVR_CHANNEL_ERROR 4 //channel number error
#define NET_DVR_OVER_MAXLINK 5 //reached client max link
#define NET_DVR_VERSIONNOMATCH 6 //version not match
#define NET_DVR_NETWORK_FAIL_CONNECT 7 //connect DVRDVS failed
#define NET_DVR_NETWORK_SEND_ERROR 8 //Send failed
#define NET_DVR_NETWORK_RECV_ERROR 9 //receive failed
#define NET_DVR_NETWORK_RECV_TIMEOUT 10 //receive timeout
#define NET_DVR_NETWORK_ERRORDATA 11 //sent data error
#define NET_DVR_ORDER_ERROR 12 //sequence error
#define NET_DVR_OPERNOPERMIT 13 //not permit
#define NET_DVR_COMMANDTIMEOUT 14 //DVR command timeout
#define NET_DVR_ERRORSERIALPORT 15 //serial port error
#define NET_DVR_ERRORALARMPORT 16 //alarm port error
#define NET_DVR_PARAMETER_ERROR 17 //parameter error
#define NET_DVR_CHAN_EXCEPTION 18 //channel in error state
#define NET_DVR_NODISK 19 //no HDD
#define NET_DVR_ERRORDISKNUM 20 //HDD number error
#define NET_DVR_DISK_FULL 21 //HDD full
#define NET_DVR_DISK_ERROR 22 //HDD error
#define NET_DVR_NOSUPPORT 23 //DVRDVS not support
#define NET_DVR_BUSY 24 //DVRDVS busy
#define NET_DVR_MODIFY_FAIL 25 //Modify DVRDVS failed
#define NET_DVR_PASSWORD_FORMAT_ERROR 26 //password error
#define NET_DVR_DISK_FORMATING 27 //HDD is formatting
#define NET_DVR_DVRNORESOURCE 28 //DVR resource not enough
#define NET_DVR_DVROPRATEFAILED 29 //DVR operation failed
#define NET_DVR_OPENHOSTSOUND_FAIL 30 //Open PC sound failed
#define NET_DVR_DVRVOICEOPENED 31 //voice dialogue is used
#define NET_DVR_TIMEINPUTERROR 32 //input error time
#define NET_DVR_NOSPECFILE 33 //no files to playback
#define NET_DVR_CREATEFILE_ERROR 34 //create file error
#define NET_DVR_FILEOPENFAIL 35 //open file error
#define NET_DVR_OPERNOTFINISH 36 //last operation not finished
#define NET_DVR_GETPLAYTIMEFAIL 37 //get current play time failed
#define NET_DVR_PLAYFAIL 38 //play failed
#define NET_DVR_FILEFORMAT_ERROR 39 //file format error
#define NET_DVR_DIR_ERROR 40 //path error
#define NET_DVR_ALLOC_RESOUCE_ERROR 41 //resource assign error
#define NET_DVR_AUDIO_MODE_ERROR 42 //Sound card mode error
#define NET_DVR_NOENOUGH_BUF 43 //buffer too small
#define NET_DVR_CREATESOCKET_ERROR 44 //create SOCKET error
#define NET_DVR_SETSOCKET_ERROR 45 //set SOCKET error
#define NET_DVR_MAX_NUM 46 //DVRDVS max number
#define NET_DVR_USERNOTEXIST 47 //user not exist
#define NET_DVR_WRITEFLASHERROR 48 //write FLASH error
#define NET_DVR_UPGRADEFAIL 49 //DVR upgrade failed
#define NET_DVR_CARDHAVEINIT 50 //decode card initialized already
#define NET_DVR_PLAYERFAILED 51 //player error
#define NET_DVR_MAX_USERNUM 52 //user number reach max
#define NET_DVR_GETLOCALIPANDMACFAIL 53 //Get IP or MAC of client failed
#define NET_DVR_NOENCODEING 54 //this channel not encode
#define NET_DVR_IPMISMATCH 55 //IP address not match
#define NET_DVR_MACMISMATCH 56 //MAC address not match
#define NET_DVR_UPGRADELANGMISMATCH 57 //upgrade file language not match
#define NET_DVR_DDRAWDEVICENOSUPPORT 58 //local DDrawDevice not support
//return value of search file and log API
#define NET_DVR_FILE_SUCCESS 1000 //Get file information
#define NET_DVR_FILE_NOFIND 1001 //no file
#define NET_DVR_ISFINDING 1002 //searching file
#define NET_DVR_NOMOREFILE 1003 //mo more files
#define NET_DVR_FILE_EXCEPTION 1004 //search exception
//NET_DVR_IsSupport() return value
#define NET_DVR_SUPPORT_DDRAW 0x01 //support DIRECTDRAW, if not, player can not work;
#define NET_DVR_SUPPORT_BLT 0x02 //support BLT, if not, player can not work;
#define NET_DVR_SUPPORT_BLTFOURCC 0x04 //BLT support color conversion, if not, player will use software to do RGB conversion;
#define NET_DVR_SUPPORT_BLTSHRINKX 0x08 //BLT support X axis shrink, if not, use software to realize;
#define NET_DVR_SUPPORT_BLTSHRINKY 0x10 //BLT support Y axis shrink, if not, use software to realize;
#define NET_DVR_SUPPORT_BLTSTRETCHX 0x20 //BLT support X axis magnify, if not, use software to realize;
#define NET_DVR_SUPPORT_BLTSTRETCHY 0x40 //BLT support Y axis magnify, if not, use software to realize;
#define NET_DVR_SUPPORT_SSE 0x80 //CPU support SSE instruction, above Intel Pentium3 support SSE;
#define NET_DVR_SUPPORT_MMX 0x100 //CPU support MMX instruction, above Intel Pentium3 support MMX;
#define SET_PRESET 8 // set preset
#define CLE_PRESET 9 // clear preset
#define GOTO_PRESET 39 // goto preset
#define LIGHT_PWRON 2 /* light power */
#define WIPER_PWRON 3 /* wiper power */
#define FAN_PWRON 4 /* fan power */
#define HEATER_PWRON 5 /* heater power */
#define AUX_PWRON 6 /* Accessories power */
#define ZOOM_IN 11
#define ZOOM_OUT 12
#define FOCUS_NEAR 13
#define FOCUS_FAR 14
#define IRIS_OPEN 15
#define IRIS_CLOSE 16
#define TILT_UP 21
#define TILT_DOWN 22
#define PAN_LEFT 23
#define PAN_RIGHT 24
#define UP_LEFT 25 /* */
#define UP_RIGHT 26 /* */
#define DOWN_LEFT 27 /* */
#define DOWN_RIGHT 28 /* */
#define PAN_AUTO 29
#define FILL_PRE_SEQ 30 /* add preset to sequence */
#define SET_SEQ_DWELL 31 /* set stop time at preset */
#define SET_SEQ_SPEED 32 /* set sequence speed */
#define CLE_PRE_SEQ 33 /* delete preset from cruise sequence */
#define STA_MEM_CRUISE 34 /* start recording track*/
#define STO_MEM_CRUISE 35 /* stop recording track */
#define RUN_CRUISE 36 /* start tracking */
#define RUN_SEQ 37 /* start cruise */
#define STOP_SEQ 38 /* stop cruise */
//Display mode
enum{NORMALMODE = 0,OVERLAYMODE};
//network connect mode
enum{PTOPTCPMODE, PTOPUDPMODE, MULTIMODE, RTPMODE, AUDIODETACH, NOUSEMODE};
#define NET_DVR_SYSHEAD 1
#define NET_DVR_STREAMDATA 2
//play control marco define NET_DVR_PlayBackControl,NET_DVR_PlayControlLocDisplay,NET_DVR_DecPlayBackCtrl
#define NET_DVR_PLAYSTART 1 //start play
#define NET_DVR_PLAYSTOP 2 //stop play
#define NET_DVR_PLAYPAUSE 3 //pause
#define NET_DVR_PLAYRESTART 4 //restart
#define NET_DVR_PLAYFAST 5 //fast
#define NET_DVR_PLAYSLOW 6 //slow
#define NET_DVR_PLAYNORMAL 7 //normal speed
#define NET_DVR_PLAYFRAME 8 //frame one by one
#define NET_DVR_PLAYSTARTAUDIO 9 //open sound
#define NET_DVR_PLAYSTOPAUDIO 10 //close sound
#define NET_DVR_PLAYAUDIOVOLUME 11 //adjust volume
#define NET_DVR_PLAYSETPOS 12 //change playback position
#define NET_DVR_PLAYGETPOS 13 //get playback position
#define NET_DVR_PLAYGETTIME 14 //get current playback time
#define NET_DVR_PLAYGETFRAME 15 //get current playback frames
#define NET_DVR_GETTOTALFRAMES 16 //get the file total frame number
#define NET_DVR_GETTOTALTIME 17 //get the file total time
#define NET_DVR_THROWBFRAME 20 //throw B frame
//NET_DVR_SetDVRConfig,NET_DVR_GetDVRConfig macro define
#define NET_DVR_GET_DEVICECFG 100 //get DVRDVS server parameters
#define NET_DVR_SET_DEVICECFG 101 //set DVRDVS server parameters
#define NET_DVR_GET_NETCFG 102 //
#define NET_DVR_SET_NETCFG 103 //
#define NET_DVR_GET_PICCFG 104 //
#define NET_DVR_SET_PICCFG 105 //
#define NET_DVR_GET_COMPRESSCFG 106 //
#define NET_DVR_SET_COMPRESSCFG 107 //
#define NET_DVR_GET_RECORDCFG 108 //
#define NET_DVR_SET_RECORDCFG 109 //
#define NET_DVR_GET_DECODERCFG 110 //get PTZ parameters
#define NET_DVR_SET_DECODERCFG 111 //set PTZ parameters
#define NET_DVR_GET_RS232CFG 112 //get RS-232 parameters
#define NET_DVR_SET_RS232CFG 113 //set RS-232 parameters
#define NET_DVR_GET_ALARMINCFG 114 //
#define NET_DVR_SET_ALARMINCFG 115 //
#define NET_DVR_GET_ALARMOUTCFG 116 //
#define NET_DVR_SET_ALARMOUTCFG 117 //
#define NET_DVR_GET_TIMECFG 118 //get DVR system time
#define NET_DVR_SET_TIMECFG 119 //set DVR system time
#define NET_DVR_GET_PREVIEWCFG 120 //
#define NET_DVR_SET_PREVIEWCFG 121 //
#define NET_DVR_GET_VIDEOOUTCFG 122 //
#define NET_DVR_SET_VIDEOOUTCFG 123 //
#define NET_DVR_GET_USERCFG 124 //
#define NET_DVR_SET_USERCFG 125 //
#define NET_DVR_GET_EXCEPTIONCFG 126 //
#define NET_DVR_SET_EXCEPTIONCFG 127 //
#define NET_DVR_GET_SHOWSTRING 130 //
#define NET_DVR_SET_SHOWSTRING 131 //
#define NET_DVR_GET_EVENTCOMPCFG 132 //get event trigger record parameters
#define NET_DVR_SET_EVENTCOMPCFG 133 //set event trigger record parameters
#define NET_DVR_GET_AUXOUTCFG 140 //
#define NET_DVR_SET_AUXOUTCFG 141 //
#define NET_DVR_GET_PREVIEWCFG_AUX 142 //For -S series DVR
#define NET_DVR_SET_PREVIEWCFG_AUX 143 //For -S series DVR
#define NET_DVR_GET_PICCFG_EX 200 //
#define NET_DVR_SET_PICCFG_EX 201 //
#define NET_DVR_GET_USERCFG_EX 202 //
#define NET_DVR_SET_USERCFG_EX 203 //
#define NET_DVR_GET_COMPRESSCFG_EX 204 //get expression para(extension)
#define NET_DVR_SET_COMPRESSCFG_EX 205 //set expression para(extension)
#define NET_DVR_GET_NETAPPCFG 222 //get NTP/DDNS parameters
#define NET_DVR_SET_NETAPPCFG 223 //set NTP/DDNS parameters
#define NET_DVR_GET_NFSCFG 230 /* NFS disk config */
#define NET_DVR_SET_NFSCFG 231
#define NET_DVR_GET_NETCFG_OTHER 244 //get net para(multi-decoder)
#define NET_DVR_SET_NETCFG_OTHER 245 //set net para(multi-decoder)
#define NET_DVR_GET_EMAILPARACFG 250 //get EMAIL parameters
#define NET_DVR_SET_EMAILPARACFG 251 //set EMAIL parameters
#define NET_DVR_GET_DDNSCFG_EX 274 //get extend DDNS parameters
#define NET_DVR_SET_DDNSCFG_EX 275 //set extend DDNS parameters
//callback
#define COMM_ALARM 0x1100 //Alarm information
#define COMM_TRADEINFO 0x1500 //ATMDVR trade information
//exception type
#define EXCEPTION_AUDIOEXCHANGE 0x8001 //voice dialogue exception
#define EXCEPTION_ALARM 0x8002 //alarm exception
#define EXCEPTION_PREVIEW 0x8003 //network preview exception
#define EXCEPTION_SERIAL 0x8004 //transparent channel exception
#define EXCEPTION_RECONNECT 0x8005 //network preview reconnect
#define NAME_LEN 32
#define SERIALNO_LEN 48
#define MACADDR_LEN 6
#define MAX_ETHERNET 2
#define PATHNAME_LEN 128
#define PASSWD_LEN 16
#define MAX_CHANNUM 16
#define MAX_ALARMOUT 4
#define MAX_TIMESEGMENT 4
#define MAX_PRESET 128
#define MAX_DAYS 7
#define PHONENUMBER_LEN 32
#define MAX_DISKNUM 16
#define MAX_WINDOW 16
#define MAX_VGA 1
#define MAX_USERNUM 16
#define MAX_EXCEPTIONNUM 16
#define MAX_LINK 6
#define MAX_ALARMIN 16
#define MAX_VIDEOOUT 2
#define MAX_NAMELEN 16 //DVR local login name
#define MAX_RIGHT 32 //user right
#define CARDNUM_LEN 20
#define MAX_SHELTERNUM 4
#define MAX_DECPOOLNUM 4
#define MAX_DECNUM 4
#define MAX_TRANSPARENTNUM 2
#define MAX_STRINGNUM 4
#define MAX_AUXOUT 4
#define MAX_NFS_DISK 8
#define MAX_CYCLE_CHAN 16
#define MAX_DOMAIN_NAME 64
#define MAX_SERIAL_NUM 64
/* network interface */
#define NET_IF_10M_HALF 1 /* 10M ethernet */
#define NET_IF_10M_FULL 2
#define NET_IF_100M_HALF 3 /* 100M ethernet */
#define NET_IF_100M_FULL 4
#define NET_IF_AUTO 5
//DVR type
#define DVR 1 /*undefined dvr type*/
#define ATMDVR 2 /*atm dvr*/
#define DVS 3 /*DVS*/
#define DEC 4 /* 6001D */
#define ENC_DEC 5 /* 6001F */
#define DVR_HC 6 /*8000HC*/
#define DVR_HT 7 /*8000HT*/
#define DVR_HF 8 /*8000HF*/
#define DVR_HS 9 /* 8000HS DVR(no audio) */
#define DVR_HTS 10 /* 8016HTS DVR(no audio) */
#define DVR_HB 11 /* HB DVR(SATA HD) */
#define DVR_HCS 12 /* 8000HCS DVR */
#define DVS_A 13 /* DVS with ATA HD */
#define DVR_HC_S 14 /* 8000HC-S */
#define DVR_HT_S 15 /* 8000HT-S */
#define DVR_HF_S 16 /* 8000HF-S */
#define DVR_HS_S 17 /* 8000HS-S */
#define ATMDVR_S 18 /* ATM-S */
#define DVR_7000H 19 /*7000 DVR*/
#define DEC_MAT 20 /*multi-decoder*/
#define DVR_MOBILE 21 /* mobile DVR */
#define DVR_HD_S 22 /* 8000HD-S */
#define DVR_HD_SL 23 /* 8000HD-SL */
#define DVR_HC_SL 24 /* 8000HC-SL */
#define DVR_HS_ST 25 /* 8000HS-ST */
#define DVS_HW 26 /* 6000HW */
#define IPCAM 30 /*IP camera*/
#define IPDOME 40 /*IP dome*/
#define IPMOD 50 /*IP mode*/
typedef struct {
BYTE sSerialNumber[SERIALNO_LEN]; //serial number
BYTE byAlarmInPortNum; //DVRDVS alarm input number
BYTE byAlarmOutPortNum; //DVRDVS alarm output
BYTE byDiskNum; //DVRDVS HDD number
BYTE byDVRType; //DVRDVS type, 1:DVR 2:ATM DVR 3:DVS
BYTE byChanNum; //DVRDVS channel number
BYTE byStartChan; //DVRDVS start channel No.
}NET_DVR_DEVICEINFO, *LPNET_DVR_DEVICEINFO;
//Preview
typedef struct{
long bToScreen;
long bToVideoOut;
long nLeft;
long nTop;
long nWidth;
long nHeight;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -