添加项目文件。
This commit is contained in:
111
3rdparty/hikvision/camera/inc/DataType.h
vendored
Normal file
111
3rdparty/hikvision/camera/inc/DataType.h
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
#ifndef DATA_TYPE_H
|
||||
#define DATA_TYPE_H
|
||||
#define FRAME_HEAD_MAGIC 0x03211546
|
||||
#define SYSTEM_SYNC_ID 2
|
||||
|
||||
#ifdef __LINUX__
|
||||
typedef unsigned char UCHAR;
|
||||
typedef unsigned char* PBYTE;
|
||||
typedef char* LPTSTR;
|
||||
typedef unsigned short USHORT;
|
||||
typedef int HANDLE;
|
||||
typedef unsigned long ULONG;
|
||||
typedef unsigned long DWORD;
|
||||
#endif //#ifdef __LINUX__
|
||||
|
||||
typedef struct tagFrameInfo{
|
||||
ULONG SyncId; /* 00000000000000000000000000010b */
|
||||
ULONG Magic;
|
||||
USHORT FrameType; /* I frames , P frames or BBP frames Audio frames or dsp status etc */
|
||||
ULONG Length; /*lenth include this header */
|
||||
ULONG FrameNumber; /* serial number of this frame */
|
||||
UCHAR Breakable; /* indicate if stream breakable, you could restart new file(with PktSysHeader) if true */
|
||||
/*ULONG Ack;*/
|
||||
ULONG PTS; /* system clock when this frames is processed */
|
||||
}TMFRAME_HEADER, *PTMFRAME_HEADER;
|
||||
|
||||
typedef enum {
|
||||
StandardNone = 0x80000000,
|
||||
StandardNTSC = 0x00000001,
|
||||
StandardPAL = 0x00000002,
|
||||
StandardSECAM = 0x00000004,
|
||||
} VideoStandard_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
PktError = 0,
|
||||
PktIFrames = 0x0001,
|
||||
PktPFrames = 0x0002,
|
||||
PktBBPFrames = 0x0004,
|
||||
PktAudioFrames = 0x0008,
|
||||
PktMotionDetection = 0x00010,
|
||||
PktDspStatus = 0x00020,
|
||||
PktOrigImage = 0x00040,
|
||||
PktSysHeader = 0x00080,
|
||||
PktBPFrames = 0x00100,
|
||||
PktSFrames = 0x00200,
|
||||
PktSubIFrames = 0x00400,
|
||||
PktSubPFrames = 0x00800,
|
||||
PktSubBBPFrames = 0x01000,
|
||||
PktSubSysHeader = 0x02000
|
||||
}FrameType_t;
|
||||
|
||||
typedef struct tagVersion{
|
||||
ULONG DspVersion, DspBuildNum;
|
||||
ULONG DriverVersion, DriverBuildNum;
|
||||
ULONG SDKVersion, SDKBuildNum;
|
||||
}VERSION_INFO, *PVERSION_INFO;
|
||||
|
||||
typedef enum {
|
||||
ENC_CIF_FORMAT = 0,
|
||||
ENC_QCIF_FORMAT = 1,
|
||||
ENC_2CIF_FORMAT = 2,
|
||||
ENC_4CIF_FORMAT = 3,
|
||||
ENC_QQCIF_FORMAT = 4,
|
||||
ENC_CIFQCIF_FORMAT =5,
|
||||
ENC_CIFQQCIF_FORMAT =6,
|
||||
ENC_DCIF_FORMAT =7,
|
||||
ENC_VGA_FORMAT=8
|
||||
}PictureFormat_t;
|
||||
|
||||
typedef struct tagMotionData{
|
||||
PictureFormat_t PicFormat;
|
||||
ULONG HorizeBlocks;
|
||||
ULONG VerticalBlocks;
|
||||
ULONG BlockSize;
|
||||
}MOTION_DATA_HEADER, *PMOTION_DATA_HEADER;
|
||||
|
||||
|
||||
#define _OSD_BASE 0x9000 /*base address of special character*/
|
||||
#define _OSD_YEAR4 (_OSD_BASE+0) /*show year time by length of 4 , for example: 2005*/
|
||||
#define _OSD_YEAR2 (_OSD_BASE+1) /*show year time by length of 2, for example: 05 */
|
||||
#define _OSD_MONTH3 (_OSD_BASE+2) /*show month time in English, for example: Jan*/
|
||||
#define _OSD_MONTH2 (_OSD_BASE+3) /*show month time by two Arabic numerals, for example: 07*/
|
||||
#define _OSD_DAY (_OSD_BASE+4) /*show day time by two Arabic numerals, for example: 31*/
|
||||
#define _OSD_WEEK3 (_OSD_BASE+5) /*show week time in English: MON<4F><4E>SUN*/
|
||||
#define _OSD_CWEEK1 (_OSD_BASE+6) /*show week time in Chinese GB code*/
|
||||
#define _OSD_HOUR24 (_OSD_BASE+7) /*show 24 hours clock: 00<30><30>23 */
|
||||
#define _OSD_HOUR12 (_OSD_BASE+8) /*show 12 hours clock: 00<30><30>12*/
|
||||
#define _OSD_MINUTE (_OSD_BASE+9) /*show minute time by length of 2: 00<30><30>59*/
|
||||
#define _OSD_SECOND (_OSD_BASE+10) /*show second time by length of 2: 00<30><30>59*/
|
||||
#define _OSD_MILISECOND (_OSD_BASE+11) /*show millisecond time by length of 3: 000~999*/
|
||||
#define _OSD_APM (_OSD_BASE+14) /*show a.m. or p.m. by length of 2 bit, AM or PM*/
|
||||
|
||||
//For new added APIs to set OSD: SetEncoderOsdDisplayMode, SetDecoderOsdDisplayMode and SetDisplayOsdDisplayMode in v6.0 SDK, we use new basic address of special character.
|
||||
#define _OSD_BASE_EX 0x90000 /*base address of special character*/
|
||||
#define _OSD_YEAR4_EX (_OSD_BASE_EX+0) /*the same as _OSD_YEAR4*/
|
||||
#define _OSD_YEAR2_EX (_OSD_BASE_EX+1) /*the same as _OSD_YEAR2*/
|
||||
#define _OSD_MONTH3_EX (_OSD_BASE_EX+2) /*the same as _OSD_MONTH3*/
|
||||
#define _OSD_MONTH2_EX (_OSD_BASE_EX+3) /*the same as _OSD_MONTH2*/
|
||||
#define _OSD_DAY_EX (_OSD_BASE_EX+4) /*the same as _OSD_DAY*/
|
||||
#define _OSD_WEEK3_EX (_OSD_BASE_EX+5) /*the same as _OSD_WEEK3*/
|
||||
#define _OSD_CWEEK1_EX (_OSD_BASE_EX+6) /*the same as _OSD_CWEEK1*/
|
||||
#define _OSD_HOUR24_EX (_OSD_BASE_EX+7) /*the same as _OSD_HOUR24*/
|
||||
#define _OSD_HOUR12_EX (_OSD_BASE_EX+8) /*the same as _OSD_HOUR12*/
|
||||
#define _OSD_MINUTE_EX (_OSD_BASE_EX+9) /*the same as _OSD_MINUTE*/
|
||||
#define _OSD_SECOND_EX (_OSD_BASE_EX+10) /*the same as _OSD_SECOND*/
|
||||
#define _OSD_MILISECOND_EX (_OSD_BASE_EX+11) /*the same as _OSD_MILISECOND*/
|
||||
#define _OSD_APM_EX (_OSD_BASE_EX+14) /*the same as _OSD_APM*/
|
||||
|
||||
|
||||
#endif
|
||||
451
3rdparty/hikvision/camera/inc/DecodeCardSdk.h
vendored
Normal file
451
3rdparty/hikvision/camera/inc/DecodeCardSdk.h
vendored
Normal file
@@ -0,0 +1,451 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// DS-40xxHC/HF BOARD SYSTEM SDK //
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef DECODECARD_SDK_H
|
||||
#define DECODECARD_SDK_H
|
||||
|
||||
#include "datatype.h"
|
||||
|
||||
#define DLLEXPORT_API extern "C" __declspec(dllexport)
|
||||
#define ERR_WAIT_TIMEOUT 0xc0000001
|
||||
#define ERR_INVALID_HANDLE 0xc0000002
|
||||
#define ERR_INVALID_ARGUMENT 0xc0000003
|
||||
#define ERR_DDRAW_CREATE_FAILED 0xc0000004
|
||||
#define ERR_DDRAW_CAPS_FAULT 0xc0000005
|
||||
#define ERR_SET_COOPERATIVELEVEL_FAILED 0xc0000006
|
||||
#define ERR_PRIMARY_SURFACE_CREATE_FAILED 0xc0000007
|
||||
#define ERR_GET_OVERLAY_ADDRESS_FAILED 0xc0000008
|
||||
#define ERR_OVERLAY_SURFACE_CREATE_FAILED 0xc0000009
|
||||
#define ERR_OVERLAY_UPDATE_FAILED 0xc000000a
|
||||
#define ERR_TMMAN_FAILURE 0xc000000b
|
||||
#define ERR_CHANNELMAGIC_MISMATCH 0xc000000c
|
||||
#define ERR_CALLBACK_REGISTERED 0xc000000d
|
||||
#define ERR_QUEUE_OVERFLOW 0xc000000e
|
||||
#define ERR_STREAM_THREAD_FAILURE 0xc000000f
|
||||
#define ERR_THREAD_STOP_ERROR 0xc0000010
|
||||
#define ERR_NOT_SUPPORT 0xc0000011
|
||||
#define ERR_OUTOF_MEMORY 0xc0000012
|
||||
#define ERR_DSP_BUSY 0xc0000013
|
||||
#define ERR_DATA_ERROR 0xc0000014
|
||||
#define ERR_KERNEL 0xc0000016
|
||||
#define ERR_OFFSCREEN_CREATE_FAILED 0xc0000017
|
||||
#define ERR_MULTICLOCK_FAILURE 0xc0000018
|
||||
#define ERR_INVALID_DEVICE 0xc0000019
|
||||
#define ERR_INVALID_DRIVER 0xc000001a
|
||||
//error code for MD card
|
||||
#define HWERR_SUCCESS 0
|
||||
#define HWERR_ALLOCATE_MEMORY 0xc1000001
|
||||
#define HWERR_INVALID_HANDLE 0xc1000002
|
||||
#define HWERR_DDRAW_CREATE_FAILED 0xc1000003
|
||||
#define HWERR_DDRAW_CAPS_FAULT 0xc1000004
|
||||
#define HWERR_SET_COOPERATIVELEVEL_FAILED 0xc1000005
|
||||
#define HWERR_PRIMARY_SURFACE_CREATE_FAILED 0xc1000006
|
||||
#define HWERR_OVERLAY_CREATE_FAILED 0xc1000007
|
||||
#define HWERR_GET_OVERLAY_ADDRESS_FAILED 0xc1000008
|
||||
#define HWERR_OVERLAY_UPDATE_FAILED 0xc1000009
|
||||
#define HWERR_SURFACE_NULL 0xc100000a
|
||||
#define HWERR_FILEHEADER_UNKNOWN 0xc100000b
|
||||
#define HWERR_CREATE_FILE_FAILED 0xc100000c
|
||||
#define HWERR_FILE_SIZE_ZERO 0xc100000d
|
||||
#define HWERR_FILE_SIZE_INVALID 0xc100000d
|
||||
#define HWERR_CREATE_OBJ_FAILED 0xc100000e
|
||||
#define HWERR_CHANNELMAGIC_MISMATCH 0xc100000f
|
||||
#define HWERR_PARA_OVER 0xc1000010
|
||||
#define HWERR_ORDER 0xc1000011
|
||||
#define HWERR_COMMAND 0xc1000012
|
||||
#define HWERR_UNSUPPORTED 0xc1000013
|
||||
#define HWERR_DSPOPEN 0xc1000014
|
||||
#define HWERR_DSPLOAD 0xc1000015
|
||||
#define HWERR_ALLOCATE_DSPMEMORY 0xc1000016
|
||||
#define HWERR_DSPCHECHER 0xc1000017
|
||||
#define HWERR_IMGFILE_UNKNOWN 0xc1000018
|
||||
#define HWERR_INVALID_FILE 0xc1000019
|
||||
//standart
|
||||
#define HW_PAL 2
|
||||
#define HW_NTSC 1
|
||||
//jump direction
|
||||
#define HW_JUMP_FORWARD 309
|
||||
#define HW_JUMP_BACKWARD 310
|
||||
|
||||
|
||||
typedef enum tagTypeVideoFormat
|
||||
{
|
||||
vdfRGB8A_233 = 0x00000001,
|
||||
vdfRGB8R_332 = 0x00000002,
|
||||
vdfRGB15Alpha = 0x00000004,
|
||||
vdfRGB16 = 0x00000008,
|
||||
vdfRGB24 = 0x00000010,
|
||||
vdfRGB24Alpha = 0x00000020,
|
||||
|
||||
vdfYUV420Planar = 0x00000040,
|
||||
vdfYUV422Planar = 0x00000080,
|
||||
vdfYUV411Planar = 0x00000100,
|
||||
vdfYUV420Interspersed = 0x00000200,
|
||||
vdfYUV422Interspersed = 0x00000400,
|
||||
vdfYUV411Interspersed = 0x00000800,
|
||||
vdfYUV422Sequence = 0x00001000, /* U0, Y0, V0, Y1: For VO overlay */
|
||||
vdfYUV422SequenceAlpha = 0x00002000,
|
||||
/* U0, Y0, V0, Y1: For VO overlay, with low bit for alpha blending */
|
||||
vdfMono = 0x00004000, /* 8 bit monochrome */
|
||||
|
||||
vdfYUV444Planar = 0x00008000,
|
||||
}TypeVideoFormat;
|
||||
|
||||
|
||||
typedef enum _BitrateControlType_t
|
||||
{
|
||||
brCBR = 0,
|
||||
brVBR = 1,
|
||||
}BitrateControlType_t;
|
||||
|
||||
typedef enum _BOARD_TYPE_DS
|
||||
{
|
||||
DS400XM =0,
|
||||
DS400XH =1,
|
||||
DS4004HC =2,
|
||||
DS4008HC =3,
|
||||
DS4016HC =4,
|
||||
DS4001HF =5,
|
||||
DS4004HF =6,
|
||||
DS4002MD =7,
|
||||
DS4004MD =8, //4004MD
|
||||
DS4016HCS =9, //4016HCS
|
||||
DS4002HT =10, //4002HT
|
||||
DS4004HT =11, //4004HT
|
||||
DS4008HT =12, //4008HT
|
||||
DS4004HC_PLUS =13, //4004HC+
|
||||
DS4008HC_PLUS =14, //4008HC+
|
||||
DS4016HC_PLUS =15, //4016HC+
|
||||
DS4008HF =16, //4008HF
|
||||
DS4008MD =17, //4008MD
|
||||
DS4008HS =18, //4008HS
|
||||
DS4016HS =19, //4016HS
|
||||
INVALID_BOARD_TYPE =0xffffffff,
|
||||
}BOARD_TYPE_DS;
|
||||
|
||||
#define STREAM_TYPE_VIDEO 1
|
||||
#define STREAM_TYPE_AUDIO 2
|
||||
#define STREAM_TYPE_AVSYNC 3
|
||||
#define DRAWFUN(x) void (CALLBACK* x)(long nPort,HDC hDc,LONG nUser)
|
||||
|
||||
|
||||
typedef void (*LOGRECORD_CALLBACK)(char *str, void *context);
|
||||
typedef int (*STREAM_READ_CALLBACK)(ULONG channelNumber, void *context);
|
||||
typedef int (*STREAM_DIRECT_READ_CALLBACK)(ULONG channelNumber,void *DataBuf,DWORD Length,int FrameType,void *context);
|
||||
|
||||
typedef struct tagChannelCapability{
|
||||
UCHAR bAudioPreview;
|
||||
UCHAR bAlarmIO;
|
||||
UCHAR bWatchDog;
|
||||
}CHANNEL_CAPABILITY, *PCHANNEL_CAPABILITY;
|
||||
|
||||
typedef struct tagFramsStatistics{
|
||||
ULONG VideoFrames;
|
||||
ULONG AudioFrames;
|
||||
ULONG FramesLost;
|
||||
ULONG QueueOverflow;
|
||||
ULONG CurBps;
|
||||
}FRAMES_STATISTICS, *PFRAMES_STATISTICS;
|
||||
|
||||
DLLEXPORT_API int __stdcall InitDSPs();
|
||||
DLLEXPORT_API int __stdcall DeInitDSPs();
|
||||
DLLEXPORT_API HANDLE __stdcall ChannelOpen(int ChannelNum);
|
||||
DLLEXPORT_API int __stdcall ChannelClose(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall GetTotalChannels();
|
||||
DLLEXPORT_API int __stdcall GetTotalDSPs();
|
||||
DLLEXPORT_API int __stdcall StartVideoPreview(HANDLE hChannelHandle,HWND WndHandle, RECT *rect, BOOLEAN bOverlay, int VideoFormat, int FrameRate);
|
||||
DLLEXPORT_API int __stdcall StopVideoPreview(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall SetVideoPara(HANDLE hChannelHandle, int Brightness, int Contrast, int Saturation, int Hue);
|
||||
DLLEXPORT_API int __stdcall GetVideoPara(HANDLE hChannelHandle, VideoStandard_t *VideoStandard, int *Brightness, int *Contrast, int *Saturation, int *Hue);
|
||||
DLLEXPORT_API int __stdcall GetVideoSignal(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall GetSDKVersion(PVERSION_INFO VersionInfo);
|
||||
DLLEXPORT_API int __stdcall GetCapability(HANDLE hChannelHandle, CHANNEL_CAPABILITY *Capability);
|
||||
DLLEXPORT_API int __stdcall GetLastErrorNum(HANDLE hChannelHandle, ULONG *DspError, ULONG *SdkError);
|
||||
DLLEXPORT_API int __stdcall SetStreamType(HANDLE hChannelHandle, USHORT Type);
|
||||
DLLEXPORT_API int __stdcall GetStreamType(HANDLE hChannelHandle, USHORT *StreamType);
|
||||
DLLEXPORT_API int __stdcall GetFramesStatistics(HANDLE hChannelHandle, PFRAMES_STATISTICS framesStatistics);
|
||||
DLLEXPORT_API int __stdcall StartMotionDetection(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall GetBoardInfo(HANDLE hChannelHandle, ULONG *BoardType, UCHAR *SerialNo);
|
||||
DLLEXPORT_API int __stdcall StopMotionDetection(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall GetOriginalImage(HANDLE hChannelHandle, UCHAR *ImageBuf, ULONG *Size);
|
||||
DLLEXPORT_API int __stdcall RegisterLogRecordCallback(LOGRECORD_CALLBACK LogRecordFunc, void *Context);
|
||||
DLLEXPORT_API int __stdcall SetAudioPreview(HANDLE hChannelHandle, BOOL bEnable);
|
||||
DLLEXPORT_API int __stdcall ReadStreamData(HANDLE hChannelHandle, void *DataBuf, DWORD *Length, int *FrameType);
|
||||
DLLEXPORT_API int __stdcall RegisterMessageNotifyHandle(HWND hWnd, UINT MessageId);
|
||||
DLLEXPORT_API int __stdcall StartVideoCapture(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall StopVideoCapture(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall SetIBPMode(HANDLE hChannelHandle, int KeyFrameIntervals, int BFrames, int PFrames, int FrameRate);
|
||||
DLLEXPORT_API int __stdcall SetDefaultQuant(HANDLE hChannelHandle, int IQuantVal, int PQuantVal, int BQuantVal);
|
||||
DLLEXPORT_API int __stdcall SetOsd(HANDLE hChannelHandle, BOOL Enable);
|
||||
|
||||
DLLEXPORT_API int __stdcall SetLogo(HANDLE hChannelHandle, int x, int y, int w, int h, unsigned char *yuv);
|
||||
DLLEXPORT_API int __stdcall StopLogo(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall SetupMotionDetection(HANDLE hChannelHandle, RECT *RectList, int iAreas);
|
||||
DLLEXPORT_API int __stdcall MotionAnalyzer(HANDLE hChannelHandle, char *MotionData, int iThreshold, int *iResult);
|
||||
DLLEXPORT_API int __stdcall LoadYUVFromBmpFile(char *FileName, unsigned char *yuv, int BufLen, int *Width, int *Height);
|
||||
DLLEXPORT_API int __stdcall SaveYUVToBmpFile(char *FileName, unsigned char *yuv, int Width, int Height);
|
||||
DLLEXPORT_API int __stdcall CaptureIFrame(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall RegisterStreamReadCallback(STREAM_READ_CALLBACK StreamReadCallback, void *Context);
|
||||
DLLEXPORT_API int __stdcall AdjustMotionDetectPrecision(HANDLE hChannelHandle,
|
||||
int iGrade, int iFastMotionDetectFps,
|
||||
int iSlowMotionDetectFps);
|
||||
DLLEXPORT_API int __stdcall SetupBitrateControl(HANDLE hChannelHandle, ULONG MaxBps);
|
||||
DLLEXPORT_API int __stdcall SetOverlayColorKey(COLORREF DestColorKey);
|
||||
DLLEXPORT_API int __stdcall SetOsdDisplayMode(HANDLE hChannelHandle, int Brightness, BOOL Translucent, int parameter, USHORT *Format1, USHORT *Format2);
|
||||
DLLEXPORT_API int __stdcall SetLogoDisplayMode(HANDLE hChannelHandle, COLORREF ColorKey, BOOL Translucent, int TwinkleInterval);
|
||||
DLLEXPORT_API int __stdcall SetEncoderPictureFormat(HANDLE hChannelHandle, PictureFormat_t PictureFormat);
|
||||
DLLEXPORT_API int __stdcall SetVideoStandard(HANDLE hChannelHandle, VideoStandard_t VideoStandard);
|
||||
DLLEXPORT_API int __stdcall RestoreOverlay();
|
||||
DLLEXPORT_API int __stdcall ResetDSP(int DspNumber);
|
||||
DLLEXPORT_API int __stdcall GetSoundLevel(HANDLE hChannelHandle);
|
||||
|
||||
|
||||
DLLEXPORT_API int __stdcall SetBitrateControlMode(HANDLE hChannelHandle, BitrateControlType_t brc);
|
||||
DLLEXPORT_API int __stdcall SetupNotifyThreshold(HANDLE hChannelHandle, int iFramesThreshold);
|
||||
|
||||
DLLEXPORT_API int __stdcall SetupSubChannel(HANDLE hChannelHandle, int iSubChannel);
|
||||
DLLEXPORT_API int __stdcall GetSubChannelStreamType(void *DataBuf, int FrameType);
|
||||
//add for HC/HF
|
||||
DLLEXPORT_API int __stdcall RegisterStreamDirectReadCallback(STREAM_DIRECT_READ_CALLBACK StreamDirectReadCallback,void *Context);
|
||||
DLLEXPORT_API int __stdcall RegisterDrawFun(DWORD nport, DRAWFUN(DrawFun),LONG nUser);
|
||||
DLLEXPORT_API int __stdcall SetupMask(HANDLE hChannelHandle, RECT *rectList, int iAreas);
|
||||
DLLEXPORT_API int __stdcall StopMask(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall SetSubEncoderPictureFormat(HANDLE hChannelHandle, PictureFormat_t PictureFormat);
|
||||
DLLEXPORT_API int __stdcall StartSubVideoCapture(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall StopSubVideoCapture(HANDLE hChannelHandle);
|
||||
DLLEXPORT_API int __stdcall SetupDateTime(HANDLE hChannelHandle, SYSTEMTIME *now);
|
||||
/*
|
||||
<20><><EFBFBD><EFBFBD>Ϊ1.7<EFBFBD>汾<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><EFBFBD>ܡ<EFBFBD>
|
||||
<20>Ժ<EFBFBD><D4BA><EFBFBD><EFBFBD>ܻ<EFBFBD><DCBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĺ<DEB8><C4BA><EFBFBD><EFBFBD>ơ<EFBFBD>
|
||||
*/
|
||||
//ԭʼͼ<CABC><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
typedef void (*IMAGE_STREAM_CALLBACK)(UINT channelNumber,void *context );
|
||||
DLLEXPORT_API int __stdcall SetImageStream(HANDLE hChannel,BOOL bStart,UINT fps,UINT width,UINT height,unsigned char *imageBuffer);
|
||||
DLLEXPORT_API int __stdcall RegisterImageStreamCallback(IMAGE_STREAM_CALLBACK,void *context);
|
||||
/*
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>λ<EFBFBD>ã<EFBFBD>
|
||||
(x,y)Ϊϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD><CFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭʼͼ<CABC><CDBC><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD>ꡣ
|
||||
x<><78><EFBFBD><EFBFBD>Ϊ2<CEAA><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
(x,y)<29><><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD><CDBA>йأ<D0B9><D8A3><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>벻ƥ<EBB2BB>䣬
|
||||
<20><><EFBFBD>ܻᵼ<DCBB><E1B5BC>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ֹ<EFBFBD><D6B9>ˮƽ<CBAE><C6BD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
DLLEXPORT_API int __stdcall SetInputVideoPosition(HANDLE hChannel,UINT x,UINT y);
|
||||
DLLEXPORT_API int __stdcall StopRegisterDrawFun(DWORD nport);
|
||||
|
||||
/*
|
||||
3.0
|
||||
*/
|
||||
#define SERIAL_NUMBER_LENGTH 12 //<2F>忨<EFBFBD><E5BFA8><EFBFBD>кų<D0BA><C5B3><EFBFBD>
|
||||
typedef struct tagDS_BOARD_DETAIL
|
||||
{
|
||||
BOARD_TYPE_DS type; //<2F>忨<EFBFBD><E5BFA8><EFBFBD><EFBFBD>
|
||||
BYTE sn[16]; //<2F><><EFBFBD>к<EFBFBD>
|
||||
UINT dspCount; //<2F>忨<EFBFBD><E5BFA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DSP<53><50><EFBFBD><EFBFBD>
|
||||
UINT firstDspIndex; //<2F>忨<EFBFBD>ϵ<EFBFBD>һ<EFBFBD><D2BB>DSP<53><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT encodeChannelCount; //<2F>忨<EFBFBD><E5BFA8><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT firstEncodeChannelIndex; //<2F>忨<EFBFBD>ϵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT decodeChannelCount; //<2F>忨<EFBFBD><E5BFA8><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT firstDecodeChannelIndex; //<2F>忨<EFBFBD>ϵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT displayChannelCount; //<2F>忨<EFBFBD><E5BFA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT firstDisplayChannelIndex; //<2F>忨<EFBFBD>ϵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT reserved1;
|
||||
UINT reserved2;
|
||||
UINT reserved3;
|
||||
UINT reserved4;
|
||||
}DS_BOARD_DETAIL;
|
||||
typedef struct tagDSP_DETAIL
|
||||
{
|
||||
UINT encodeChannelCount; //<2F>忨<EFBFBD><E5BFA8><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT firstEncodeChannelIndex; //<2F>忨<EFBFBD>ϵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT decodeChannelCount; //<2F>忨<EFBFBD><E5BFA8><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT firstDecodeChannelIndex; //<2F>忨<EFBFBD>ϵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT displayChannelCount; //<2F>忨<EFBFBD><E5BFA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT firstDisplayChannelIndex; //<2F>忨<EFBFBD>ϵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
UINT reserved1;
|
||||
UINT reserved2;
|
||||
UINT reserved3;
|
||||
UINT reserved4;
|
||||
}DSP_DETAIL;
|
||||
DLLEXPORT_API unsigned int __stdcall GetBoardCount();
|
||||
DLLEXPORT_API int __stdcall GetBoardDetail(UINT boardNum,DS_BOARD_DETAIL *pBoardDetail);
|
||||
DLLEXPORT_API unsigned int __stdcall GetDspCount();
|
||||
DLLEXPORT_API int __stdcall GetDspDetail(UINT dspNum,DSP_DETAIL *pDspDetail);
|
||||
DLLEXPORT_API unsigned int __stdcall GetEncodeChannelCount();
|
||||
DLLEXPORT_API unsigned int __stdcall GetDecodeChannelCount();
|
||||
DLLEXPORT_API unsigned int __stdcall GetDisplayChannelCount();
|
||||
DLLEXPORT_API int __stdcall SetDefaultVideoStandard(VideoStandard_t VideoStandard);
|
||||
DLLEXPORT_API int __stdcall SetVideoDetectPrecision(HANDLE hChannel,unsigned int value);
|
||||
DLLEXPORT_API int __stdcall SetSubStreamType(HANDLE hChannelHandle, USHORT Type);
|
||||
DLLEXPORT_API int __stdcall GetSubStreamType(HANDLE hChannelHandle, USHORT *StreamType);
|
||||
|
||||
#define MAX_DISPLAY_REGION 16
|
||||
typedef struct tagREGION_PARAM
|
||||
{
|
||||
UINT left;
|
||||
UINT top;
|
||||
UINT width;
|
||||
UINT height;
|
||||
COLORREF color;
|
||||
UINT param;
|
||||
}REGION_PARAM;
|
||||
DLLEXPORT_API int __stdcall SetDisplayStandard(UINT nDisplayChannel,VideoStandard_t VideoStandard);
|
||||
DLLEXPORT_API int __stdcall SetDisplayRegion(UINT nDisplayChannel,UINT nRegionCount,REGION_PARAM *pParam,UINT nReserved);
|
||||
DLLEXPORT_API int __stdcall ClearDisplayRegion(UINT nDisplayChannel,UINT nRegionFlag);
|
||||
DLLEXPORT_API int __stdcall SetDisplayRegionPosition(UINT nDisplayChannel,UINT nRegion,UINT nLeft,UINT nTop);
|
||||
DLLEXPORT_API int __stdcall FillDisplayRegion(UINT nDisplayChannel,UINT nRegion,unsigned char *pImage);
|
||||
DLLEXPORT_API int __stdcall SetEncoderVideoExtOutput(UINT nEncodeChannel,UINT nPort,BOOL bOpen,UINT nDisplayChannel,UINT nDisplayRegion,UINT nReserved);
|
||||
DLLEXPORT_API int __stdcall SetDecoderVideoExtOutput(UINT nDecodeChannel,UINT nPort,BOOL bOpen,UINT nDisplayChannel,UINT nDisplayRegion,UINT nReserved);
|
||||
DLLEXPORT_API int __stdcall SetDecoderVideoOutput(UINT nDecodeChannel,UINT nPort,BOOL bOpen,UINT nDisplayChannel,UINT nDisplayRegion,UINT nReserved);
|
||||
DLLEXPORT_API int __stdcall SetDecoderAudioOutput(UINT nDecodeChannel,BOOL bOpen,UINT nOutputChannel);
|
||||
//3.1
|
||||
DLLEXPORT_API int __stdcall SetDeInterlace(HANDLE hChannelHandle,UINT mode,UINT level);
|
||||
DLLEXPORT_API int __stdcall SetPreviewOverlayMode(BOOL bTrue);
|
||||
|
||||
//DECODE functions for DS4002MD
|
||||
#if defined( _WINDLL)
|
||||
#define PLAYER_API extern "C"__declspec(dllexport)
|
||||
#else
|
||||
#define PLAYER_API extern "C" __declspec(dllimport)
|
||||
#endif
|
||||
typedef struct tagDISPLAY_PARA
|
||||
{
|
||||
long bToScreen;
|
||||
long bToVideoOut;
|
||||
long nLeft;
|
||||
long nTop;
|
||||
long nWidth;
|
||||
long nHeight;
|
||||
long nReserved;
|
||||
}DISPLAY_PARA,*PDISPLAY_PARA;
|
||||
//Version info
|
||||
typedef struct tagVERSION{
|
||||
ULONG DspVersion, DspBuildNum;
|
||||
ULONG DriverVersion, DriverBuildNum;
|
||||
ULONG SDKVersion, SDKBuildNum;
|
||||
}HW_VERSION, *PHW_VERSION;
|
||||
|
||||
//init part
|
||||
PLAYER_API int __stdcall HW_InitDirectDraw(HWND hParent,COLORREF colorKey);
|
||||
PLAYER_API int __stdcall HW_ReleaseDirectDraw();
|
||||
PLAYER_API int __stdcall HW_InitDecDevice(long *pDeviceTotal);
|
||||
PLAYER_API int __stdcall HW_ReleaseDecDevice();
|
||||
PLAYER_API int __stdcall HW_ChannelOpen(long nChannelNum,HANDLE* phChannel);
|
||||
PLAYER_API int __stdcall HW_ChannelClose(HANDLE hChannel);
|
||||
//open part
|
||||
|
||||
PLAYER_API int __stdcall HW_OpenStream(HANDLE hChannel,PBYTE pFileHeadBuf,DWORD nSize);
|
||||
DLLEXPORT_API int __stdcall HW_ResetStream(HANDLE hChannel);
|
||||
PLAYER_API int __stdcall HW_CloseStream(HANDLE hChannel);
|
||||
PLAYER_API int __stdcall HW_InputData(HANDLE hChannel,PBYTE pBuf,DWORD nSize);
|
||||
PLAYER_API int __stdcall HW_OpenFile(HANDLE hChannel,LPTSTR sFileName);
|
||||
PLAYER_API int __stdcall HW_CloseFile(HANDLE hChannel);
|
||||
|
||||
//play part
|
||||
PLAYER_API int __stdcall HW_SetDisplayPara(HANDLE hChannel,DISPLAY_PARA *pPara);
|
||||
PLAYER_API int __stdcall HW_Play(HANDLE hChannel);
|
||||
PLAYER_API int __stdcall HW_Stop(HANDLE hChannel);
|
||||
PLAYER_API int __stdcall HW_Pause(HANDLE hChannel,ULONG bPause);
|
||||
|
||||
//sound part
|
||||
PLAYER_API int __stdcall HW_PlaySound(HANDLE hChannel);
|
||||
PLAYER_API int __stdcall HW_StopSound(HANDLE hChannel);
|
||||
PLAYER_API int __stdcall HW_SetVolume(HANDLE hChannel,ULONG nVolume);
|
||||
//overlay part
|
||||
PLAYER_API int __stdcall HW_RefreshSurface();
|
||||
PLAYER_API int __stdcall HW_RestoreSurface();
|
||||
PLAYER_API int __stdcall HW_ClearSurface();
|
||||
PLAYER_API int __stdcall HW_ZoomOverlay(RECT* pSrcClientRect, RECT* pDecScreenRect);
|
||||
//cut file
|
||||
PLAYER_API int __stdcall HW_StartCapFile(HANDLE hChannel,LPTSTR sFileName);
|
||||
PLAYER_API int __stdcall HW_StopCapFile(HANDLE hChannel);
|
||||
//capture picture
|
||||
PLAYER_API int __stdcall HW_GetYV12Image(HANDLE hChannel, PBYTE pBuffer, ULONG nSize);
|
||||
PLAYER_API int __stdcall HW_GetPictureSize(HANDLE hChannel,ULONG* pWidth, ULONG* pHeight);
|
||||
PLAYER_API int __stdcall HW_ConvertToBmpFile(BYTE * pBuf,ULONG nSize,ULONG nWidth,ULONG nHeight,char *sFileName,ULONG nReserved);
|
||||
//setting and getting part
|
||||
PLAYER_API int __stdcall HW_Jump(HANDLE hChannel,ULONG nDirection);
|
||||
PLAYER_API int __stdcall HW_SetJumpInterval(HANDLE hChannel,ULONG nSecond);
|
||||
PLAYER_API int __stdcall HW_GetSpeed(HANDLE hChannel,long *pSpeed);
|
||||
PLAYER_API int __stdcall HW_SetSpeed(HANDLE hChannel,long nSpeed);
|
||||
PLAYER_API int __stdcall HW_SetPlayPos(HANDLE hChannel,ULONG nPos);
|
||||
PLAYER_API int __stdcall HW_GetPlayPos(HANDLE hChannel,ULONG* pPos);
|
||||
PLAYER_API int __stdcall HW_GetVersion(PHW_VERSION pVersion);
|
||||
PLAYER_API int __stdcall HW_GetCurrentFrameRate(HANDLE hChannel,ULONG* pFrameRate);
|
||||
PLAYER_API int __stdcall HW_GetCurrentFrameNum(HANDLE hChannel,ULONG* pFrameNum);
|
||||
PLAYER_API int __stdcall HW_GetFileTotalFrames(HANDLE hChannel,ULONG* pTotalFrames);
|
||||
PLAYER_API int __stdcall HW_GetFileTime(HANDLE hChannel, ULONG* pFileTime);
|
||||
PLAYER_API int __stdcall HW_GetCurrentFrameTime(HANDLE hChannel,ULONG* pFrameTime);
|
||||
PLAYER_API int __stdcall HW_GetPlayedFrames(HANDLE hChannel,ULONG *pDecVFrames);
|
||||
PLAYER_API int __stdcall HW_GetDeviceSerialNo(HANDLE hChannel,ULONG *pDeviceSerialNo);
|
||||
PLAYER_API int __stdcall HW_SetFileEndMsg(HANDLE hChannel,HWND hWnd,UINT nMsg);
|
||||
PLAYER_API int __stdcall HW_SetStreamOpenMode(HANDLE hChannel,ULONG nMode);
|
||||
PLAYER_API int __stdcall HW_GetStreamOpenMode(HANDLE hChannel,ULONG *pMode);
|
||||
PLAYER_API int __stdcall HW_SetVideoOutStandard(HANDLE hChannel,ULONG nStandard);
|
||||
PLAYER_API int __stdcall HW_SetDspDeadlockMsg(HWND hWnd,UINT nMsg);
|
||||
PLAYER_API int __stdcall HW_GetChannelNum(long nDspNum,long *pChannelNum,ULONG nNumsToGet,ULONG * pNumsGotten);
|
||||
PLAYER_API int __stdcall HW_ResetDsp(long nDspNum);
|
||||
PLAYER_API int __stdcall HW_SetAudioPreview(HANDLE hChannel, BOOL bEnable);
|
||||
//////////////////////////////////////////////
|
||||
|
||||
PLAYER_API int __stdcall HW_OpenStreamEx(HANDLE hChannel,PBYTE pFileHeadBuf,DWORD nSize);
|
||||
PLAYER_API int __stdcall HW_CloseStreamEx(HANDLE hChannel);
|
||||
PLAYER_API int __stdcall HW_InputVideoData(HANDLE hChannel,PBYTE pBuf,DWORD nSize);
|
||||
PLAYER_API int __stdcall HW_InputAudioData(HANDLE hChannel,PBYTE pBuf,DWORD nSize);
|
||||
|
||||
//4.0
|
||||
PLAYER_API int __stdcall SetOsdDisplayModeEx(HANDLE hChannelHandle,int color,BOOL Translucent,int param,int nLineCount,USHORT **Format);
|
||||
typedef void (*MOTION_DETECTION_CALLBACK)(ULONG channelNumber,BOOL bMotionDetected,void *context);
|
||||
PLAYER_API int __stdcall SetupMotionDetectionEx(HANDLE hChannelHandle,int iGrade,int iFastMotionDetectFps,
|
||||
int iSlowMotionDetectFps,UINT delay,RECT *RectList, int iAreas,
|
||||
MOTION_DETECTION_CALLBACK MotionDetectionCallback,int reserved);
|
||||
PLAYER_API int __stdcall GetJpegImage(HANDLE hChannelHandle,UCHAR *ImageBuf,ULONG *Size,UINT nQuality);
|
||||
//WatchDog
|
||||
PLAYER_API int __stdcall SetWatchDog(UINT boardNumber,BOOL bEnable);
|
||||
//4.1
|
||||
typedef void (*FILE_REF_DONE_CALLBACK)(UINT nChannel,UINT nSize);
|
||||
PLAYER_API int __stdcall HW_SetFileRef(HANDLE hChannel,BOOL bEnable,FILE_REF_DONE_CALLBACK FileRefDoneCallback);
|
||||
PLAYER_API int __stdcall HW_LocateByAbsoluteTime(HANDLE hChannel,SYSTEMTIME time);
|
||||
PLAYER_API int __stdcall HW_LocateByFrameNumber(HANDLE hChannel,UINT frmNum);
|
||||
PLAYER_API int __stdcall HW_GetCurrentAbsoluteTime(HANDLE hChannel,SYSTEMTIME *pTime);
|
||||
PLAYER_API int __stdcall HW_GetFileAbsoluteTime(HANDLE hChannel,SYSTEMTIME *pStartTime,SYSTEMTIME *pEndTime);
|
||||
//4.2
|
||||
DLLEXPORT_API int __stdcall HW_ImportFileRef(HANDLE hChannel,char *pBuffer,UINT nSize);
|
||||
DLLEXPORT_API int __stdcall HW_ExportFileRef(HANDLE hChannel,char *pBuffer,UINT nSize);
|
||||
DLLEXPORT_API int __stdcall SetDisplayVideoCapture(UINT nDisplayChannel,BOOL bStart,UINT fps,UINT width,UINT height,unsigned char *imageBuffer);
|
||||
DLLEXPORT_API int __stdcall RegisterDisplayVideoCaptureCallback(IMAGE_STREAM_CALLBACK DisplayVideoCaptureCallback,void *context);
|
||||
DLLEXPORT_API int __stdcall SetDisplayVideoBrightness(UINT chan,int Brightness);
|
||||
DLLEXPORT_API int __stdcall SetChannelStreamCRC(HANDLE hChannel,BOOL bEnable);
|
||||
DLLEXPORT_API int __stdcall SetSubChannelStreamCRC(HANDLE hChannel,BOOL bEnable);
|
||||
DLLEXPORT_API int __stdcall HW_SetDecoderPostProcess(HANDLE hChannel,UINT param);
|
||||
//
|
||||
typedef void (*DECODER_VIDEO_CAPTURE_CALLBACK)(UINT nChannelNumber,void *DataBuf,UINT width,UINT height,UINT nFrameNum,UINT nFrameTime,SYSTEMTIME *pFrameAbsoluteTime,void *context);
|
||||
DLLEXPORT_API int __stdcall RegisterDecoderVideoCaptureCallback(DECODER_VIDEO_CAPTURE_CALLBACK DecoderVideoCaptureCallback,void *context);
|
||||
DLLEXPORT_API int __stdcall HW_SetDecoderVideoCapture(HANDLE hChannel,BOOL bStart,UINT param);
|
||||
DLLEXPORT_API int __stdcall HW_InputDataByFrame(HANDLE hChannel,PBYTE pBuf,DWORD nSize);
|
||||
/*
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ץ<EFBFBD>Ľӿ<EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԡ<EFBFBD><D4A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ժ<EFBFBD><D4BA><EFBFBD><EFBFBD>ܻ<EFBFBD><DCBB><EFBFBD><EFBFBD>ġ<DEB8>
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
short x,y,width,height;
|
||||
}FACE_AREA_DEMO;
|
||||
typedef struct
|
||||
{
|
||||
FACE_AREA_DEMO faceArea;
|
||||
FACE_AREA_DEMO leftEyeArea;
|
||||
FACE_AREA_DEMO rightEyeArea;
|
||||
FACE_AREA_DEMO leftPupilArea;
|
||||
FACE_AREA_DEMO rightPupilArea;
|
||||
FACE_AREA_DEMO noseArea;
|
||||
FACE_AREA_DEMO mouthArea;
|
||||
}FACE_INFO_DEMO;
|
||||
typedef void (*FACE_DETECTION_DEMO_CALLBACK)(UINT nChannel,UINT nFaceCount,FACE_INFO_DEMO *pFaceInfo,
|
||||
char *pData,UINT nDataSize,UINT nImageWidth,UINT nImageHeight);
|
||||
|
||||
DLLEXPORT_API int __stdcall SetFaceDetectionDemo(HANDLE hChannelHandle,BOOL bEnable,
|
||||
UINT nFrameInterval,FACE_DETECTION_DEMO_CALLBACK pFunc,
|
||||
BOOL bCompress,UINT nCompressQuality,BOOL bLocateEyePos);
|
||||
|
||||
#endif
|
||||
|
||||
52612
3rdparty/hikvision/camera/inc/HCNetSDK.h
vendored
Normal file
52612
3rdparty/hikvision/camera/inc/HCNetSDK.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
760
3rdparty/hikvision/camera/inc/plaympeg4.h
vendored
Normal file
760
3rdparty/hikvision/camera/inc/plaympeg4.h
vendored
Normal file
@@ -0,0 +1,760 @@
|
||||
#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_
|
||||
BIN
3rdparty/hikvision/code_reader/dll/MvCodeReaderCtrl.dll
vendored
Normal file
BIN
3rdparty/hikvision/code_reader/dll/MvCodeReaderCtrl.dll
vendored
Normal file
Binary file not shown.
BIN
3rdparty/hikvision/code_reader/dll/MvZip.dll
vendored
Normal file
BIN
3rdparty/hikvision/code_reader/dll/MvZip.dll
vendored
Normal file
Binary file not shown.
BIN
3rdparty/hikvision/code_reader/dll/hlog.dll
vendored
Normal file
BIN
3rdparty/hikvision/code_reader/dll/hlog.dll
vendored
Normal file
Binary file not shown.
BIN
3rdparty/hikvision/code_reader/dll/hpr.dll
vendored
Normal file
BIN
3rdparty/hikvision/code_reader/dll/hpr.dll
vendored
Normal file
Binary file not shown.
1005
3rdparty/hikvision/code_reader/inc/MvCodeReaderCtrl.h
vendored
Normal file
1005
3rdparty/hikvision/code_reader/inc/MvCodeReaderCtrl.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
118
3rdparty/hikvision/code_reader/inc/MvCodeReaderErrorDefine.h
vendored
Normal file
118
3rdparty/hikvision/code_reader/inc/MvCodeReaderErrorDefine.h
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
|
||||
#ifndef _MV_CODEREADER_ERROR_DEFINE_H_
|
||||
#define _MV_CODEREADER_ERROR_DEFINE_H_
|
||||
|
||||
// ch:正确码定义
|
||||
#define MV_CODEREADER_OK 0x00000000 ///< 成功,无错误
|
||||
|
||||
//通用错误码定义:范围0x80020000-0x800200FF
|
||||
#define MV_CODEREADER_E_HANDLE 0x80020000 ///< 错误或无效的句柄
|
||||
#define MV_CODEREADER_E_SUPPORT 0x80020001 ///< 不支持的功能
|
||||
#define MV_CODEREADER_E_BUFOVER 0x80020002 ///< 缓存已满
|
||||
#define MV_CODEREADER_E_CALLORDER 0x80020003 ///< 函数调用顺序错误
|
||||
#define MV_CODEREADER_E_PARAMETER 0x80020004 ///< 错误的参数
|
||||
#define MV_CODEREADER_E_RESOURCE 0x80020005 ///< 资源申请失败
|
||||
#define MV_CODEREADER_E_NODATA 0x80020006 ///< 无数据
|
||||
#define MV_CODEREADER_E_PRECONDITION 0x80020007 ///< 前置条件有误,或运行环境已发生变化
|
||||
#define MV_CODEREADER_E_VERSION 0x80020008 ///< 版本不匹配
|
||||
#define MV_CODEREADER_E_NOENOUGH_BUF 0x80020009 ///< 传入的内存空间不足
|
||||
#define MV_CODEREADER_E_ABNORMAL_IMAGE 0x8002000A ///< 异常图像,可能是丢包导致图像不完整
|
||||
#define MV_CODEREADER_E_LOAD_LIBRARY 0x8002000B ///< 动态导入DLL失败
|
||||
#define MV_CODEREADER_E_NOOUTBUF 0x8002000C ///< 没有可输出的缓存
|
||||
#define MV_CODEREADER_E_FILE_PATH 0x8002000F ///< 文件路径错误
|
||||
#define MV_CODEREADER_E_UNKNOW 0x800200FF ///< 未知的错误
|
||||
|
||||
// GenICam系列错误:范围0x80020100-0x800201FF
|
||||
#define MV_CODEREADER_E_GC_GENERIC 0x80020100 ///< 通用错误
|
||||
#define MV_CODEREADER_E_GC_ARGUMENT 0x80020101 ///< 参数非法
|
||||
#define MV_CODEREADER_E_GC_RANGE 0x80020102 ///< 值超出范围
|
||||
#define MV_CODEREADER_E_GC_PROPERTY 0x80020103 ///< 属性错误
|
||||
#define MV_CODEREADER_E_GC_RUNTIME 0x80020104 ///< 运行环境有问题
|
||||
#define MV_CODEREADER_E_GC_LOGICAL 0x80020105 ///< 逻辑错误
|
||||
#define MV_CODEREADER_E_GC_ACCESS 0x80020106 ///< 节点访问条件有误
|
||||
#define MV_CODEREADER_E_GC_TIMEOUT 0x80020107 ///< 超时
|
||||
#define MV_CODEREADER_E_GC_DYNAMICCAST 0x80020108 ///< 转换异常
|
||||
#define MV_CODEREADER_E_GC_UNKNOW 0x800201FF ///< GenICam未知错误
|
||||
|
||||
//GigE_STATUS对应的错误码:范围0x80000200-0x800002FF
|
||||
#define MV_CODEREADER_E_NOT_IMPLEMENTED 0x80020200 ///< 命令不被设备支持
|
||||
#define MV_CODEREADER_E_INVALID_ADDRESS 0x80020201 ///< 访问的目标地址不存在
|
||||
#define MV_CODEREADER_E_WRITE_PROTECT 0x80020202 ///< 目标地址不可写
|
||||
#define MV_CODEREADER_E_ACCESS_DENIED 0x80020203 ///< 设备无访问权限
|
||||
#define MV_CODEREADER_E_BUSY 0x80020204 ///< 设备忙,或网络断开
|
||||
#define MV_CODEREADER_E_PACKET 0x80020205 ///< 网络包数据错误
|
||||
#define MV_CODEREADER_E_NETER 0x80020206 ///< 网络相关错误
|
||||
|
||||
// GigE相机特有的错误码
|
||||
#define MV_CODEREADER_E_IP_CONFLICT 0x80020221 ///< 设备IP冲突
|
||||
|
||||
//USB_STATUS对应的错误码:范围0x80000300-0x800003FF
|
||||
#define MV_CODEREADER_E_USB_READ 0x80020300 ///< 读usb出错
|
||||
#define MV_CODEREADER_E_USB_WRITE 0x80020301 ///< 写usb出错
|
||||
#define MV_CODEREADER_E_USB_DEVICE 0x80020302 ///< 设备异常
|
||||
#define MV_CODEREADER_E_USB_GENICAM 0x80020303 ///< GenICam相关错误
|
||||
#define MV_CODEREADER_E_USB_BANDWIDTH 0x80020304 ///< 带宽不足
|
||||
#define MV_CODEREADER_E_USB_DRIVER 0x80020305 ///< 驱动不匹配或者未装驱动
|
||||
#define MV_CODEREADER_E_USB_UNKNOW 0x800203FF ///< USB未知的错误
|
||||
|
||||
//升级时对应的错误码:范围0x80020400-0x800204FF
|
||||
#define MV_CODEREADER_E_UPG_MIN_ERRCODE 0x80020400 ///< 升级模块错误码最小值
|
||||
#define MV_CODEREADER_E_UPG_FILE_MISMATCH 0x80020400 ///< 升级固件不匹配
|
||||
#define MV_CODEREADER_E_UPG_LANGUSGE_MISMATCH 0x80020401 ///< 升级固件语言不匹配
|
||||
#define MV_CODEREADER_E_UPG_CONFLICT 0x80020402 ///< 升级冲突
|
||||
#define MV_CODEREADER_E_UPG_INNER_ERR 0x80020403 ///< 升级时相机内部出现错误
|
||||
|
||||
#define MV_CODEREADER_E_UPG_REGRESH_TYPE_ERR 0x80020404 ///< 获取相机型号失败
|
||||
#define MV_CODEREADER_E_UPG_COPY_FPGABIN_ERR 0x80020405 ///< 复制FPGA文件失败
|
||||
#define MV_CODEREADER_E_UPG_ZIPEXTRACT_ERR 0x80020406 ///< ZIP文件解压失败
|
||||
#define MV_CODEREADER_E_UPG_DAVEXTRACT_ERR 0x80020407 ///< DAV文件解压失败
|
||||
#define MV_CODEREADER_E_UPG_DAVCOMPRESS_ERR 0x80020408 ///< DAV文件压缩失败
|
||||
#define MV_CODEREADER_E_UPG_ZIPCOMPRESS_ERR 0x80020409 ///< ZIP文件压缩失败
|
||||
#define MV_CODEREADER_E_UPG_GET_PROGRESS_TIMEOUT_ERR 0x80020410 ///< 获取升级进度超时
|
||||
#define MV_CODEREADER_E_UPG_SEND_QUERY_PROGRESS_ERR 0x80020411 ///< 发送进度查询指令失败
|
||||
#define MV_CODEREADER_E_UPG_RECV_QUERY_PROGRESS_ERR 0x80020412 ///< 接收进度查询指令失败
|
||||
#define MV_CODEREADER_E_UPG_GET_QUERY_PROGRESS_ERR 0x80020413 ///< 获取查询进度失败
|
||||
#define MV_CODEREADER_E_UPG_GET_MAX_QUERY_PROGRESS_ERR 0x80020414 ///< 获得最大进度失败
|
||||
|
||||
#define MV_CODEREADER_E_UPG_CHECKT_PACKET_FAILED 0x80020465 ///< 文件验证失败
|
||||
#define MV_CODEREADER_E_UPG_FPGA_PROGRAM_FAILED 0x80020466 ///< FPGA程序升级失败
|
||||
#define MV_CODEREADER_E_UPG_WATCHDOG_FAILED 0x80020467 ///< 看门狗升级失败
|
||||
#define MV_CODEREADER_E_UPG_CAMERA_AND_BARE_FAILED 0x80020468 ///< 裸相机升级失败
|
||||
#define MV_CODEREADER_E_UPG_RETAIN_CONFIG_FAILED 0x80020469 ///< 保留配置文件失败
|
||||
#define MV_CODEREADER_E_UPG_FPGA_DRIVER_FAILED 0x8002046A ///< FPGA驱动升级失败
|
||||
#define MV_CODEREADER_E_UPG_SPI_DRIVER_FAILED 0x8002046B ///< SPI驱动升级失败
|
||||
#define MV_CODEREADER_E_UPG_REBOOT_SYSTEM_FAILED 0x8002046C ///< 重新启动失败
|
||||
#define MV_CODEREADER_E_UPG_UPSELF_FAILED 0x8002046D ///< 升级服务升级失败
|
||||
#define MV_CODEREADER_E_UPG_STOP_RELATION_PROGRAM_FAILED 0x8002046E ///< 停止相关服务失败
|
||||
#define MV_CODEREADER_E_UPG_DEVCIE_TYPE_INCONSISTENT 0x8002046F ///< 设备类型不一致
|
||||
#define MV_CODEREADER_E_UPG_READ_ENCRYPT_INFO_FAILED 0x80020470 ///< 读取加密信息失败
|
||||
#define MV_CODEREADER_E_UPG_PLAT_TYPE_INCONSISTENT 0x80020471 ///< 设备平台错误
|
||||
#define MV_CODEREADER_E_UPG_CAMERA_TYPE_INCONSISTENT 0x80020472 ///< 相机型号错误
|
||||
#define MV_CODEREADER_E_UPG_DEVICE_UPGRADING 0x80020473 ///< 相机正在升级
|
||||
#define MV_CODEREADER_E_UPG_UNZIP_FAILED 0x80020474 ///< 升级包解压失败
|
||||
#define MV_CODEREADER_E_UPG_BLE_DISCONNECT 0x80020475 ///< 巴枪蓝牙未连接
|
||||
#define MV_CODEREADER_E_UPG_BATTERY_NOTENOUGH 0x80020476 ///< 电量不足
|
||||
#define MV_CODEREADER_E_UPG_RTC_NOT_PRESENT 0x80020477 ///< 巴枪未放在底座上
|
||||
#define MV_CODEREADER_E_UPG_APP_ERR 0x80020478 ///< APP升级失败
|
||||
#define MV_CODEREADER_E_UPG_L3_ERR 0x80020479 ///< L3升级失败
|
||||
#define MV_CODEREADER_E_UPG_MCU_ERR 0x8002047A ///< MCU升级失败
|
||||
#define MV_CODEREADER_E_UPG_PLATFORM_DISMATCH 0x8002047B ///< 平台不匹配
|
||||
#define MV_CODEREADER_E_UPG_TYPE_DISMATCH 0x8002047C ///< 型号不匹配
|
||||
#define MV_CODEREADER_E_UPG_SPACE_DISMATCH 0x8002047D ///< 空间不匹配
|
||||
#define MV_CODEREADER_E_UPG_MEM_DISMATCH 0x8002047E ///< 内存不匹配
|
||||
#define MV_CODEREADER_E_UPG_NET_TRANS_ERROR 0x8002047F ///< 网络传输异常,请重新升级
|
||||
#define MV_CODEREADER_E_UPG_UNKNOW 0x800204FF ///< 升级时未知错误
|
||||
|
||||
//网络组件对应的错误码:范围0x80020500-0x800205FF
|
||||
#define MV_CODEREADER_E_CREAT_SOCKET 0x80020500 ///< 创建Socket错误
|
||||
#define MV_CODEREADER_E_BIND_SOCKET 0x80020501 ///< 绑定错误
|
||||
#define MV_CODEREADER_E_CONNECT_SOCKET 0x80020502 ///< 连接错误
|
||||
#define MV_CODEREADER_E_GET_HOSTNAME 0x80020503 ///< 获取主机名错误
|
||||
#define MV_CODEREADER_E_NET_WRITE 0x80020504 ///< 写入数据错误
|
||||
#define MV_CODEREADER_E_NET_READ 0x80020505 ///< 读取数据错误
|
||||
#define MV_CODEREADER_E_NET_SELECT 0x80020506 ///< Select错误
|
||||
#define MV_CODEREADER_E_NET_TIMEOUT 0x80020507 ///< 超时
|
||||
#define MV_CODEREADER_E_NET_ACCEPT 0x80020508 ///< 接收错误
|
||||
#define MV_CODEREADER_E_NET_UNKNOW 0x800205FF ///< 网络未知错误
|
||||
|
||||
#endif //_MVCODEREADER_ERROR_DEFINE_H_
|
||||
878
3rdparty/hikvision/code_reader/inc/MvCodeReaderParams.h
vendored
Normal file
878
3rdparty/hikvision/code_reader/inc/MvCodeReaderParams.h
vendored
Normal file
@@ -0,0 +1,878 @@
|
||||
#ifndef _MV_CODEREADER_PARAMS_H_
|
||||
#define _MV_CODEREADER_PARAMS_H_
|
||||
|
||||
#include "MvCodeReaderPixelType.h"
|
||||
|
||||
#ifndef __cplusplus
|
||||
typedef char bool;
|
||||
#define true 1
|
||||
#define false 0
|
||||
#endif
|
||||
|
||||
/********************************宏定义类型************************************************************/
|
||||
// 设备类型定义
|
||||
#define MV_CODEREADER_UNKNOW_DEVICE 0x00000000 // 未知设备类型
|
||||
#define MV_CODEREADER_GIGE_DEVICE 0x00000001 // GigE设备
|
||||
#define MV_CODEREADER_1394_DEVICE 0x00000002 // 1394-a/b 设备
|
||||
#define MV_CODEREADER_USB_DEVICE 0x00000004 // USB3.0 设备
|
||||
#define MV_CODEREADER_CAMERALINK_DEVICE 0x00000008 // CameraLink设备
|
||||
#define MV_CODEREADER_ID_DEVICE 0x00000010
|
||||
|
||||
// 异常消息类型
|
||||
#define MV_CODEREADER_EXCEPTION_DEV_DISCONNECT 0x00008001 // 设备断开连接
|
||||
#define MV_CODEREADER_EXCEPTION_VERSION_CHECK 0x00008002 // SDK与驱动版本不匹配
|
||||
|
||||
// 设备的访问模式
|
||||
// 独占权限,其他APP只允许读CCP寄存器
|
||||
#define MV_CODEREADER_ACCESS_Exclusive 1
|
||||
// 可以从5模式下抢占权限,然后以独占权限打开
|
||||
#define MV_CODEREADER_ACCESS_ExclusiveWithSwitch 2
|
||||
// 控制权限,其他APP允许读所有寄存器
|
||||
#define MV_CODEREADER_ACCESS_Control 3
|
||||
// 可以从5的模式下抢占权限,然后以控制权限打开
|
||||
#define MV_CODEREADER_ACCESS_ControlWithSwitch 4
|
||||
// 以可被抢占的控制权限打开
|
||||
#define MV_CODEREADER_ACCESS_ControlSwitchEnable 5
|
||||
// 可以从5的模式下抢占权限,然后以可被抢占的控制权限打开
|
||||
#define MV_CODEREADER_ACCESS_ControlSwitchEnableWithKey 6
|
||||
// 读模式打开设备,适用于控制权限下
|
||||
#define MV_CODEREADER_ACCESS_Monitor 7
|
||||
|
||||
// 设备信息最大长度
|
||||
#define INFO_MAX_BUFFER_SIZE 64 // 最大信息长度
|
||||
|
||||
// 最大支持的设备个数
|
||||
#define MV_CODEREADER_MAX_DEVICE_NUM 256
|
||||
|
||||
// 最大类型个数(适用于枚举类型)
|
||||
#define MV_CODEREADER_MAX_XML_SYMBOLIC_NUM 64 // 支持最大枚举类型最大参数
|
||||
|
||||
// GigEVision IP配置方式
|
||||
#define MV_CODEREADER_IP_CFG_STATIC 0x05000000 // 静态IP
|
||||
#define MV_CODEREADER_IP_CFG_DHCP 0x06000000 // DHCP
|
||||
#define MV_CODEREADER_IP_CFG_LLA 0x04000000 // LLA
|
||||
|
||||
// Event事件回调信息
|
||||
#define MV_CODEREADER_MAX_EVENT_NAME_SIZE 128 // 相机Event事件名称最大长度
|
||||
|
||||
// 最大条码长度
|
||||
#define MV_CODEREADER_MAX_BCR_CODE_LEN 256
|
||||
// 最大条码长度扩展
|
||||
#define MV_CODEREADER_MAX_BCR_CODE_LEN_EX 4096
|
||||
// 最大OCR长度
|
||||
#define MV_CODEREADER_MAX_OCR_LEN 128
|
||||
|
||||
// 一次最多输出条码个数
|
||||
#define MAX_CODEREADER_BCR_COUNT 200
|
||||
// 一次最多输出条码个数
|
||||
#define MAX_CODEREADER_BCR_COUNT_EX 300
|
||||
|
||||
// 最大数据缓存
|
||||
#define MV_CODEREADER_MAX_RESULT_SIZE (1024*64)
|
||||
|
||||
// 一次输出最大抠图个数
|
||||
#define MAX_CODEREADER_WAYBILL_COUNT 50
|
||||
// 一次输出最大OCR个数
|
||||
#define MAX_CODEREADER_OCR_COUNT 100
|
||||
|
||||
// 输出协议类型
|
||||
#define CommuPtlSmartSDK 1 // SamrtSDK协议
|
||||
#define CommuPtlTcpIP 2 // TCPIP协议
|
||||
#define CommuPtlSerial 3 // Serial协议
|
||||
|
||||
// 升级最大支持的设备个数
|
||||
#define MV_CODEREADER_MAX_UPGARDEDEVICE_NUM 100
|
||||
|
||||
/************************************************************************/
|
||||
/* 抠图参数,内部有默认值,可以不设置 */
|
||||
/************************************************************************/
|
||||
#define KEY_WAYBILL_ABILITY "WAYBILL_Ability" // 算法能力集,含面单提取[0x1],图像增强[0x2],码提取[0x4],Box拷贝模块[0x8],面单提取模块[0x10],模块最大编号[0x3F]
|
||||
#define KEY_WAYBILL_MAX_WIDTH "WAYBILL_Max_Width" // 算法最大宽度,默认5472,范围[0,65535]
|
||||
#define KEY_WAYBILL_MAX_HEIGHT "WAYBILL_Max_Height" // 算法最大高度,默认3648,范围[0,65535]
|
||||
#define KEY_WAYBILL_OUTPUTIMAGETYPE "WAYBILL_OutputImageType" // 面单抠图输出的图片格式,默认Jpg,范围[1,3],1为Mono8,2为Jpg,3为Bmp
|
||||
#define KEY_WAYBILL_JPGQUALITY "WAYBILL_JpgQuality" // jpg编码质量,默认80,范围[1,100]
|
||||
#define KEY_WAYBILL_ENHANCEENABLE "WAYBILL_EnhanceEnable" // 图像增强使能,默认0,范围[0,1]
|
||||
|
||||
#define KEY_WAYBILL_MINWIDTH "WAYBILL_MinWidth" // waybill最小宽, 宽是长边, 高是短边,默认100,范围[15,2592]
|
||||
#define KEY_WAYBILL_MINHEIGHT "WAYBILL_MinHeight" // waybill最小高,默认100,范围[10,2048]
|
||||
#define KEY_WAYBILL_MAXWIDTH "WAYBILL_MaxWidth" // waybill最大宽, 宽是长边, 高是短边,默认3072,最小值15
|
||||
#define KEY_WAYBILL_MAXHEIGHT "WAYBILL_MaxHeight" // waybill最大高,默认2048,最小值10
|
||||
#define KEY_WAYBILL_MORPHTIMES "WAYBILL_MorphTimes" // 膨胀次数,默认0,范围[0,10]
|
||||
#define KEY_WAYBILL_GRAYLOW "WAYBILL_GrayLow" // 面单上条码和字符灰度最小值,默认0,范围[0,255]
|
||||
#define KEY_WAYBILL_GRAYMID "WAYBILL_GrayMid" // 面单上灰度中间值,用于区分条码和背景,默认70,范围[0,255]
|
||||
#define KEY_WAYBILL_GRAYHIGH "WAYBILL_GrayHigh" // 面单上背景灰度最大值,默认130,范围[0,255]
|
||||
#define KEY_WAYBILL_BINARYADAPTIVE "WAYBILL_BinaryAdaptive" // 自适应二值化,默认1,范围[0,1]
|
||||
#define KEY_WAYBILL_BOUNDARYROW "WAYBILL_BoundaryRow" // 面单抠图行方向扩边,默认0,范围[0,2000]
|
||||
#define KEY_WAYBILL_BOUNDARYCOL "WAYBILL_BoundaryCol" // 面单抠图列方向扩边,默认0,范围[0,2000]
|
||||
#define KEY_WAYBILL_MAXBILLBARHEIGTHRATIO "WAYBILL_MaxBillBarHightRatio" // 最大面单和条码高度比例,默认20,范围[1,100]
|
||||
#define KEY_WAYBILL_MAXBILLBARWIDTHRATIO "WAYBILL_MaxBillBarWidthRatio" // 最大面单和条码宽度比例,默认5,范围[1,100]
|
||||
#define KEY_WAYBILL_MINBILLBARHEIGTHRATIO "WAYBILL_MinBillBarHightRatio" // 最小面单和条码高度比例,默认5,范围[1,100]
|
||||
#define KEY_WAYBILL_MINBILLBARWIDTHRATIO "WAYBILL_MinBillBarWidthRatio" // 最小面单和条码宽度比例,默认2,范围[1,100]
|
||||
#define KEY_WAYBILL_ENHANCEMETHOD "WAYBILL_EnhanceMethod" // 增强方法,最小值/默认值/不进行增强[0x1],线性拉伸[0x2],直方图拉伸[0x3],直方图均衡化[0x4],亮度校正/最大值[0x5]
|
||||
#define KEY_WAYBILL_ENHANCECLIPRATIOLOW "WAYBILL_ClipRatioLow" // 增强拉伸低阈值比例,默认1,范围[0,100]
|
||||
#define KEY_WAYBILL_ENHANCECLIPRATIOHIGH "WAYBILL_ClipRatioHigh" // 增强拉伸高阈值比例,默认99,范围[0,100]
|
||||
#define KEY_WAYBILL_ENHANCECONTRASTFACTOR "WAYBILL_ContrastFactor" // 对比度系数,默认100,范围[1,10000]
|
||||
#define KEY_WAYBILL_ENHANCESHARPENFACTOR "WAYBILL_SharpenFactor" // 锐化系数,默认0,范围[0,10000]
|
||||
#define KEY_WAYBILL_SHARPENKERNELSIZE "WAYBILL_KernelSize" // 锐化滤波核大小,默认3,范围[3,15]
|
||||
#define KEY_WAYBILL_CODEBOUNDARYROW "WAYBILL_CodeBoundaryRow" // 码单抠图行方向扩边,默认0,范围[0,2000]
|
||||
#define KEY_WAYBILL_CODEBOUNDARYCOL "WAYBILL_CodeBoundaryCol" // 码单抠图列方向扩边,默认0,范围[0,2000]
|
||||
|
||||
/************************************************结构体类型**************************************************************/
|
||||
|
||||
// GigE设备信息
|
||||
typedef struct _MV_CODEREADER_GIGE_DEVICE_INFO_
|
||||
{
|
||||
unsigned int nIpCfgOption; // 设备支持的IP类型
|
||||
unsigned int nIpCfgCurrent; // 设备当前IP类型
|
||||
unsigned int nCurrentIp; // 设备当前IP
|
||||
unsigned int nCurrentSubNetMask; // 设备当前子网掩码
|
||||
unsigned int nDefultGateWay; // 设备默认网关
|
||||
unsigned char chManufacturerName[32]; // 设备厂商
|
||||
unsigned char chModelName[32]; // 设备型号
|
||||
unsigned char chDeviceVersion[32]; // 设备版本
|
||||
unsigned char chManufacturerSpecificInfo[48]; // 设备厂商特殊信息
|
||||
unsigned char chSerialNumber[16]; // 设备序列号
|
||||
unsigned char chUserDefinedName[16]; // 设备用户自定义名称
|
||||
unsigned int nNetExport; // 主机网口IP地址
|
||||
unsigned int nCurUserIP; // 当前占用设备的用户IP
|
||||
unsigned int nReserved[3]; // 保留字节
|
||||
|
||||
}MV_CODEREADER_GIGE_DEVICE_INFO;
|
||||
|
||||
// U3V设备信息
|
||||
typedef struct _MV_CODEREADER_USB3_DEVICE_INFO_
|
||||
{
|
||||
unsigned char CrtlInEndPoint; // 控制输入端点
|
||||
unsigned char CrtlOutEndPoint; // 控制输出端点
|
||||
unsigned char StreamEndPoint; // 流端点
|
||||
unsigned char EventEndPoint; // 事件端点
|
||||
unsigned short idVendor; // 供应商ID号
|
||||
unsigned short idProduct; // 产品ID号
|
||||
unsigned int nDeviceNumber; // 设备序列号
|
||||
unsigned char chDeviceGUID[INFO_MAX_BUFFER_SIZE]; // 设备GUID号
|
||||
unsigned char chVendorName[INFO_MAX_BUFFER_SIZE]; // 供应商名称
|
||||
unsigned char chModelName[INFO_MAX_BUFFER_SIZE]; // 设备型号
|
||||
unsigned char chFamilyName[INFO_MAX_BUFFER_SIZE]; // 设备家族名称
|
||||
unsigned char chDeviceVersion[INFO_MAX_BUFFER_SIZE]; // 设备版本
|
||||
unsigned char chManufacturerName[INFO_MAX_BUFFER_SIZE]; // 设备厂商
|
||||
unsigned char chSerialNumber[INFO_MAX_BUFFER_SIZE]; // 设备序列号
|
||||
unsigned char chUserDefinedName[INFO_MAX_BUFFER_SIZE]; // 设备用户自定义名称
|
||||
unsigned int nbcdUSB; // 设备支持的USB协议
|
||||
unsigned int nReserved[3]; // 保留字节
|
||||
}MV_CODEREADER_USB3_DEVICE_INFO;
|
||||
|
||||
// 设备信息
|
||||
typedef struct _MV_CODEREADER_DEVICE_INFO_
|
||||
{
|
||||
unsigned short nMajorVer; // 设备主版本号
|
||||
unsigned short nMinorVer; // 设备次版本号
|
||||
unsigned int nMacAddrHigh; // 设备MAC地址高位
|
||||
unsigned int nMacAddrLow; // 设备MAC地址低位
|
||||
unsigned int nTLayerType; // 设备传输层协议类型
|
||||
|
||||
// 是否为指定系列型号相机
|
||||
// true -指定系列型号相机 false- 非指定系列型号相机
|
||||
bool bSelectDevice; // ch:选择设备 |en:Choose device
|
||||
unsigned int nReserved[3]; // 保留字节
|
||||
union
|
||||
{
|
||||
MV_CODEREADER_GIGE_DEVICE_INFO stGigEInfo; // GigE设备信息
|
||||
MV_CODEREADER_USB3_DEVICE_INFO stUsb3VInfo; // U3V设备信息
|
||||
// more ...
|
||||
}SpecialInfo;
|
||||
|
||||
}MV_CODEREADER_DEVICE_INFO;
|
||||
|
||||
// 设备信息列表
|
||||
typedef struct _MV_CODEREADER_DEVICE_INFO_LIST_
|
||||
{
|
||||
unsigned int nDeviceNum; // 在线设备数量
|
||||
MV_CODEREADER_DEVICE_INFO* pDeviceInfo[MV_CODEREADER_MAX_DEVICE_NUM]; // 设备信息(支持最多256个设备)
|
||||
|
||||
}MV_CODEREADER_DEVICE_INFO_LIST;
|
||||
|
||||
// 输出帧信息
|
||||
typedef struct _MV_CODEREADER_FRAME_OUT_INFO_
|
||||
{
|
||||
unsigned short nWidth; // 图像宽
|
||||
unsigned short nHeight; // 图像高
|
||||
enum MvCodeReaderGvspPixelType enPixelType; // 像素格式
|
||||
|
||||
unsigned int nFrameNum; // 帧号
|
||||
unsigned int nDevTimeStampHigh; // 时间戳高32位
|
||||
unsigned int nDevTimeStampLow; // 时间戳低32位
|
||||
unsigned int nReserved0; // 保留,8字节对齐
|
||||
int64_t nHostTimeStamp; // 主机生成的时间戳
|
||||
unsigned int nFrameLen; // 图像长度
|
||||
unsigned int nLostPacket; // 本帧丢包数
|
||||
unsigned int nReserved[2]; // 保留字节
|
||||
}MV_CODEREADER_FRAME_OUT_INFO;
|
||||
|
||||
// ch:Chunk内容 | en:The content of ChunkData
|
||||
typedef struct _MV_CODEREADER_CHUNK_DATA_CONTENT_
|
||||
{
|
||||
unsigned char* pChunkData;
|
||||
unsigned int nChunkID;
|
||||
unsigned int nChunkLen;
|
||||
unsigned int nReserved[8]; // 保留
|
||||
}MV_CODEREADER_CHUNK_DATA_CONTENT;
|
||||
|
||||
// 输出帧信息
|
||||
typedef struct _MV_CODEREADER_FRAME_OUT_INFO_EX_
|
||||
{
|
||||
unsigned short nWidth; // 图像宽
|
||||
unsigned short nHeight; // 图像高
|
||||
enum MvCodeReaderGvspPixelType enPixelType; // 像素格式
|
||||
unsigned int nFrameNum; // 帧号
|
||||
unsigned int nDevTimeStampHigh; // 时间戳高32位
|
||||
unsigned int nDevTimeStampLow; // 时间戳低32位
|
||||
unsigned int nReserved0; // 保留,8字节对齐
|
||||
int64_t nHostTimeStamp; // 主机生成的时间戳
|
||||
unsigned int nFrameLen; // 图像长度
|
||||
|
||||
// chunk新增水印信息
|
||||
// 设备水印时标
|
||||
unsigned int nSecondCount; // 秒数
|
||||
unsigned int nCycleCount; // 循环计数
|
||||
unsigned int nCycleOffset; // 循环计数偏移量
|
||||
float fGain; // 增益
|
||||
float fExposureTime; // 曝光时间
|
||||
unsigned int nAverageBrightness; // 平均亮度
|
||||
|
||||
// 白平衡相关
|
||||
unsigned int nRed; // 红色数据
|
||||
unsigned int nGreen; // 绿色数据
|
||||
unsigned int nBlue; // 蓝色数据
|
||||
unsigned int nFrameCounter; // 图像数量计数
|
||||
unsigned int nTriggerIndex; // 触发计数
|
||||
|
||||
// Line 输入/输出
|
||||
unsigned int nInput; // 输入
|
||||
unsigned int nOutput; // 输出
|
||||
|
||||
// ROI区域
|
||||
unsigned short nOffsetX; // ROI X轴偏移
|
||||
unsigned short nOffsetY; // ROI Y轴偏移
|
||||
unsigned short nChunkWidth; // Chunk宽度
|
||||
unsigned short nChunkHeight; // Chunk高度
|
||||
unsigned int nLostPacket; // 本帧丢包数
|
||||
unsigned int nUnparsedChunkNum; //未解析的Chunkdata个数
|
||||
union
|
||||
{
|
||||
MV_CODEREADER_CHUNK_DATA_CONTENT* pUnparsedChunkContent;
|
||||
int64_t nAligning;
|
||||
}UnparsedChunkList;
|
||||
|
||||
unsigned int nReserved[36]; // 保留字节
|
||||
}MV_CODEREADER_FRAME_OUT_INFO_EX;
|
||||
|
||||
// 图像显示信息
|
||||
typedef struct _MV_CODEREADER_DISPLAY_FRAME_INFO_
|
||||
{
|
||||
void* hWnd; // 显示窗口句柄
|
||||
unsigned char* pData; // 源图像数据
|
||||
unsigned int nDataLen; // 源图像数据长度
|
||||
unsigned short nWidth; // 源图像宽
|
||||
unsigned short nHeight; // 源图像高
|
||||
enum MvCodeReaderGvspPixelType enPixelType; // 源图像像素格式
|
||||
unsigned int nRes[4]; // 保留字节
|
||||
}MV_CODEREADER_DISPLAY_FRAME_INFO;
|
||||
|
||||
// 保存图片格式
|
||||
enum MV_CODEREADER_IAMGE_TYPE
|
||||
{
|
||||
MV_CODEREADER_Image_Undefined = 0,
|
||||
MV_CODEREADER_Image_Mono8 = 1,
|
||||
MV_CODEREADER_Image_Jpeg = 2,
|
||||
MV_CODEREADER_Image_Bmp = 3,
|
||||
MV_CODEREADER_Image_RGB24 = 4,
|
||||
MV_CODEREADER_Image_Png = 5, // Png图像(暂不支持)
|
||||
MV_CODEREADER_Image_Tif = 6, // Tif图像(暂不支持)
|
||||
};
|
||||
|
||||
// 保存图片参数
|
||||
typedef struct _MV_CODEREADER_SAVE_IMAGE_PARAM_T_
|
||||
{
|
||||
unsigned char* pData; // 输入数据缓存
|
||||
unsigned int nDataLen; // 输入数据大小
|
||||
enum MvCodeReaderGvspPixelType enPixelType; // 输入数据的像素格式
|
||||
unsigned short nWidth; // 图像宽
|
||||
unsigned short nHeight; // 图像高
|
||||
|
||||
unsigned char* pImageBuffer; // 输出图片缓存
|
||||
unsigned int nImageLen; // 输出图片大小
|
||||
unsigned int nBufferSize; // 提供的输出缓冲区大小
|
||||
enum MV_CODEREADER_IAMGE_TYPE enImageType; // 输出图片格式
|
||||
}MV_CODEREADER_SAVE_IMAGE_PARAM;
|
||||
|
||||
// 图片保存参数
|
||||
typedef struct _MV_CODEREADER_SAVE_IMAGE_PARAM_T_EX_
|
||||
{
|
||||
unsigned char* pData; // 输入数据缓存
|
||||
unsigned int nDataLen; // 输入数据大小
|
||||
enum MvCodeReaderGvspPixelType enPixelType; // 输入数据的像素格式
|
||||
unsigned short nWidth; // 图像宽
|
||||
unsigned short nHeight; // 图像高
|
||||
|
||||
unsigned char* pImageBuffer; // 输出图片缓存
|
||||
unsigned int nImageLen; // 输出图片大小
|
||||
unsigned int nBufferSize; // 提供的输出缓冲区大小
|
||||
enum MV_CODEREADER_IAMGE_TYPE enImageType; // 输出图片格式
|
||||
unsigned int nJpgQuality; // 编码质量, (50-99]
|
||||
|
||||
// 格式转为RGB24的插值方法 0-最近邻 1-双线性 2-Hamilton (如果传入其它值则默认为最近邻)
|
||||
unsigned int iMethodValue; // 插值方式
|
||||
unsigned int nReserved[3]; // 保留字节
|
||||
}MV_CODEREADER_SAVE_IMAGE_PARAM_EX;
|
||||
|
||||
// 事件回调信息
|
||||
typedef struct _MV_CODEREADER_EVENT_OUT_INFO_
|
||||
{
|
||||
char EventName[MV_CODEREADER_MAX_EVENT_NAME_SIZE]; // Event名称
|
||||
unsigned short nEventID; // Event号
|
||||
unsigned short nStreamChannel; // 流通道序号
|
||||
unsigned int nBlockIdHigh; // 帧号高位
|
||||
unsigned int nBlockIdLow; // 帧号低位
|
||||
unsigned int nTimestampHigh; // 时间戳高位
|
||||
unsigned int nTimestampLow; // 时间戳低位
|
||||
void * pEventData; // Event数据
|
||||
unsigned int nEventDataSize; // Event数据长度
|
||||
|
||||
unsigned int nReserved[16]; // 预留
|
||||
}MV_CODEREADER_EVENT_OUT_INFO;
|
||||
|
||||
// 文件存取
|
||||
typedef struct _MV_CODEREADER_FILE_ACCESS_T
|
||||
{
|
||||
const char * pUserFileName; // 用户文件名
|
||||
const char * pDevFileName; // 设备文件名
|
||||
unsigned int nReserved[32]; // 预留字节
|
||||
}MV_CODEREADER_FILE_ACCESS;
|
||||
|
||||
// 文件存取进度
|
||||
typedef struct _MV_CODEREADER_FILE_ACCESS_PROGRESS_T
|
||||
{
|
||||
int64_t nCompleted; // 已完成的长度
|
||||
int64_t nTotal; // 总长度
|
||||
unsigned int nReserved[8]; // 预留字节
|
||||
}MV_CODEREADER_FILE_ACCESS_PROGRESS;
|
||||
|
||||
// Enum类型值
|
||||
typedef struct _MV_CODEREADER_ENUMVALUE_T
|
||||
{
|
||||
unsigned int nCurValue; // 当前值
|
||||
unsigned int nSupportedNum; // 有效数据个数
|
||||
unsigned int nSupportValue[MV_CODEREADER_MAX_XML_SYMBOLIC_NUM]; // 支持的枚举类型
|
||||
unsigned int nReserved[4]; // 保留字节
|
||||
}MV_CODEREADER_ENUMVALUE;
|
||||
|
||||
// Int类型值
|
||||
typedef struct _MV_CODEREADER_INTVALUE_T
|
||||
{
|
||||
unsigned int nCurValue; // 当前值
|
||||
unsigned int nMax; // 最大值
|
||||
unsigned int nMin; // 最小值
|
||||
unsigned int nInc; // 增量值
|
||||
unsigned int nReserved[4]; // 保留字节
|
||||
}MV_CODEREADER_INTVALUE;
|
||||
|
||||
// Int类型值
|
||||
typedef struct _MV_CODEREADER_INTVALUE_EX_T
|
||||
{
|
||||
int64_t nCurValue; // 当前值
|
||||
int64_t nMax; // 最大值
|
||||
int64_t nMin; // 最小值
|
||||
int64_t nInc; // 增量值
|
||||
unsigned int nReserved[16]; // 保留字节
|
||||
}MV_CODEREADER_INTVALUE_EX;
|
||||
|
||||
// Float类型值
|
||||
typedef struct _MV_CODEREADER_FLOATVALUE_T
|
||||
{
|
||||
float fCurValue; // 当前值
|
||||
float fMax; // 最大值
|
||||
float fMin; // 最小值
|
||||
unsigned int nReserved[4]; // 保留字节
|
||||
}MV_CODEREADER_FLOATVALUE;
|
||||
|
||||
// String类型值
|
||||
typedef struct _MV_CODEREADER_STRINGVALUE_T
|
||||
{
|
||||
char chCurValue[256]; // 当前值
|
||||
int64_t nMaxLength; // 最大长度
|
||||
unsigned int nReserved[2]; // 保留字节
|
||||
}MV_CODEREADER_STRINGVALUE;
|
||||
|
||||
|
||||
// Int型坐标
|
||||
typedef struct _MV_CODEREADER_POINT_I_
|
||||
{
|
||||
int x; // x坐标
|
||||
int y; // y坐标
|
||||
}MV_CODEREADER_POINT_I;
|
||||
|
||||
// Float型坐标
|
||||
typedef struct _MV_CODEREADER_POINT_F_
|
||||
{
|
||||
float x; // x坐标
|
||||
float y; // y坐标
|
||||
}MV_CODEREADER_POINT_F;
|
||||
|
||||
// 输出帧信息
|
||||
typedef struct _MV_CODEREADER_IMAGE_OUT_INFO_
|
||||
{
|
||||
unsigned short nWidth; // 图像宽
|
||||
unsigned short nHeight; // 图像高
|
||||
enum MvCodeReaderGvspPixelType enPixelType; // 像素或图片格式
|
||||
|
||||
unsigned int nTriggerIndex; // 触发序号
|
||||
unsigned int nFrameNum; // 帧号
|
||||
unsigned int nFrameLen; // 当前帧数据大小
|
||||
unsigned int nTimeStampHigh; // 时间戳高32位
|
||||
unsigned int nTimeStampLow; // 时间戳低32位
|
||||
|
||||
unsigned int nResultType; // 输出消息类型
|
||||
|
||||
unsigned char chResult[MV_CODEREADER_MAX_RESULT_SIZE]; // 根据消息类型对应不同结构体
|
||||
bool bIsGetCode; // 是否读到条码
|
||||
|
||||
unsigned char* pImageWaybill; // 面单图像
|
||||
unsigned int nImageWaybillLen; // 面单数据大小
|
||||
enum MV_CODEREADER_IAMGE_TYPE enWaybillImageType; // 面单图像类型
|
||||
|
||||
unsigned int bFlaseTrigger; // 是否误触发
|
||||
unsigned int nFocusScore; // 聚焦得分
|
||||
|
||||
unsigned int nChannelID; // 对应Stream通道序号
|
||||
unsigned int nImageCost; // 帧图像在相机内部的处理耗时
|
||||
|
||||
unsigned int nReserved[6]; // 保留字节
|
||||
}MV_CODEREADER_IMAGE_OUT_INFO;
|
||||
|
||||
// 条码信息
|
||||
typedef struct _MV_CODEREADER_BCR_INFO_
|
||||
{
|
||||
unsigned int nID; // 条码ID
|
||||
char chCode[MV_CODEREADER_MAX_BCR_CODE_LEN]; // 字符
|
||||
unsigned int nLen; // 字符长度
|
||||
unsigned int nBarType; // 条码类型
|
||||
|
||||
MV_CODEREADER_POINT_I pt[4]; // 条码位置
|
||||
|
||||
// 一维码:以图像x正轴为基准,顺时针0-3600度;二维码:以图像x正轴为基准,逆时针0-3600度
|
||||
int nAngle; // 条码角度(10倍)(0~3600)
|
||||
unsigned int nMainPackageId; // 主包ID
|
||||
unsigned int nSubPackageId; // 次包ID
|
||||
unsigned short sAppearCount; // 条码被识别的次数
|
||||
unsigned short sPPM; // PPM(10倍)
|
||||
unsigned short sAlgoCost; // 算法耗时
|
||||
unsigned short sSharpness; // 图像清晰度(10倍)
|
||||
} MV_CODEREADER_BCR_INFO;
|
||||
|
||||
// 条码信息列表
|
||||
typedef struct _MV_CODEREADER_RESULT_BCR_
|
||||
{
|
||||
unsigned int nCodeNum; // 条码数量
|
||||
MV_CODEREADER_BCR_INFO stBcrInfo[MAX_CODEREADER_BCR_COUNT]; // 条码信息
|
||||
unsigned int nReserved[4]; // 保留字节
|
||||
}MV_CODEREADER_RESULT_BCR;
|
||||
|
||||
// 条码质量(质量分5等[0,4], 越高等质量越好; 1D指一维码,2D指二维码)
|
||||
typedef struct _MV_CODEREADER_CODE_INFO_
|
||||
{
|
||||
// 等级
|
||||
int nOverQuality; // 总体质量评分(1D/2D共用)
|
||||
int nDeCode; // 译码评分(1D/2D共用)
|
||||
int nSCGrade; // Symbol Contrast对比度质量评分(1D/2D共用)
|
||||
int nModGrade; // modulation模块均匀性评分(1D/2D共用)
|
||||
|
||||
// 2D等级
|
||||
int nFPDGrade; // fixed_pattern_damage评分
|
||||
int nANGrade; // axial_nonuniformity码轴规整性评分
|
||||
int nGNGrade; // grid_nonuniformity基础grid均匀性质量评分
|
||||
int nUECGrade; // unused_error_correction未使用纠错功能评分
|
||||
int nPGHGrade; // Print Growth Horizontal 打印伸缩(水平)评分
|
||||
int nPGVGrade; // Print Growth Veritical 打印伸缩(垂直)评分
|
||||
|
||||
// 分数
|
||||
float fSCScore; // Symbol Contrast对比度质量分数(1D/2D共用)
|
||||
float fModScore; // modulation模块均匀性分数(1D/2D共用)
|
||||
|
||||
// 2D分数
|
||||
float fFPDScore; // fixed_pattern_damage分数
|
||||
float fAnScore; // axial_nonuniformity码轴规整性分数
|
||||
float fGNScore; // grid_nonuniformity基础grid均匀性质量分数
|
||||
float fUECScore; // unused_error_correction未使用纠错功能分数
|
||||
float fPGHScore; // Print Growth Horizontal 打印伸缩(水平)分数
|
||||
float fPGVScore; // Print Growth Veritical 打印伸缩(垂直)分数
|
||||
|
||||
int nRMGrade; // reflectance margin反射率余量评分
|
||||
float fRMScore; // reflectance margin反射率余量分数
|
||||
|
||||
// 1D等级
|
||||
int n1DEdgeGrade; // edge determination 边缘确定度质量等级
|
||||
int n1DMinRGrade; // minimum reflectance 最小反射率质量等级
|
||||
int n1DMinEGrade; // minimum edge contrast 最小边缘对比度质量等级
|
||||
int n1DDcdGrade; // decodability 可译码性质量等级
|
||||
int n1DDefGrade; // defects 缺陷质量等级
|
||||
int n1DQZGrade; // quiet zone 静区质量等级
|
||||
|
||||
// 1D分数
|
||||
float f1DEdgeScore; // edge determination 边缘确定度分数
|
||||
float f1DMinRScore; // minimum reflectance 最小反射率分数
|
||||
float f1DMinEScore; // minimum edge contrast 最小边缘对比度分数
|
||||
float f1DDcdScore; // decodability 可译码性分数
|
||||
float f1DDefScore; // defects 缺陷分数
|
||||
float f1DQZScore; // quiet zone 静区分数
|
||||
|
||||
int nReserved[18]; //预留
|
||||
} MV_CODEREADER_CODE_INFO;
|
||||
|
||||
// 带质量信息的BCR信息
|
||||
typedef struct _MV_CODEREADER_BCR_INFO_EX_
|
||||
{
|
||||
unsigned int nID; // 条码ID
|
||||
char chCode[MV_CODEREADER_MAX_BCR_CODE_LEN]; // 字符识别长度为256
|
||||
unsigned int nLen; // 字符长度
|
||||
unsigned int nBarType; // 条码类型
|
||||
MV_CODEREADER_POINT_I pt[4]; // 条码位置
|
||||
MV_CODEREADER_CODE_INFO stCodeQuality; // 条码质量评价
|
||||
|
||||
// 一维码:以图像x正轴为基准,顺时针0-3600度;二维码:以图像x正轴为基准,逆时针0-3600度
|
||||
int nAngle; // 条码角度(10倍)(0~3600)
|
||||
unsigned int nMainPackageId; // 主包ID
|
||||
unsigned int nSubPackageId; // 次包ID
|
||||
unsigned short sAppearCount; // 条码被识别的次数
|
||||
unsigned short sPPM; // PPM(10倍)
|
||||
unsigned short sAlgoCost; // 算法耗时(ms)
|
||||
unsigned short sSharpness; // 清晰度
|
||||
bool bIsGetQuality; // 是否支持二维码质量评级
|
||||
unsigned int nIDRScore; // 读码评分
|
||||
unsigned int n1DIsGetQuality; // 是否支持一维码质量评级(0-不支持 1-支持)
|
||||
unsigned int nTotalProcCost; // 从触发开始到APP输出时间统计(ms)
|
||||
unsigned int nTriggerTimeTvHigh; // 触发开始时间高32位(s)
|
||||
unsigned int nTriggerTimeTvLow; // 触发开始时间低32位(s)
|
||||
unsigned int nTriggerTimeUtvHigh; // 触发开始时间低32位(us)
|
||||
unsigned int nTriggerTimeUtvLow; // 触发开始时间低32位(us)
|
||||
unsigned int nReserved[24]; // 预留
|
||||
} MV_CODEREADER_BCR_INFO_EX;
|
||||
|
||||
// 条码信息加条码质量列表
|
||||
typedef struct _MV_CODEREADER_RESULT_BCR_EX_
|
||||
{
|
||||
unsigned int nCodeNum; // 条码数量
|
||||
MV_CODEREADER_BCR_INFO_EX stBcrInfoEx[MAX_CODEREADER_BCR_COUNT]; // 条码信息
|
||||
unsigned int nReserved[4]; // 保留字节
|
||||
}MV_CODEREADER_RESULT_BCR_EX;
|
||||
|
||||
// 带质量信息且条码字符扩展的BCR信息
|
||||
typedef struct _MV_CODEREADER_BCR_INFO_EX_2_
|
||||
{
|
||||
unsigned int nID; // 条码ID
|
||||
char chCode[MV_CODEREADER_MAX_BCR_CODE_LEN_EX]; // 字符可识别长度扩展至4096
|
||||
unsigned int nLen; // 字符实际真实长度
|
||||
unsigned int nBarType; // 条码类型
|
||||
MV_CODEREADER_POINT_I pt[4]; // 条码位置
|
||||
MV_CODEREADER_CODE_INFO stCodeQuality; // 条码质量评价
|
||||
|
||||
// 一维码:以图像x正轴为基准,顺时针0-3600度;二维码:以图像x正轴为基准,逆时针0-3600度
|
||||
int nAngle; // 条码角度(10倍)(0~3600)
|
||||
unsigned int nMainPackageId; // 主包ID
|
||||
unsigned int nSubPackageId; // 次包ID
|
||||
unsigned short sAppearCount; // 条码被识别的次数
|
||||
unsigned short sPPM; // PPM(10倍)
|
||||
unsigned short sAlgoCost; // 算法耗时(ms)
|
||||
unsigned short sSharpness; // 清晰度
|
||||
bool bIsGetQuality; // 是否支持二维码质量评级
|
||||
unsigned int nIDRScore; // 读码评分
|
||||
unsigned int n1DIsGetQuality; // 是否支持一维码质量评级(0-不支持 1-支持)
|
||||
unsigned int nTotalProcCost; // 从触发开始到APP输出时间统计(ms)
|
||||
unsigned int nTriggerTimeTvHigh; // 触发开始时间高32位(s)
|
||||
unsigned int nTriggerTimeTvLow; // 触发开始时间低32位(s)
|
||||
unsigned int nTriggerTimeUtvHigh; // 触发开始时间低32位(us)
|
||||
unsigned int nTriggerTimeUtvLow; // 触发开始时间低32位(us)
|
||||
int nReserved[59]; // 预留
|
||||
} MV_CODEREADER_BCR_INFO_EX2;
|
||||
|
||||
// 条码信息字符扩展加条码质量列表
|
||||
typedef struct _MV_CODEREADER_RESULT_BCR_EX_2_
|
||||
{
|
||||
unsigned int nCodeNum; // 条码数量(扩展)
|
||||
MV_CODEREADER_BCR_INFO_EX2 stBcrInfoEx2[MAX_CODEREADER_BCR_COUNT_EX]; // 条码信息(条码字符扩展)
|
||||
unsigned int nReserved[8]; // 保留字节
|
||||
}MV_CODEREADER_RESULT_BCR_EX2;
|
||||
|
||||
// 抠图面单信息
|
||||
typedef struct _MV_CODEREADER_WAYBILL_INFO_
|
||||
{
|
||||
// 面单坐标信息
|
||||
float fCenterX; // 中心点列坐标
|
||||
float fCenterY; // 中心点行坐标
|
||||
float fWidth; // 矩形宽度,宽度为长半轴
|
||||
float fHeight; // 矩形高度,高度为短半轴
|
||||
float fAngle; // 矩形角度
|
||||
float fConfidence; // 置信度
|
||||
|
||||
// 面单图片
|
||||
unsigned char* pImageWaybill;
|
||||
unsigned int nImageLen;
|
||||
|
||||
unsigned int nOcrRowNum; // 当前面单内的ocr行数
|
||||
unsigned int nReserved[11];
|
||||
}MV_CODEREADER_WAYBILL_INFO;
|
||||
|
||||
// 面单信息列表
|
||||
typedef struct _MV_CODEREADER_WAYBILL_LIST_
|
||||
{
|
||||
unsigned int nWaybillNum; // 面单数量
|
||||
enum MV_CODEREADER_IAMGE_TYPE enWaybillImageType; // 面单图像类型,可选择bmp、raw、jpg输出
|
||||
MV_CODEREADER_WAYBILL_INFO stWaybillInfo[MAX_CODEREADER_WAYBILL_COUNT]; // 面单信息
|
||||
unsigned int nOcrAllNum; // 所有面单内的OCR总行数 面单1(ocr)+面单2(ocr)+...
|
||||
unsigned int nReserved[3]; // 保留字节
|
||||
}MV_CODEREADER_WAYBILL_LIST;
|
||||
|
||||
// OCR基础信息
|
||||
typedef struct _MV_CODEREADER_OCR_ROW_INFO_
|
||||
{
|
||||
unsigned int nID; // OCR ID
|
||||
unsigned int nOcrLen; // OCR字符实际真实长度
|
||||
char chOcr[MV_CODEREADER_MAX_OCR_LEN]; // 识别到的OCR字符
|
||||
float fCharConfidence; // 字符行整体置信度
|
||||
unsigned int nOcrRowCenterX; // 单行OCR中心点列坐标
|
||||
unsigned int nOcrRowCenterY; // 单行OCR中心点行坐标
|
||||
unsigned int nOcrRowWidth; // 单行OCR矩形宽度,宽度为长半轴
|
||||
unsigned int nOcrRowHeight; // 单行OCR矩形高度,高度为短半轴
|
||||
float fOcrRowAngle; // 单行OCR矩形角度
|
||||
float fDeteConfidence; // 单行OCR定位置信度
|
||||
unsigned short sOcrAlgoCost; // OCR算法耗时 单位ms
|
||||
|
||||
unsigned short sReserved; // 预留
|
||||
int nReserved[31];
|
||||
}MV_CODEREADER_OCR_ROW_INFO;
|
||||
|
||||
// OCR信息列表
|
||||
typedef struct _MV_CODEREADER_OCR_INFO_LIST_
|
||||
{
|
||||
unsigned int nOCRAllNum; // 所有面单内的OCR总行数
|
||||
MV_CODEREADER_OCR_ROW_INFO stOcrRowInfo[MAX_CODEREADER_OCR_COUNT]; // OCR行基础信息
|
||||
int nReserved[8]; // 保留字节
|
||||
}MV_CODEREADER_OCR_INFO_LIST;
|
||||
|
||||
// 图像输出信息扩展(OCR信息)
|
||||
typedef struct _MV_CODEREADER_IMAGE_OUT_INFO_EX_
|
||||
{
|
||||
unsigned short nWidth; // 图像宽
|
||||
unsigned short nHeight; // 图像高
|
||||
enum MvCodeReaderGvspPixelType enPixelType; // 像素或图片格式
|
||||
|
||||
unsigned int nTriggerIndex; // 触发序号
|
||||
unsigned int nFrameNum; // 帧号
|
||||
unsigned int nFrameLen; // 当前帧数据大小
|
||||
unsigned int nTimeStampHigh; // 时间戳高32位
|
||||
unsigned int nTimeStampLow; // 时间戳低32位
|
||||
unsigned int bFlaseTrigger; // 是否误触发
|
||||
unsigned int nFocusScore; // 聚焦得分
|
||||
bool bIsGetCode; // 是否读到条码
|
||||
MV_CODEREADER_RESULT_BCR* pstCodeList; // 条码信息列表
|
||||
MV_CODEREADER_WAYBILL_LIST* pstWaybillList; // 面单信息
|
||||
|
||||
unsigned int nEventID; // 事件ID
|
||||
unsigned int nChannelID; // 对应Stream通道序号
|
||||
unsigned int nImageCost; // 帧图像在相机内部的处理耗时
|
||||
|
||||
union
|
||||
{
|
||||
MV_CODEREADER_OCR_INFO_LIST* pstOcrList; // OCR信息
|
||||
int64_t nAligning;
|
||||
}UnparsedOcrList;
|
||||
|
||||
unsigned int nReserved[4]; // 保留字节
|
||||
}MV_CODEREADER_IMAGE_OUT_INFO_EX;
|
||||
|
||||
// 图像输出信息扩展(条码信息扩展,条码最大个数,条码字符长度扩展为4096)
|
||||
typedef struct _MV_CODEREADER_IMAGE_OUT_INFO_EX_2_
|
||||
{
|
||||
unsigned short nWidth; // 图像宽
|
||||
unsigned short nHeight; // 图像高
|
||||
enum MvCodeReaderGvspPixelType enPixelType; // 像素或图片格式
|
||||
|
||||
unsigned int nTriggerIndex; // 触发序号
|
||||
unsigned int nFrameNum; // 帧号
|
||||
unsigned int nFrameLen; // 当前帧数据大小
|
||||
unsigned int nTimeStampHigh; // 时间戳高32位
|
||||
unsigned int nTimeStampLow; // 时间戳低32位
|
||||
unsigned int bFlaseTrigger; // 是否误触发
|
||||
unsigned int nFocusScore; // 聚焦得分
|
||||
bool bIsGetCode; // 是否读到条码
|
||||
MV_CODEREADER_RESULT_BCR_EX* pstCodeListEx; // 条码信息列表
|
||||
|
||||
MV_CODEREADER_WAYBILL_LIST* pstWaybillList; // 面单信息
|
||||
|
||||
unsigned int nEventID; // 事件ID
|
||||
unsigned int nChannelID; // 对应Stream通道序号
|
||||
unsigned int nImageCost; // 帧图像在相机内部的处理耗时
|
||||
|
||||
union
|
||||
{
|
||||
MV_CODEREADER_RESULT_BCR_EX2* pstCodeListEx2; // 条码信息(条码字符长度扩展)建议以该扩展条码字符的条码信息解析条码
|
||||
int64_t nAligning;
|
||||
}UnparsedBcrList;
|
||||
|
||||
union
|
||||
{
|
||||
MV_CODEREADER_OCR_INFO_LIST* pstOcrList; // OCR信息
|
||||
int64_t nAligning;
|
||||
}UnparsedOcrList;
|
||||
|
||||
unsigned int nReserved[26]; // 保留字节
|
||||
}MV_CODEREADER_IMAGE_OUT_INFO_EX2;
|
||||
|
||||
// 触发信息
|
||||
typedef struct _MV_CODEREADER_TRIGGER_INFO_DATA_
|
||||
{
|
||||
unsigned int nTriggerIndex; // 触发序号 即同步触发号
|
||||
unsigned int nTriggerFlag; //触发状态 (1开始 0结束)
|
||||
|
||||
// 当前的触发状态对应的时间戳(分高、低位传输各4个字节)
|
||||
unsigned int nTriggerTimeHigh; // 触发时间高4位
|
||||
unsigned int nTriggerTimeLow; // 触发时间低4位
|
||||
|
||||
unsigned int nOriginalTrigger; // 原生触发号(相机自带的触发号)
|
||||
unsigned short nIsForceOver; // 是否强制结束(0--正常结束 1--强制结束 属于相机内部机制主动传输 上层无法设置生效)
|
||||
unsigned short nIsMainCam; // 主从标记 1--主相机 0--从相机
|
||||
int64_t nHostTimeStamp; // 主机生成的时间戳
|
||||
unsigned int reserved[30]; // 预留
|
||||
}MV_CODEREADER_TRIGGER_INFO_DATA;
|
||||
|
||||
// 触发模式
|
||||
typedef enum _MV_CODEREADER_TRIGGER_MODE_
|
||||
{
|
||||
MV_CODEREADER_TRIGGER_MODE_OFF = 0, // 触发关闭
|
||||
MV_CODEREADER_TRIGGER_MODE_ON = 1, // 触发打开
|
||||
}MV_CODEREADER_TRIGGER_MODE;
|
||||
|
||||
// 触发源
|
||||
typedef enum _MV_CODEREADER_TRIGGER_SOURCE_
|
||||
{
|
||||
MV_CODEREADER_TRIGGER_SOURCE_LINE0 = 0, // Line0
|
||||
MV_CODEREADER_TRIGGER_SOURCE_LINE1 = 1, // Line1
|
||||
MV_CODEREADER_TRIGGER_SOURCE_LINE2 = 2, // Line2
|
||||
MV_CODEREADER_TRIGGER_SOURCE_LINE3 = 3, // Line3
|
||||
MV_CODEREADER_TRIGGER_SOURCE_COUNTER0 = 4, // 计数器0触发
|
||||
MV_CODEREADER_TRIGGER_SOURCE_TCPSERVERSTART = 5, // Tcp服务器触发
|
||||
MV_CODEREADER_TRIGGER_SOURCE_UDPSTART = 6, // Udp触发
|
||||
MV_CODEREADER_TRIGGER_SOURCE_SOFTWARE = 7, // 软触发
|
||||
MV_CODEREADER_TRIGGER_SOURCE_SERIALSTART = 8, // 串口触发
|
||||
MV_CODEREADER_TRIGGER_SOURCE_SELFTRIGGER = 9, // 自触发
|
||||
MV_CODEREADER_TRIGGER_SOURCE_MAINSUB = 10, // 主从触发
|
||||
MV_CODEREADER_TRIGGER_SOURCE_TCPCLIENTSTART = 12, // Tcp客户端触发
|
||||
|
||||
}MV_CODEREADER_TRIGGER_SOURCE;
|
||||
|
||||
// 条码类型
|
||||
typedef enum _MV_CODEREADER_CODE_TYPE_
|
||||
{
|
||||
MV_CODEREADER_CODE_NONE = 0, // 无可识别条码
|
||||
|
||||
// 二维码
|
||||
MV_CODEREADER_TDCR_DM = 1, // DM码
|
||||
MV_CODEREADER_TDCR_QR = 2, // QR码
|
||||
MV_CODEREADER_TDCR_MICROQR = 140, // MicroQR码
|
||||
|
||||
// 一维码
|
||||
MV_CODEREADER_BCR_EAN8 = 8, // EAN8码
|
||||
MV_CODEREADER_BCR_UPCE = 9, // UPCE码
|
||||
MV_CODEREADER_BCR_UPCA = 12, // UPCA码
|
||||
MV_CODEREADER_BCR_EAN13 = 13, // EAN13码
|
||||
MV_CODEREADER_BCR_ISBN13 = 14, // ISBN13码
|
||||
MV_CODEREADER_BCR_CODABAR = 20, // 库德巴码
|
||||
MV_CODEREADER_BCR_ITF25 = 25, // 交叉25码
|
||||
MV_CODEREADER_BCR_CODE39 = 39, // Code 39
|
||||
MV_CODEREADER_BCR_CODE93 = 93, // Code 93
|
||||
MV_CODEREADER_BCR_CODE128 = 128, // Code 128
|
||||
|
||||
MV_CODEREADER_TDCR_PDF417 = 131, // PDF417码
|
||||
|
||||
MV_CODEREADER_BCR_MATRIX25 = 26, // MATRIX25码
|
||||
MV_CODEREADER_BCR_MSI = 30, // MSI码
|
||||
MV_CODEREADER_BCR_CODE11 = 31, // code11
|
||||
MV_CODEREADER_BCR_INDUSTRIAL25 = 32, // industrial25
|
||||
MV_CODEREADER_BCR_CHINAPOST = 33, // 中国邮政码
|
||||
MV_CODEREADER_BCR_ITF14 = 27, // 交叉14码
|
||||
|
||||
MV_CODEREADER_BCR_PHARMACODE = 36, // Pharmacode码
|
||||
MV_CODEREADER_BCR_PHARMACODE2D = 37, // Pharmacode Two Track码
|
||||
|
||||
MV_CODEREADER_TDCR_ECC140 = 133, // ECC140码制
|
||||
MV_CODEREADER_TDCR_AZTEC = 132, // AZTEC码
|
||||
|
||||
}MV_CODEREADER_CODE_TYPE;
|
||||
|
||||
|
||||
|
||||
// 节点访问模式
|
||||
enum MV_CODEREADER_XML_AccessMode
|
||||
{
|
||||
MV_CODEREADER_AM_NI, // 节点未实现
|
||||
MV_CODEREADER_AM_NA, // 节点不可达
|
||||
MV_CODEREADER_AM_WO, // 节点只写
|
||||
MV_CODEREADER_AM_RO, // 节点只读
|
||||
MV_CODEREADER_AM_RW, // 节点可读可写
|
||||
MV_CODEREADER_AM_Undefined, // 节点未定义
|
||||
MV_CODEREADER_AM_CycleDetect, // 节点需周期检测
|
||||
};
|
||||
|
||||
// 每个节点对应的接口类型
|
||||
enum MV_CODEREADER_XML_InterfaceType
|
||||
{
|
||||
MV_CODEREADER_IFT_IValue, // Value类型值
|
||||
MV_CODEREADER_IFT_IBase, // Base类型值
|
||||
MV_CODEREADER_IFT_IInteger, // Integer类型值
|
||||
MV_CODEREADER_IFT_IBoolean, // Boolean类型值
|
||||
MV_CODEREADER_IFT_ICommand, // Command类型值
|
||||
MV_CODEREADER_IFT_IFloat, // Float类型值
|
||||
MV_CODEREADER_IFT_IString, // String类型值
|
||||
MV_CODEREADER_IFT_IRegister, // Register类型值
|
||||
MV_CODEREADER_IFT_ICategory, // Category类型值
|
||||
MV_CODEREADER_IFT_IEnumeration, // Enumeration类型值
|
||||
MV_CODEREADER_IFT_IEnumEntry, // EnumEntry类型值
|
||||
MV_CODEREADER_IFT_IPort, // Port类型值
|
||||
};
|
||||
|
||||
// 输出信息类型
|
||||
enum MvCodeReaderType
|
||||
{
|
||||
CodeReader_ResType_NULL = 0, // 没有结果输出
|
||||
CodeReader_ResType_BCR = 1, // 输出信息为BCR(对应结构体 MV_CODEREADER_RESULT_BCR)
|
||||
};
|
||||
|
||||
/************************************************************************/
|
||||
/* 升级相关高级参数 */
|
||||
/************************************************************************/
|
||||
|
||||
// 设备运行状态
|
||||
enum MV_CODEREADER_PROGRAM_STATE
|
||||
{
|
||||
MV_CODEREADER_PROGRAM_UNKNOWN, // 未知状态
|
||||
MV_CODEREADER_PROGRAM_RUNNING, // 设备正在运行
|
||||
MV_CODEREADER_PROGRAM_STOP // 设备停止运行
|
||||
};
|
||||
|
||||
// 设备当前连接状态
|
||||
typedef enum _MV_CODEREADER_DEVICE_CONNECT_STATUS_
|
||||
{
|
||||
MV_CODEREADER_DEVICE_STATUS_FREE = 1, // 空闲状态
|
||||
MV_CODEREADER_DEVICE_STATUS_BASE = 2, // 第三方连接状态
|
||||
|
||||
}MV_CODEREADER_DEVICE_CONNECT_STATUS;
|
||||
|
||||
//明场/暗场矫正模式
|
||||
typedef enum _MV_CODEREADER_FIELD_CORRECT_MODE_
|
||||
{
|
||||
MV_CODEREADER_DARK_FILED_CORRECT = 0, // 暗场校验
|
||||
MV_CODEREADER_BRIGHT_FILED_CORRECT = 1, // 明场校验
|
||||
MV_CODEREADER_INVAILED_FILED_CORRECT = 2, // 无效校验
|
||||
|
||||
}MV_CODEREADER_FIELD_CORRECT_MODE;
|
||||
|
||||
#endif /* _MV_CODEREADER_PARAMS_H_ */
|
||||
139
3rdparty/hikvision/code_reader/inc/MvCodeReaderPixelType.h
vendored
Normal file
139
3rdparty/hikvision/code_reader/inc/MvCodeReaderPixelType.h
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
|
||||
#ifndef _MV_CODEREADER_PIXEL_TYPE_H_
|
||||
#define _MV_CODEREADER_PIXEL_TYPE_H_
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* GigE Vision (2.0.03) PIXEL FORMATS */
|
||||
/************************************************************************/
|
||||
|
||||
// Indicate if pixel is monochrome or RGB
|
||||
#define MV_CODEREADER_GVSP_PIX_MONO 0x01000000
|
||||
#define MV_CODEREADER_GVSP_PIX_RGB 0x02000000 // deprecated in version 1.1
|
||||
#define MV_CODEREADER_GVSP_PIX_COLOR 0x02000000
|
||||
#define MV_CODEREADER_GVSP_PIX_CUSTOM 0x80000000
|
||||
#define MV_CODEREADER_GVSP_PIX_COLOR_MASK 0xFF000000
|
||||
|
||||
// Indicate effective number of bits occupied by the pixel (including padding).
|
||||
// This can be used to compute amount of memory required to store an image.
|
||||
#define MV_CODEREADER_PIXEL_BIT_COUNT(n) ((n) << 16)
|
||||
|
||||
#define MV_CODEREADER_GVSP_PIX_EFFECTIVE_PIXEL_SIZE_MASK 0x00FF0000
|
||||
#define MV_CODEREADER_GVSP_PIX_EFFECTIVE_PIXEL_SIZE_SHIFT 16
|
||||
|
||||
// Pixel ID: lower 16-bit of the pixel formats
|
||||
#define MV_CODEREADER_GVSP_PIX_ID_MASK 0x0000FFFF
|
||||
#define MV_CODEREADER_GVSP_PIX_COUNT 0x46 // next Pixel ID available
|
||||
|
||||
|
||||
enum MvCodeReaderGvspPixelType
|
||||
{
|
||||
// Undefined pixel type
|
||||
#ifdef WIN32
|
||||
PixelType_CodeReader_Gvsp_Undefined = 0xFFFFFFFF,
|
||||
#else
|
||||
PixelType_CodeReader_Gvsp_Undefined = -1,
|
||||
#endif
|
||||
|
||||
// Mono buffer format defines
|
||||
PixelType_CodeReader_Gvsp_Mono1p = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(1) | 0x0037),
|
||||
PixelType_CodeReader_Gvsp_Mono2p = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(2) | 0x0038),
|
||||
PixelType_CodeReader_Gvsp_Mono4p = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(4) | 0x0039),
|
||||
PixelType_CodeReader_Gvsp_Mono8 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(8) | 0x0001),
|
||||
PixelType_CodeReader_Gvsp_Mono8_Signed = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(8) | 0x0002),
|
||||
PixelType_CodeReader_Gvsp_Mono10 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0003),
|
||||
PixelType_CodeReader_Gvsp_Mono10_Packed = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x0004),
|
||||
PixelType_CodeReader_Gvsp_Mono12 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0005),
|
||||
PixelType_CodeReader_Gvsp_Mono12_Packed = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x0006),
|
||||
PixelType_CodeReader_Gvsp_Mono14 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0025),
|
||||
PixelType_CodeReader_Gvsp_Mono16 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0007),
|
||||
|
||||
// Bayer buffer format defines
|
||||
PixelType_CodeReader_Gvsp_BayerGR8 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(8) | 0x0008),
|
||||
PixelType_CodeReader_Gvsp_BayerRG8 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(8) | 0x0009),
|
||||
PixelType_CodeReader_Gvsp_BayerGB8 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(8) | 0x000A),
|
||||
PixelType_CodeReader_Gvsp_BayerBG8 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(8) | 0x000B),
|
||||
PixelType_CodeReader_Gvsp_BayerGR10 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x000C),
|
||||
PixelType_CodeReader_Gvsp_BayerRG10 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x000D),
|
||||
PixelType_CodeReader_Gvsp_BayerGB10 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x000E),
|
||||
PixelType_CodeReader_Gvsp_BayerBG10 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x000F),
|
||||
PixelType_CodeReader_Gvsp_BayerGR12 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0010),
|
||||
PixelType_CodeReader_Gvsp_BayerRG12 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0011),
|
||||
PixelType_CodeReader_Gvsp_BayerGB12 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0012),
|
||||
PixelType_CodeReader_Gvsp_BayerBG12 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0013),
|
||||
PixelType_CodeReader_Gvsp_BayerGR10_Packed = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x0026),
|
||||
PixelType_CodeReader_Gvsp_BayerRG10_Packed = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x0027),
|
||||
PixelType_CodeReader_Gvsp_BayerGB10_Packed = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x0028),
|
||||
PixelType_CodeReader_Gvsp_BayerBG10_Packed = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x0029),
|
||||
PixelType_CodeReader_Gvsp_BayerGR12_Packed = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x002A),
|
||||
PixelType_CodeReader_Gvsp_BayerRG12_Packed = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x002B),
|
||||
PixelType_CodeReader_Gvsp_BayerGB12_Packed = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x002C),
|
||||
PixelType_CodeReader_Gvsp_BayerBG12_Packed = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x002D),
|
||||
PixelType_CodeReader_Gvsp_BayerGR16 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x002E),
|
||||
PixelType_CodeReader_Gvsp_BayerRG16 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x002F),
|
||||
PixelType_CodeReader_Gvsp_BayerGB16 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0030),
|
||||
PixelType_CodeReader_Gvsp_BayerBG16 = (MV_CODEREADER_GVSP_PIX_MONO | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0031),
|
||||
|
||||
// RGB Packed buffer format defines
|
||||
PixelType_CodeReader_Gvsp_RGB8_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(24) | 0x0014),
|
||||
PixelType_CodeReader_Gvsp_BGR8_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(24) | 0x0015),
|
||||
PixelType_CodeReader_Gvsp_RGBA8_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(32) | 0x0016),
|
||||
PixelType_CodeReader_Gvsp_BGRA8_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(32) | 0x0017),
|
||||
PixelType_CodeReader_Gvsp_RGB10_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(48) | 0x0018),
|
||||
PixelType_CodeReader_Gvsp_BGR10_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(48) | 0x0019),
|
||||
PixelType_CodeReader_Gvsp_RGB12_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(48) | 0x001A),
|
||||
PixelType_CodeReader_Gvsp_BGR12_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(48) | 0x001B),
|
||||
PixelType_CodeReader_Gvsp_RGB16_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(48) | 0x0033),
|
||||
PixelType_CodeReader_Gvsp_RGB10V1_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(32) | 0x001C),
|
||||
PixelType_CodeReader_Gvsp_RGB10V2_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(32) | 0x001D),
|
||||
PixelType_CodeReader_Gvsp_RGB12V1_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(36) | 0X0034),
|
||||
PixelType_CodeReader_Gvsp_RGB565_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0035),
|
||||
PixelType_CodeReader_Gvsp_BGR565_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0X0036),
|
||||
|
||||
// YUV Packed buffer format defines
|
||||
PixelType_CodeReader_Gvsp_YUV411_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x001E),
|
||||
PixelType_CodeReader_Gvsp_YUV422_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x001F),
|
||||
PixelType_CodeReader_Gvsp_YUV422_YUYV_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0032),
|
||||
PixelType_CodeReader_Gvsp_YUV444_Packed = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(24) | 0x0020),
|
||||
PixelType_CodeReader_Gvsp_YCBCR8_CBYCR = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(24) | 0x003A),
|
||||
PixelType_CodeReader_Gvsp_YCBCR422_8 = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x003B),
|
||||
PixelType_CodeReader_Gvsp_YCBCR422_8_CBYCRY = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0043),
|
||||
PixelType_CodeReader_Gvsp_YCBCR411_8_CBYYCRYY = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x003C),
|
||||
PixelType_CodeReader_Gvsp_YCBCR601_8_CBYCR = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(24) | 0x003D),
|
||||
PixelType_CodeReader_Gvsp_YCBCR601_422_8 = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x003E),
|
||||
PixelType_CodeReader_Gvsp_YCBCR601_422_8_CBYCRY = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0044),
|
||||
PixelType_CodeReader_Gvsp_YCBCR601_411_8_CBYYCRYY = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x003F),
|
||||
PixelType_CodeReader_Gvsp_YCBCR709_8_CBYCR = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(24) | 0x0040),
|
||||
PixelType_CodeReader_Gvsp_YCBCR709_422_8 = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0041),
|
||||
PixelType_CodeReader_Gvsp_YCBCR709_422_8_CBYCRY = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(16) | 0x0045),
|
||||
PixelType_CodeReader_Gvsp_YCBCR709_411_8_CBYYCRYY = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(12) | 0x0042),
|
||||
|
||||
// RGB Planar buffer format defines
|
||||
PixelType_CodeReader_Gvsp_RGB8_Planar = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(24) | 0x0021),
|
||||
PixelType_CodeReader_Gvsp_RGB10_Planar = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(48) | 0x0022),
|
||||
PixelType_CodeReader_Gvsp_RGB12_Planar = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(48) | 0x0023),
|
||||
PixelType_CodeReader_Gvsp_RGB16_Planar = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(48) | 0x0024),
|
||||
|
||||
// 自定义的图片格式
|
||||
PixelType_CodeReader_Gvsp_Jpeg = (MV_CODEREADER_GVSP_PIX_CUSTOM | MV_CODEREADER_PIXEL_BIT_COUNT(24) | 0x0001),
|
||||
|
||||
PixelType_CodeReader_Gvsp_Coord3D_ABC32f = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(96) | 0x00C0),
|
||||
PixelType_CodeReader_Gvsp_Coord3D_ABC32f_Planar = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(96) | 0x00C1),
|
||||
|
||||
|
||||
PixelType_CodeReader_Gvsp_Coord3D_AC32f = (MV_CODEREADER_GVSP_PIX_COLOR | MV_CODEREADER_PIXEL_BIT_COUNT(40) | 0x00C2),//0x024000C2, /* 3D coordinate A-C 32-bit floating point */
|
||||
PixelType_CodeReader_Gvsp_COORD3D_DEPTH_PLUS_MASK = (0x82000000 | MV_CODEREADER_PIXEL_BIT_COUNT(28) | 0x0001),//0x82280001
|
||||
};
|
||||
|
||||
//跨平台定义
|
||||
//Cross Platform Definition
|
||||
#ifdef WIN32
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _MV_CODEREADER_PIXEL_TYPE_H_ */
|
||||
1545
3rdparty/hikvision/code_reader/inc/turbojpeg.h
vendored
Normal file
1545
3rdparty/hikvision/code_reader/inc/turbojpeg.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
3rdparty/hikvision/code_reader/lib/MvCodeReaderCtrl.lib
vendored
Normal file
BIN
3rdparty/hikvision/code_reader/lib/MvCodeReaderCtrl.lib
vendored
Normal file
Binary file not shown.
BIN
3rdparty/hikvision/code_reader/lib/turbojpeg.lib
vendored
Normal file
BIN
3rdparty/hikvision/code_reader/lib/turbojpeg.lib
vendored
Normal file
Binary file not shown.
5909
3rdparty/hikvision/rgbd_camera/inc/GLFW/glfw3.h
vendored
Normal file
5909
3rdparty/hikvision/rgbd_camera/inc/GLFW/glfw3.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
594
3rdparty/hikvision/rgbd_camera/inc/GLFW/glfw3native.h
vendored
Normal file
594
3rdparty/hikvision/rgbd_camera/inc/GLFW/glfw3native.h
vendored
Normal file
@@ -0,0 +1,594 @@
|
||||
/*************************************************************************
|
||||
* GLFW 3.3 - www.glfw.org
|
||||
* A library for OpenGL, window and input
|
||||
*------------------------------------------------------------------------
|
||||
* Copyright (c) 2002-2006 Marcus Geelnard
|
||||
* Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would
|
||||
* be appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and must not
|
||||
* be misrepresented as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
#ifndef _glfw3_native_h_
|
||||
#define _glfw3_native_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* Doxygen documentation
|
||||
*************************************************************************/
|
||||
|
||||
/*! @file glfw3native.h
|
||||
* @brief The header of the native access functions.
|
||||
*
|
||||
* This is the header file of the native access functions. See @ref native for
|
||||
* more information.
|
||||
*/
|
||||
/*! @defgroup native Native access
|
||||
* @brief Functions related to accessing native handles.
|
||||
*
|
||||
* **By using the native access functions you assert that you know what you're
|
||||
* doing and how to fix problems caused by using them. If you don't, you
|
||||
* shouldn't be using them.**
|
||||
*
|
||||
* Before the inclusion of @ref glfw3native.h, you may define zero or more
|
||||
* window system API macro and zero or more context creation API macros.
|
||||
*
|
||||
* The chosen backends must match those the library was compiled for. Failure
|
||||
* to do this will cause a link-time error.
|
||||
*
|
||||
* The available window API macros are:
|
||||
* * `GLFW_EXPOSE_NATIVE_WIN32`
|
||||
* * `GLFW_EXPOSE_NATIVE_COCOA`
|
||||
* * `GLFW_EXPOSE_NATIVE_X11`
|
||||
* * `GLFW_EXPOSE_NATIVE_WAYLAND`
|
||||
*
|
||||
* The available context API macros are:
|
||||
* * `GLFW_EXPOSE_NATIVE_WGL`
|
||||
* * `GLFW_EXPOSE_NATIVE_NSGL`
|
||||
* * `GLFW_EXPOSE_NATIVE_GLX`
|
||||
* * `GLFW_EXPOSE_NATIVE_EGL`
|
||||
* * `GLFW_EXPOSE_NATIVE_OSMESA`
|
||||
*
|
||||
* These macros select which of the native access functions that are declared
|
||||
* and which platform-specific headers to include. It is then up your (by
|
||||
* definition platform-specific) code to handle which of these should be
|
||||
* defined.
|
||||
*/
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* System headers and types
|
||||
*************************************************************************/
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)
|
||||
// This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
|
||||
// example to allow applications to correctly declare a GL_KHR_debug callback)
|
||||
// but windows.h assumes no one will define APIENTRY before it does
|
||||
#if defined(GLFW_APIENTRY_DEFINED)
|
||||
#undef APIENTRY
|
||||
#undef GLFW_APIENTRY_DEFINED
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)
|
||||
#if defined(__OBJC__)
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#else
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
typedef void* id;
|
||||
#endif
|
||||
#elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
|
||||
#include <wayland-client.h>
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WGL)
|
||||
/* WGL is declared by windows.h */
|
||||
#endif
|
||||
#if defined(GLFW_EXPOSE_NATIVE_NSGL)
|
||||
/* NSGL is declared by Cocoa.h */
|
||||
#endif
|
||||
#if defined(GLFW_EXPOSE_NATIVE_GLX)
|
||||
#include <GL/glx.h>
|
||||
#endif
|
||||
#if defined(GLFW_EXPOSE_NATIVE_EGL)
|
||||
#include <EGL/egl.h>
|
||||
#endif
|
||||
#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
|
||||
#include <GL/osmesa.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* Functions
|
||||
*************************************************************************/
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WIN32)
|
||||
/*! @brief Returns the adapter device name of the specified monitor.
|
||||
*
|
||||
* @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`)
|
||||
* of the specified monitor, or `NULL` if an [error](@ref error_handling)
|
||||
* occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.1.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the display device name of the specified monitor.
|
||||
*
|
||||
* @return The UTF-8 encoded display device name (for example
|
||||
* `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.1.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `HWND` of the specified window.
|
||||
*
|
||||
* @return The `HWND` of the specified window, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @remark The `HDC` associated with the window can be queried with the
|
||||
* [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
|
||||
* function.
|
||||
* @code
|
||||
* HDC dc = GetDC(glfwGetWin32Window(window));
|
||||
* @endcode
|
||||
* This DC is private and does not need to be released.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WGL)
|
||||
/*! @brief Returns the `HGLRC` of the specified window.
|
||||
*
|
||||
* @return The `HGLRC` of the specified window, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
|
||||
* GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @remark The `HDC` associated with the window can be queried with the
|
||||
* [GetDC](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc)
|
||||
* function.
|
||||
* @code
|
||||
* HDC dc = GetDC(glfwGetWin32Window(window));
|
||||
* @endcode
|
||||
* This DC is private and does not need to be released.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_COCOA)
|
||||
/*! @brief Returns the `CGDirectDisplayID` of the specified monitor.
|
||||
*
|
||||
* @return The `CGDirectDisplayID` of the specified monitor, or
|
||||
* `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.1.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `NSWindow` of the specified window.
|
||||
*
|
||||
* @return The `NSWindow` of the specified window, or `nil` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_NSGL)
|
||||
/*! @brief Returns the `NSOpenGLContext` of the specified window.
|
||||
*
|
||||
* @return The `NSOpenGLContext` of the specified window, or `nil` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
|
||||
* GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_X11)
|
||||
/*! @brief Returns the `Display` used by GLFW.
|
||||
*
|
||||
* @return The `Display` used by GLFW, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI Display* glfwGetX11Display(void);
|
||||
|
||||
/*! @brief Returns the `RRCrtc` of the specified monitor.
|
||||
*
|
||||
* @return The `RRCrtc` of the specified monitor, or `None` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.1.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `RROutput` of the specified monitor.
|
||||
*
|
||||
* @return The `RROutput` of the specified monitor, or `None` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.1.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the `Window` of the specified window.
|
||||
*
|
||||
* @return The `Window` of the specified window, or `None` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
|
||||
|
||||
/*! @brief Sets the current primary selection to the specified string.
|
||||
*
|
||||
* @param[in] string A UTF-8 encoded string.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @pointer_lifetime The specified string is copied before this function
|
||||
* returns.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref clipboard
|
||||
* @sa glfwGetX11SelectionString
|
||||
* @sa glfwSetClipboardString
|
||||
*
|
||||
* @since Added in version 3.3.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI void glfwSetX11SelectionString(const char* string);
|
||||
|
||||
/*! @brief Returns the contents of the current primary selection as a string.
|
||||
*
|
||||
* If the selection is empty or if its contents cannot be converted, `NULL`
|
||||
* is returned and a @ref GLFW_FORMAT_UNAVAILABLE error is generated.
|
||||
*
|
||||
* @return The contents of the selection as a UTF-8 encoded string, or `NULL`
|
||||
* if an [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @pointer_lifetime The returned string is allocated and freed by GLFW. You
|
||||
* should not free it yourself. It is valid until the next call to @ref
|
||||
* glfwGetX11SelectionString or @ref glfwSetX11SelectionString, or until the
|
||||
* library is terminated.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref clipboard
|
||||
* @sa glfwSetX11SelectionString
|
||||
* @sa glfwGetClipboardString
|
||||
*
|
||||
* @since Added in version 3.3.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI const char* glfwGetX11SelectionString(void);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_GLX)
|
||||
/*! @brief Returns the `GLXContext` of the specified window.
|
||||
*
|
||||
* @return The `GLXContext` of the specified window, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
|
||||
* GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
|
||||
|
||||
/*! @brief Returns the `GLXWindow` of the specified window.
|
||||
*
|
||||
* @return The `GLXWindow` of the specified window, or `None` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
|
||||
* GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.2.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
|
||||
/*! @brief Returns the `struct wl_display*` used by GLFW.
|
||||
*
|
||||
* @return The `struct wl_display*` used by GLFW, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.2.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
|
||||
|
||||
/*! @brief Returns the `struct wl_output*` of the specified monitor.
|
||||
*
|
||||
* @return The `struct wl_output*` of the specified monitor, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.2.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
|
||||
|
||||
/*! @brief Returns the main `struct wl_surface*` of the specified window.
|
||||
*
|
||||
* @return The main `struct wl_surface*` of the specified window, or `NULL` if
|
||||
* an [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.2.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_EGL)
|
||||
/*! @brief Returns the `EGLDisplay` used by GLFW.
|
||||
*
|
||||
* @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
|
||||
|
||||
/*! @brief Returns the `EGLContext` of the specified window.
|
||||
*
|
||||
* @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
|
||||
* GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
|
||||
|
||||
/*! @brief Returns the `EGLSurface` of the specified window.
|
||||
*
|
||||
* @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
|
||||
* GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#if defined(GLFW_EXPOSE_NATIVE_OSMESA)
|
||||
/*! @brief Retrieves the color buffer associated with the specified window.
|
||||
*
|
||||
* @param[in] window The window whose color buffer to retrieve.
|
||||
* @param[out] width Where to store the width of the color buffer, or `NULL`.
|
||||
* @param[out] height Where to store the height of the color buffer, or `NULL`.
|
||||
* @param[out] format Where to store the OSMesa pixel format of the color
|
||||
* buffer, or `NULL`.
|
||||
* @param[out] buffer Where to store the address of the color buffer, or
|
||||
* `NULL`.
|
||||
* @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
|
||||
* GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.3.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI int glfwGetOSMesaColorBuffer(GLFWwindow* window, int* width, int* height, int* format, void** buffer);
|
||||
|
||||
/*! @brief Retrieves the depth buffer associated with the specified window.
|
||||
*
|
||||
* @param[in] window The window whose depth buffer to retrieve.
|
||||
* @param[out] width Where to store the width of the depth buffer, or `NULL`.
|
||||
* @param[out] height Where to store the height of the depth buffer, or `NULL`.
|
||||
* @param[out] bytesPerValue Where to store the number of bytes per depth
|
||||
* buffer element, or `NULL`.
|
||||
* @param[out] buffer Where to store the address of the depth buffer, or
|
||||
* `NULL`.
|
||||
* @return `GLFW_TRUE` if successful, or `GLFW_FALSE` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
|
||||
* GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.3.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI int glfwGetOSMesaDepthBuffer(GLFWwindow* window, int* width, int* height, int* bytesPerValue, void** buffer);
|
||||
|
||||
/*! @brief Returns the `OSMesaContext` of the specified window.
|
||||
*
|
||||
* @return The `OSMesaContext` of the specified window, or `NULL` if an
|
||||
* [error](@ref error_handling) occurred.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NO_WINDOW_CONTEXT and @ref
|
||||
* GLFW_NOT_INITIALIZED.
|
||||
*
|
||||
* @thread_safety This function may be called from any thread. Access is not
|
||||
* synchronized.
|
||||
*
|
||||
* @since Added in version 3.3.
|
||||
*
|
||||
* @ingroup native
|
||||
*/
|
||||
GLFWAPI OSMesaContext glfwGetOSMesaContext(GLFWwindow* window);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _glfw3_native_h_ */
|
||||
|
||||
311
3rdparty/hikvision/rgbd_camera/inc/KHR/khrplatform.h
vendored
Normal file
311
3rdparty/hikvision/rgbd_camera/inc/KHR/khrplatform.h
vendored
Normal file
@@ -0,0 +1,311 @@
|
||||
#ifndef __khrplatform_h_
|
||||
#define __khrplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright (c) 2008-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
/* Khronos platform-specific types and definitions.
|
||||
*
|
||||
* The master copy of khrplatform.h is maintained in the Khronos EGL
|
||||
* Registry repository at https://github.com/KhronosGroup/EGL-Registry
|
||||
* The last semantic modification to khrplatform.h was at commit ID:
|
||||
* 67a3e0864c2d75ea5287b9f3d2eb74a745936692
|
||||
*
|
||||
* Adopters may modify this file to suit their platform. Adopters are
|
||||
* encouraged to submit platform specific modifications to the Khronos
|
||||
* group so that they can be included in future versions of this file.
|
||||
* Please submit changes by filing pull requests or issues on
|
||||
* the EGL Registry repository linked above.
|
||||
*
|
||||
*
|
||||
* See the Implementer's Guidelines for information about where this file
|
||||
* should be located on your system and for more details of its use:
|
||||
* http://www.khronos.org/registry/implementers_guide.pdf
|
||||
*
|
||||
* This file should be included as
|
||||
* #include <KHR/khrplatform.h>
|
||||
* by Khronos client API header files that use its types and defines.
|
||||
*
|
||||
* The types in khrplatform.h should only be used to define API-specific types.
|
||||
*
|
||||
* Types defined in khrplatform.h:
|
||||
* khronos_int8_t signed 8 bit
|
||||
* khronos_uint8_t unsigned 8 bit
|
||||
* khronos_int16_t signed 16 bit
|
||||
* khronos_uint16_t unsigned 16 bit
|
||||
* khronos_int32_t signed 32 bit
|
||||
* khronos_uint32_t unsigned 32 bit
|
||||
* khronos_int64_t signed 64 bit
|
||||
* khronos_uint64_t unsigned 64 bit
|
||||
* khronos_intptr_t signed same number of bits as a pointer
|
||||
* khronos_uintptr_t unsigned same number of bits as a pointer
|
||||
* khronos_ssize_t signed size
|
||||
* khronos_usize_t unsigned size
|
||||
* khronos_float_t signed 32 bit floating point
|
||||
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
|
||||
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
|
||||
* nanoseconds
|
||||
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
|
||||
* khronos_boolean_enum_t enumerated boolean type. This should
|
||||
* only be used as a base type when a client API's boolean type is
|
||||
* an enum. Client APIs which use an integer or other type for
|
||||
* booleans cannot use this as the base type for their boolean.
|
||||
*
|
||||
* Tokens defined in khrplatform.h:
|
||||
*
|
||||
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
|
||||
*
|
||||
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
|
||||
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
|
||||
*
|
||||
* Calling convention macros defined in this file:
|
||||
* KHRONOS_APICALL
|
||||
* KHRONOS_APIENTRY
|
||||
* KHRONOS_APIATTRIBUTES
|
||||
*
|
||||
* These may be used in function prototypes as:
|
||||
*
|
||||
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
|
||||
* int arg1,
|
||||
* int arg2) KHRONOS_APIATTRIBUTES;
|
||||
*/
|
||||
|
||||
#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
|
||||
# define KHRONOS_STATIC 1
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APICALL
|
||||
*-------------------------------------------------------------------------
|
||||
* This precedes the return type of the function in the function prototype.
|
||||
*/
|
||||
#if defined(KHRONOS_STATIC)
|
||||
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
|
||||
* header compatible with static linking. */
|
||||
# define KHRONOS_APICALL
|
||||
#elif defined(_WIN32)
|
||||
# define KHRONOS_APICALL __declspec(dllimport)
|
||||
#elif defined (__SYMBIAN32__)
|
||||
# define KHRONOS_APICALL IMPORT_C
|
||||
#elif defined(__ANDROID__)
|
||||
# define KHRONOS_APICALL __attribute__((visibility("default")))
|
||||
#else
|
||||
# define KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIENTRY
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the return type of the function and precedes the function
|
||||
* name in the function prototype.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
|
||||
/* Win32 but not WinCE */
|
||||
# define KHRONOS_APIENTRY __stdcall
|
||||
#else
|
||||
# define KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIATTRIBUTES
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the closing parenthesis of the function prototype arguments.
|
||||
*/
|
||||
#if defined (__ARMCC_2__)
|
||||
#define KHRONOS_APIATTRIBUTES __softfp
|
||||
#else
|
||||
#define KHRONOS_APIATTRIBUTES
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* basic type definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
|
||||
|
||||
|
||||
/*
|
||||
* Using <stdint.h>
|
||||
*/
|
||||
#include <stdint.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
/*
|
||||
* To support platform where unsigned long cannot be used interchangeably with
|
||||
* inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
|
||||
* Ideally, we could just use (u)intptr_t everywhere, but this could result in
|
||||
* ABI breakage if khronos_uintptr_t is changed from unsigned long to
|
||||
* unsigned long long or similar (this results in different C++ name mangling).
|
||||
* To avoid changes for existing platforms, we restrict usage of intptr_t to
|
||||
* platforms where the size of a pointer is larger than the size of long.
|
||||
*/
|
||||
#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
|
||||
#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
|
||||
#define KHRONOS_USE_INTPTR_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#elif defined(__VMS ) || defined(__sgi)
|
||||
|
||||
/*
|
||||
* Using <inttypes.h>
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
|
||||
/*
|
||||
* Win32
|
||||
*/
|
||||
typedef __int32 khronos_int32_t;
|
||||
typedef unsigned __int32 khronos_uint32_t;
|
||||
typedef __int64 khronos_int64_t;
|
||||
typedef unsigned __int64 khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
|
||||
/*
|
||||
* Sun or Digital
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#if defined(__arch64__) || defined(_LP64)
|
||||
typedef long int khronos_int64_t;
|
||||
typedef unsigned long int khronos_uint64_t;
|
||||
#else
|
||||
typedef long long int khronos_int64_t;
|
||||
typedef unsigned long long int khronos_uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif 0
|
||||
|
||||
/*
|
||||
* Hypothetical platform with no float or int64 support
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#define KHRONOS_SUPPORT_INT64 0
|
||||
#define KHRONOS_SUPPORT_FLOAT 0
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* Generic fallback
|
||||
*/
|
||||
#include <stdint.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Types that are (so far) the same on all platforms
|
||||
*/
|
||||
typedef signed char khronos_int8_t;
|
||||
typedef unsigned char khronos_uint8_t;
|
||||
typedef signed short int khronos_int16_t;
|
||||
typedef unsigned short int khronos_uint16_t;
|
||||
|
||||
/*
|
||||
* Types that differ between LLP64 and LP64 architectures - in LLP64,
|
||||
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
|
||||
* to be the only LLP64 architecture in current use.
|
||||
*/
|
||||
#ifdef KHRONOS_USE_INTPTR_T
|
||||
typedef intptr_t khronos_intptr_t;
|
||||
typedef uintptr_t khronos_uintptr_t;
|
||||
#elif defined(_WIN64)
|
||||
typedef signed long long int khronos_intptr_t;
|
||||
typedef unsigned long long int khronos_uintptr_t;
|
||||
#else
|
||||
typedef signed long int khronos_intptr_t;
|
||||
typedef unsigned long int khronos_uintptr_t;
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64)
|
||||
typedef signed long long int khronos_ssize_t;
|
||||
typedef unsigned long long int khronos_usize_t;
|
||||
#else
|
||||
typedef signed long int khronos_ssize_t;
|
||||
typedef unsigned long int khronos_usize_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_FLOAT
|
||||
/*
|
||||
* Float type
|
||||
*/
|
||||
typedef float khronos_float_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64
|
||||
/* Time types
|
||||
*
|
||||
* These types can be used to represent a time interval in nanoseconds or
|
||||
* an absolute Unadjusted System Time. Unadjusted System Time is the number
|
||||
* of nanoseconds since some arbitrary system event (e.g. since the last
|
||||
* time the system booted). The Unadjusted System Time is an unsigned
|
||||
* 64 bit value that wraps back to 0 every 584 years. Time intervals
|
||||
* may be either signed or unsigned.
|
||||
*/
|
||||
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
|
||||
typedef khronos_int64_t khronos_stime_nanoseconds_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Dummy value used to pad enum types to 32 bits.
|
||||
*/
|
||||
#ifndef KHRONOS_MAX_ENUM
|
||||
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Enumerated boolean type
|
||||
*
|
||||
* Values other than zero should be considered to be true. Therefore
|
||||
* comparisons should not be made against KHRONOS_TRUE.
|
||||
*/
|
||||
typedef enum {
|
||||
KHRONOS_FALSE = 0,
|
||||
KHRONOS_TRUE = 1,
|
||||
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
|
||||
} khronos_boolean_enum_t;
|
||||
|
||||
#endif /* __khrplatform_h_ */
|
||||
489
3rdparty/hikvision/rgbd_camera/inc/Mv3dRgbdApi.h
vendored
Normal file
489
3rdparty/hikvision/rgbd_camera/inc/Mv3dRgbdApi.h
vendored
Normal file
@@ -0,0 +1,489 @@
|
||||
#ifndef _MV3D_RGBD_API_H_
|
||||
#define _MV3D_RGBD_API_H_
|
||||
|
||||
#include "Mv3dRgbdDefine.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*************************************************************************
|
||||
* @~chinese
|
||||
* @brief 获取SDK版本号
|
||||
* @param pstVersion [OUT] 版本信息
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief Get SDK Version
|
||||
* @param pstVersion [OUT] version info
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetSDKVersion(MV3D_RGBD_VERSION_INFO* pstVersion);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief SDK运行环境初始化
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief SDK run environment initialization
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_Initialize();
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief SDK运行环境释放
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief SDK run environment release
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_Release();
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 获取当前环境中设备数量
|
||||
* @param nDeviceType [IN] 设备类型,见Mv3dRgbdDeviceType,可全部获取(DeviceType_Ethernet | DeviceType_USB | DeviceType_Ethernet_Vir | DeviceType_USB_Vir)
|
||||
* @param pDeviceNumber [OUT] 设备数量
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief gets the number of devices in the current environment
|
||||
* @param nDeviceType [IN] device type,refer to Mv3dRgbdDeviceType,get all(DeviceType_Ethernet | DeviceType_USB | DeviceType_Ethernet_Vir | DeviceType_USB_Vir)
|
||||
* @param pDeviceNumber [OUT] device number
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetDeviceNumber(uint32_t nDeviceType, uint32_t* pDeviceNumber);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 获取设备列表
|
||||
* @param nDeviceType [IN] 设备类型,见Mv3dRgbdDeviceType,可全部获取(DeviceType_Ethernet | DeviceType_USB | DeviceType_Ethernet_Vir | DeviceType_USB_Vir)
|
||||
* @param pstDeviceInfos [IN OUT] 设备列表
|
||||
* @param nMaxDeviceCount [IN] 设备列表缓存最大个数
|
||||
* @param pDeviceCount [OUT] 填充列表中设备个数
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief gets 3D cameras list
|
||||
* @param nDeviceType [IN] device type,refer to Mv3dRgbdDeviceType,get all(DeviceType_Ethernet | DeviceType_USB | DeviceType_Ethernet_Vir | DeviceType_USB_Vir)
|
||||
* @param pstDeviceInfos [IN OUT] devices list
|
||||
* @param nMaxDeviceCount [IN] max number of device list caches
|
||||
* @param pDeviceCount [OUT] number of devices in the fill list
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetDeviceList(uint32_t nDeviceType, MV3D_RGBD_DEVICE_INFO* pstDeviceInfos, uint32_t nMaxDeviceCount, uint32_t* pDeviceCount);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 打开设备
|
||||
* @param handle [IN OUT] 相机句柄
|
||||
* @param pstDeviceInfo [IN] 枚举的设备信息,默认为空,打开第一个相机
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
* @remark 设置工作模式为深度图模式,图片模式为深度图,并打开RGB Chunk
|
||||
|
||||
* @~english
|
||||
* @brief open device
|
||||
* @param handle [IN OUT] camera handle
|
||||
* @param pstDeviceInfo [IN] enum camera info. the default is null, open first camera
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
* @remark Set working mode to depth, image mode to depth, and open RGB Chunk
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_OpenDevice(HANDLE *handle, MV3D_RGBD_DEVICE_INFO* pstDeviceInfo = NULL);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 通过设备自定义名称打开设备
|
||||
* @param handle [IN OUT] 相机句柄
|
||||
* @param chDeviceName [IN] 设备用户自定义名称
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
* @remark 设置工作模式为深度图模式,图片模式为深度图,并打开RGB Chunk
|
||||
|
||||
* @~english
|
||||
* @brief open device by device user defined name
|
||||
* @param handle [IN OUT] camera handle
|
||||
* @param chDeviceName [IN] device user defined name
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
* @remark Set working mode to depth, image mode to depth, and open RGB Chunk
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_OpenDeviceByName(HANDLE *handle, const char* chDeviceName);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 通过序列号打开设备
|
||||
* @param handle [IN OUT] 相机句柄
|
||||
* @param chSerialNumber [IN] 序列号
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
* @remark 设置工作模式为深度图模式,图片模式为深度图,并打开RGB Chunk
|
||||
|
||||
* @~english
|
||||
* @brief open device by serial number
|
||||
* @param handle [IN OUT] camera handle
|
||||
* @param chSerialNumber [IN] serial number
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
* @remark Set working mode to depth, image mode to depth, and open RGB Chunk
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_OpenDeviceBySerialNumber(HANDLE *handle, const char* chSerialNumber);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 通过IP打开设备,仅网口设备有效
|
||||
* @param handle [IN OUT] 相机句柄
|
||||
* @param chIP [IN] IP地址
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
* @remark 设置工作模式为深度图模式,图片模式为深度图,并打开RGB Chunk
|
||||
|
||||
* @~english
|
||||
* @brief open device by ip,only network device is valid
|
||||
* @param handle [IN OUT] camera handle
|
||||
* @param chIP [IN] IP
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
* @remark Set working mode to depth, image mode to depth, and open RGB Chunk
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_OpenDeviceByIp(HANDLE *handle, const char* chIP);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 关闭设备
|
||||
* @param handle [IN] 相机句柄
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief close Device
|
||||
* @param handle [IN] camera handle
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_CloseDevice(HANDLE *handle);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 获取当前设备的详细信息
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pstDevInfo [IN][OUT] 返回给调用者有关相机设备信息结构体指针
|
||||
* @return 成功,MV3D_RGBD_OK,失败,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief get current device information
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstDevInfo [IN][OUT] structure pointer of device information
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetDeviceInfo(HANDLE handle, MV3D_RGBD_DEVICE_INFO* pstDevInfo);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 配置IP,仅网口设备有效
|
||||
* @param chSerialNumber [IN] 序列号
|
||||
* @param pstIPConfig [IN] IP配置,静态IP,DHCP等
|
||||
* @return 成功,MV3D_RGBD_OK,失败,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief ip configuration,only network device is valid
|
||||
* @param chSerialNumber [IN] serial number
|
||||
* @param pstIPConfig [IN] IP Config, Static IP,DHCP
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SetIpConfig(const char* chSerialNumber, MV3D_RGBD_IP_CONFIG* pstIPConfig);
|
||||
|
||||
/***********************************************************************
|
||||
* @~chinese
|
||||
* @brief 注册图像数据回调
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param cbOutput [IN] 回调函数指针
|
||||
* @param pUser [IN] 用户自定义变量
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
* @remark 当传入的用户自定义变量为NULL时,取消回调注册
|
||||
|
||||
* @~english
|
||||
* @brief register image data callback
|
||||
* @param handle [IN] camera handle
|
||||
* @param cbOutput [IN] callback function pointer
|
||||
* @param pUser [IN] user defined variable
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
* @remark Cancel callback registration when pUser is NULL
|
||||
***********************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_RegisterFrameCallBack(HANDLE handle, MV3D_RGBD_FrameDataCallBack cbOutput, void* pUser);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 注册异常消息回调
|
||||
* @param handle: [IN] 相机句柄
|
||||
* @param cbException [IN] 异常回调函数指针
|
||||
* @param pUser [IN] 用户自定义变量
|
||||
* @return 见返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief register exception message callBack
|
||||
* @param handle: [IN] camera handle
|
||||
* @param cbException [IN] exception message callback function pointer
|
||||
* @param pUser [IN] user defined variable
|
||||
* @return Refer to error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_RegisterExceptionCallBack(HANDLE handle, MV3D_RGBD_ExceptionCallBack cbException, void* pUser);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 开始取流前获取数据流配置列表
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pstStreamCfgList [IN][OUT] 返回给调用者数据流配置列表指针
|
||||
* @return 成功,MV3D_RGBD_OK,失败,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief get stream cfg list before start working
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstStreamCfgList [IN][OUT] structure pointer of stream cfg list
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetStreamCfgList(HANDLE handle, MV3D_RGBD_STREAM_CFG_LIST* pstStreamCfgList);
|
||||
|
||||
/***********************************************************************
|
||||
* @~chinese
|
||||
* @brief 开始工作
|
||||
* @param handle [IN] 相机句柄
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief start working
|
||||
* @param handle [IN] camera handle
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
***********************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_Start(HANDLE handle);
|
||||
|
||||
/***********************************************************************
|
||||
* @~chinese
|
||||
* @brief 停止工作
|
||||
* @param handle [IN] 相机句柄
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief stop working
|
||||
* @param handle [IN] camera handle
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
***********************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_Stop(HANDLE handle);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 轮询方式获取帧数据
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pstFrameData [IN][OUT] 数据指针
|
||||
* @param nTimeOut [IN] 超时时间(ms)
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief fetch frame data
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstFrameData [IN] data set pointer
|
||||
* @param nTimeOut [IN] timevalue(ms)
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_FetchFrame(HANDLE handle, MV3D_RGBD_FRAME_DATA* pstFrameData, uint32_t nTimeOut);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 执行设备软触发
|
||||
* @param handle [IN] 相机句柄
|
||||
* @return 成功,返回MV3D_RGBD_OK,失败,返回错误码
|
||||
* @remark 设置触发模式为打开,设置触发源为软触发并执行
|
||||
|
||||
* @~english
|
||||
* @brief execute camera soft trigger
|
||||
* @param handle [IN] camera handle
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
* @remark Set trigger mode to open, trigger source to software, and excute soft trigger
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SoftTrigger(HANDLE handle);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 执行设备Command命令
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param strKey [IN] 属性键值
|
||||
* @return 成功,返回MV3D_RGBD_OK,失败,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief execute camera command
|
||||
* @param handle [IN] camera handle
|
||||
* @param strKey [IN] key value
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_Execute(HANDLE handle, const char* strKey);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 获取相机当前标定信息
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param nCoordinateType [IN] 坐标系类型,见Mv3dRgbdCoordinateType
|
||||
* @param pstCalibInfo [IN][OUT] 输出标定信息
|
||||
* @return 成功,返回MV3D_RGBD_OK,失败,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief get camera current calibration info
|
||||
* @param handle [IN] camera handle
|
||||
* @param nCoordinateType [IN] coordinate type, refer to Mv3dRgbdCoordinateType
|
||||
* @param pstCalibInfo [IN][OUT] calibration info
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetCalibInfo(HANDLE handle, uint32_t nCoordinateType, MV3D_RGBD_CALIB_INFO* pstCalibInfo);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 获取相机内外参信息
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pstCameraParam [IN][OUT] 输出相机内外参数信息
|
||||
* @return 成功,返回MV3D_RGBD_OK,失败,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief get camera intrinsic and extrinsic information
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstCameraParam [IN][OUT] camera intrinsic and extrinsic Info
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetCameraParam(HANDLE handle, MV3D_RGBD_CAMERA_PARAM* pstCameraParam);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 设备升级
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pFilePathName [IN] 文件名
|
||||
* @return 成功,返回MV3D_RGBD_OK,失败,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief device upgrade
|
||||
* @param handle [IN] camera handle
|
||||
* @param pFilePathName [IN] file name
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_LocalUpgrade(HANDLE handle, const char* pFilePathName);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 获取升级进度
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pProcess [OUT] 进度接收地址
|
||||
* @return 成功,返回MV3D_RGBD_OK,失败,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief get upgrade progress
|
||||
* @param handle [IN] camera handle
|
||||
* @param pProcess [OUT] progress receiving address
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetUpgradeProcess(HANDLE handle, uint32_t* pProcess);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 获取相机参数值
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param strKey [IN] 属性键值
|
||||
* @param pstParam [IN] 返回的相机参数结构体指针
|
||||
* @return 成功,返回MV3D_RGBD_OK,失败,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief get camera param value
|
||||
* @param handle [IN] camera handle
|
||||
* @param strKey [IN] key value
|
||||
* @param pstParam [IN] structure pointer of camera param
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetParam(HANDLE handle, const char* strKey, MV3D_RGBD_PARAM* pstParam);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 设置相机参数值
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param strKey [IN] 属性键值
|
||||
* @param pstParam [IN] 输入的相机参数结构体指针
|
||||
* @return 成功,返回MV3D_RGBD_OK,失败,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief set camera param value
|
||||
* @param handle [IN] camera handle
|
||||
* @param strKey [IN] key value
|
||||
* @param pstParam [IN] structure pointer of camera param
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SetParam(HANDLE handle, const char* strKey, MV3D_RGBD_PARAM* pstParam);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 导出相机参数
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pOutFileName [IN] 导出文件名称
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief export camera param
|
||||
* @param handle [IN] camera handle
|
||||
* @param pOutFileName [IN] export file name
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_ExportAllParam(HANDLE handle, const char* pOutFileName);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 导入相机参数
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pInFileName [IN] 导入文件名称
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief import camera param
|
||||
* @param handle [IN] camera handle
|
||||
* @param pInFileName [IN] import file name
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_ImportAllParam(HANDLE handle, const char* pInFileName);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 从相机读取文件
|
||||
* @param handle [IN] 句柄地址
|
||||
* @param pstFileAccess [IN] 文件存取结构体
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief read the file from the camera
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstFileAccess [IN] file access structure
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_FileAccessRead(void* handle, MV3D_RGBD_FILE_ACCESS* pstFileAccess);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 将文件写入相机
|
||||
* @param handle [IN] 句柄地址
|
||||
* @param pstFileAccess [IN] 文件存取结构体
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief write the file to camera
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstFileAccess [IN] file access structure
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_FileAccessWrite(void* handle, MV3D_RGBD_FILE_ACCESS* pstFileAccess);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 获取文件存取的进度
|
||||
* @param handle [IN] 句柄地址
|
||||
* @param pstFileAccessProgress [IN] 文件存取进度结构体
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief get file access progress
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstFileAccessProgress [IN] file access progress structure
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_GetFileAccessProgress(void* handle, MV3D_RGBD_FILE_ACCESS_PROGRESS* pstFileAccessProgress);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _MV3D_RGBD_API_H_
|
||||
512
3rdparty/hikvision/rgbd_camera/inc/Mv3dRgbdDefine.h
vendored
Normal file
512
3rdparty/hikvision/rgbd_camera/inc/Mv3dRgbdDefine.h
vendored
Normal file
@@ -0,0 +1,512 @@
|
||||
#ifndef _MV3D_RGBD_DEFINE_H_
|
||||
#define _MV3D_RGBD_DEFINE_H_
|
||||
|
||||
#ifndef MV3D_RGBD_API
|
||||
#if (defined (_WIN32) || defined(WIN64))
|
||||
#if defined(MV3D_RGBD_EXPORTS)
|
||||
#define MV3D_RGBD_API __declspec(dllexport)
|
||||
#else
|
||||
#define MV3D_RGBD_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#ifndef __stdcall
|
||||
#define __stdcall
|
||||
#endif
|
||||
|
||||
#ifndef MV3D_RGBD_API
|
||||
#define MV3D_RGBD_API
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/****************************** ch: 摘要 | en: Instructions **********************************************/
|
||||
|
||||
/**
|
||||
* @~chinese
|
||||
* 该头文件主要包含6部分:
|
||||
* 1.跨平台定义
|
||||
* 2.状态码
|
||||
* 3.常量定义
|
||||
* 4.枚举
|
||||
* 5.数据结构体
|
||||
* 6.回调接口定义
|
||||
*
|
||||
* @~english
|
||||
* The document mainly consists of six parts:
|
||||
* 1.Cross Platform Definition
|
||||
* 2.Status Code
|
||||
* 3.Macro Definition
|
||||
* 4.Enumeration
|
||||
* 5.Data Structure
|
||||
* 6.Callback Interface Definition
|
||||
**/
|
||||
|
||||
|
||||
/***************************************** Part1 ch: 跨平台定义 | en: Cross Platform Definition **************************************************/
|
||||
|
||||
#ifdef WIN32
|
||||
typedef signed char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
|
||||
#define MV3D_RGBD_UNDEFINED 0xFFFFFFFF
|
||||
#else
|
||||
#include <stdint.h>
|
||||
|
||||
#define MV3D_RGBD_UNDEFINED -1
|
||||
#endif
|
||||
|
||||
|
||||
/***************************************** Part2 ch: 状态码 | en: Status Code **************************************************/
|
||||
|
||||
/// \~chinese
|
||||
/// \name 正确码定义
|
||||
/// @{
|
||||
/// \~english
|
||||
/// \name Definition of correct code
|
||||
/// @{
|
||||
#define MV3D_RGBD_OK 0x00000000 ///< \~chinese 成功,无错误 \~english Successed, no error
|
||||
/// @}
|
||||
///
|
||||
/// \~chinese
|
||||
/// \name 通用错误码定义:范围0x80060000-0x800600FF
|
||||
/// @{
|
||||
/// \~english
|
||||
/// \name Definition of General Error Code (from 0x80060000 to 0x800600FF)
|
||||
/// @{
|
||||
#define MV3D_RGBD_E_HANDLE 0x80060000 ///< \~chinese 错误或无效的句柄 \~english Incorrect or invalid handle
|
||||
#define MV3D_RGBD_E_SUPPORT 0x80060001 ///< \~chinese 不支持的功能 \~english The function is not supported
|
||||
#define MV3D_RGBD_E_BUFOVER 0x80060002 ///< \~chinese 缓存已满 \~english The buffer is full
|
||||
#define MV3D_RGBD_E_CALLORDER 0x80060003 ///< \~chinese 函数调用顺序错误 \~english Incorrect calling sequence
|
||||
#define MV3D_RGBD_E_PARAMETER 0x80060004 ///< \~chinese 错误的参数 \~english Incorrect parameter
|
||||
#define MV3D_RGBD_E_RESOURCE 0x80060005 ///< \~chinese 资源申请失败 \~english Resource request failed
|
||||
#define MV3D_RGBD_E_NODATA 0x80060006 ///< \~chinese 无数据 \~english No data
|
||||
#define MV3D_RGBD_E_PRECONDITION 0x80060007 ///< \~chinese 前置条件有误,或运行环境已发生变化 \~english Incorrect precondition, or running environment has changed
|
||||
#define MV3D_RGBD_E_VERSION 0x80060008 ///< \~chinese 版本不匹配 \~english The version mismatched
|
||||
#define MV3D_RGBD_E_NOENOUGH_BUF 0x80060009 ///< \~chinese 传入的内存空间不足 \~english Insufficient memory
|
||||
#define MV3D_RGBD_E_ABNORMAL_IMAGE 0x8006000A ///< \~chinese 异常图像,可能是丢包导致图像不完整 \~english Abnormal image. Incomplete image caused by packet loss
|
||||
#define MV3D_RGBD_E_LOAD_LIBRARY 0x8006000B ///< \~chinese 动态导入DLL失败 \~english Failed to load the dynamic link library dynamically
|
||||
#define MV3D_RGBD_E_ALGORITHM 0x8006000C ///< \~chinese 算法错误 \~english Algorithm error
|
||||
#define MV3D_RGBD_E_DEVICE_OFFLINE 0x8006000D ///< \~chinese 设备离线 \~english The device is offline
|
||||
#define MV3D_RGBD_E_ACCESS_DENIED 0x8006000E ///< \~chinese 设备无访问权限 \~english No device access permission
|
||||
#define MV3D_RGBD_E_OUTOFRANGE 0x8006000F ///< \~chinese 值超出范围 \~english The value is out of range
|
||||
|
||||
#define MV3D_RGBD_E_UPG_FILE_MISMATCH 0x80060010 ///< \~chinese 升级固件不匹配 \~english The upgraded firmware does not match
|
||||
#define MV3D_RGBD_E_UPG_CONFLICT 0x80060012 ///< \~chinese 升级冲突 \~english The upgraded firmware conflict
|
||||
#define MV3D_RGBD_E_UPG_INNER_ERR 0x80060013 ///< \~chinese 升级时相机内部出现错误 \~english An error occurred inside the camera during the upgrade
|
||||
|
||||
#define MV3D_RGBD_E_INDUSTRY 0x80060020 ///< \~chinese 行业属性不匹配 \~english The industry attributes does not match
|
||||
#define MV3D_RGBD_E_NETWORK 0x80060021 ///< \~chinese 网络相关错误 \~english Network related error
|
||||
|
||||
#define MV3D_RGBD_E_UNKNOW 0x800600FF ///< \~chinese 未知的错误 \~english Unknown error
|
||||
/// @}
|
||||
|
||||
|
||||
/***************************************** Part3 ch: 常量定义 | en: Macro Definition **************************************************/
|
||||
|
||||
///< \~chinese 常量 \~english Constant
|
||||
#define MV3D_RGBD_MAX_IMAGE_COUNT 10 ///< \~chinese 最大图片个数 \~english The maximum number of images
|
||||
#define MV3D_RGBD_MAX_STRING_LENGTH 256 ///< \~chinese 最大字符串长度 \~english The maximum length of string
|
||||
#define MV3D_RGBD_MAX_PATH_LENGTH 256 ///< \~chinese 最大路径长度 \~english The maximum length of path
|
||||
#define MV3D_RGBD_MAX_ENUM_COUNT 16 ///< \~chinese 最大枚举数量 \~english The maximum number of enumerations
|
||||
|
||||
///< \~chinese 像素类型 \~english Pixel Type
|
||||
#define MV3D_RGBD_PIXEL_MONO 0x01000000 ///< \~chinese Mono像素格式 \~english Mono pixel format
|
||||
#define MV3D_RGBD_PIXEL_COLOR 0x02000000 ///< \~chinese Color像素格式 \~english Color pixel format
|
||||
#define MV3D_RGBD_PIXEL_CUSTOM 0x80000000 ///< \~chinese 自定义像素格式 \~english Custom pixel format
|
||||
#define MV3D_RGBD_PIXEL_BIT_COUNT(n) ((n) << 16) ///< \~chinese 像素格式 \~english Pixel format
|
||||
|
||||
///< \~chinese 属性常量定义 \~english Attribute Key Value Definition
|
||||
#define MV3D_RGBD_INT_WIDTH "Width" ///< \~chinese 图像宽 \~english Image width
|
||||
#define MV3D_RGBD_INT_HEIGHT "Height" ///< \~chinese 图像高 \~english Image height
|
||||
#define MV3D_RGBD_ENUM_WORKINGMODE "CameraWorkingMode" ///< \~chinese 工作模式 \~english The camera working mode
|
||||
#define MV3D_RGBD_ENUM_PIXELFORMAT "PixelFormat" ///< \~chinese 像素格式 \~english Pixel format
|
||||
#define MV3D_RGBD_ENUM_IMAGEMODE "ImageMode" ///< \~chinese 图像模式 \~english Image mode
|
||||
#define MV3D_RGBD_FLOAT_GAIN "Gain" ///< \~chinese 增益 \~english Gain
|
||||
#define MV3D_RGBD_FLOAT_EXPOSURETIME "ExposureTime" ///< \~chinese 曝光时间 \~english Exposure time
|
||||
#define MV3D_RGBD_FLOAT_FRAMERATE "AcquisitionFrameRate" ///< \~chinese 采集帧率 \~english Acquired frame rate
|
||||
#define MV3D_RGBD_ENUM_TRIGGERSELECTOR "TriggerSelector" ///< \~chinese 触发选择器 \~english Trigger selector
|
||||
#define MV3D_RGBD_ENUM_TRIGGERMODE "TriggerMode" ///< \~chinese 触发模式 \~english Trigger mode
|
||||
#define MV3D_RGBD_ENUM_TRIGGERSOURCE "TriggerSource" ///< \~chinese 触发源 \~english Trigger source
|
||||
#define MV3D_RGBD_FLOAT_TRIGGERDELAY "TriggerDelay" ///< \~chinese 触发延迟时间 \~english Trigger delay
|
||||
#define MV3D_RGBD_INT_IMAGEALIGN "ImageAlign" ///< \~chinese 深度图对齐到RGB坐标系(默认值1:对齐;0:不对齐),重启程序后恢复默认值
|
||||
///< \~english Whether to align the depth image with RGB image: 1 (align, default value), 0 (not align). The default value will be restored after rebooting
|
||||
#define MV3D_RGBD_BOOL_LASERENABLE "LaserEnable" ///< \~chinese 投射器使能 \~english Open or close laser control
|
||||
#define Mv3D_RGBD_FLOAT_BASEDISTANCE "BaseDistance" ///< \~chinese 左右目基线距 \~english Left and right eyes base distance
|
||||
#define MV3D_RGBD_ENUM_RESOLUTION "BinningSelector" ///< \~chinese 采集分辨率 \~english Acquisition resolution
|
||||
#define MV3D_RGBD_INT_OUTPUT_RGBD "OutputRgbd" ///< \~chinese RGBD图像输出(默认值0:不输出;1:输出),重启程序后恢复默认值
|
||||
///< \~english Whether to output rgbd image: 1 (not output, default value), 0 (output). The default value will be restored after rebooting
|
||||
#define MV3D_RGBD_INT_DEVICE_TIMEOUT "DeviceTimeout" ///< \~chinese 设备控制超时时间(ms) \~english Timeout period of device control (unit: ms)
|
||||
#define MV3D_RGBD_INT_IMAGE_NODE_NUM "ImageNodeNum" ///< \~chinese 图像缓存节点个数 \~english The number of image buffer node
|
||||
#define MV3D_RGBD_FLOAT_Z_UNIT "ZUnit" ///< \~chinese 深度图量纲(mm) \~english The dimension of depth image (unit: mm)
|
||||
|
||||
///< \~chinese 设备文件枚举常量定义 \~english File Constant Definition
|
||||
#define MV3D_RGBD_SENSOR_CALI "RGBDSensorCali" ///< \~chinese 相机传感器标定文件 \~english The calibration file of camera sensor
|
||||
#define MV3D_RGBD_HANDEYE_CALI "RGBDHandEyeCali" ///< \~chinese 相机手眼标定文件 \~english The camera hand-eye calibration file
|
||||
|
||||
///< \~chinese 类型定义 \~english Typedef Documentation
|
||||
typedef int32_t MV3D_RGBD_STATUS; ///< \~chinese 返回值类型 \~english Return value type
|
||||
typedef void* HANDLE; ///< \~chinese 句柄类型 \~english Handle type
|
||||
typedef int32_t BOOL; ///< \~chinese BOOL类型 \~english Boolean type
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
|
||||
/***************************************** Part4 ch: 枚举 | en: Enumeration **************************************************/
|
||||
|
||||
///< \~chinese 设备类型 \~english Device Type
|
||||
typedef enum Mv3dRgbdDeviceType
|
||||
{
|
||||
DeviceType_Ethernet = 1 << 0, ///< \~chinese 网口设备 \~english Network type camera
|
||||
DeviceType_USB = 1 << 1, ///< \~chinese USB设备 \~english USB type camera
|
||||
DeviceType_Ethernet_Vir = 1 << 2, ///< \~chinese 虚拟网口设备 \~english Virtual network type camera
|
||||
DeviceType_USB_Vir = 1 << 3 ///< \~chinese 虚拟USB设备 \~english Virtual USB type camera
|
||||
} Mv3dRgbdDeviceType;
|
||||
|
||||
///< \~chinese ip类型 \~english IP Address Mode
|
||||
typedef enum Mv3dRgbdIpCfgMode
|
||||
{
|
||||
IpCfgMode_Static = 1, ///< \~chinese 静态IP \~english Static IP mode
|
||||
IpCfgMode_DHCP = 2, ///< \~chinese 自动分配IP(DHCP) \~english Automatically assigned IP address (DHCP)
|
||||
IpCfgMode_LLA = 4 ///< \~chinese 自动分配IP(LLA) \~english Automatically assigned IP address (LLA)
|
||||
} Mv3dRgbdIpCfgMode;
|
||||
|
||||
///< \~chinese USB协议类型 \~english Supported USB Protocol Type
|
||||
typedef enum Mv3dRgbdUsbProtocol
|
||||
{
|
||||
UsbProtocol_USB2 = 1, ///< \~chinese USB 2.0 \~english USB 2.0
|
||||
UsbProtocol_USB3 = 2 ///< \~chinese USB 3.0 \~english USB 3.0
|
||||
} Mv3dRgbdUsbProtocol;
|
||||
|
||||
///< \~chinese 图像格式 \~english Image Format
|
||||
typedef enum Mv3dRgbdImageType
|
||||
{
|
||||
ImageType_Undefined = MV3D_RGBD_UNDEFINED, ///< \~chinese 未定义的图像类型 \~english Undefined image type
|
||||
ImageType_Mono8 = (MV3D_RGBD_PIXEL_MONO | MV3D_RGBD_PIXEL_BIT_COUNT(8) | 0x0001), //0x01080001,(Mono8)
|
||||
ImageType_Mono16 = (MV3D_RGBD_PIXEL_MONO | MV3D_RGBD_PIXEL_BIT_COUNT(16) | 0x0007), //0x01100007,(Mono16)
|
||||
ImageType_Depth = (MV3D_RGBD_PIXEL_MONO | MV3D_RGBD_PIXEL_BIT_COUNT(16) | 0x00B8), //0x011000B8,(C16)
|
||||
ImageType_YUV422 = (MV3D_RGBD_PIXEL_COLOR | MV3D_RGBD_PIXEL_BIT_COUNT(16) | 0x0032), //0x02100032
|
||||
ImageType_YUV420SP_NV12 = (MV3D_RGBD_PIXEL_COLOR | MV3D_RGBD_PIXEL_BIT_COUNT(12) | 0x8001), //0x020C8001
|
||||
ImageType_YUV420SP_NV21 = (MV3D_RGBD_PIXEL_COLOR | MV3D_RGBD_PIXEL_BIT_COUNT(12) | 0x8002), //0x020C8002
|
||||
ImageType_RGB8_Planar = (MV3D_RGBD_PIXEL_COLOR | MV3D_RGBD_PIXEL_BIT_COUNT(24) | 0x0021), //0x02180021
|
||||
ImageType_PointCloud = (MV3D_RGBD_PIXEL_COLOR | MV3D_RGBD_PIXEL_BIT_COUNT(96) | 0x00C0), //0x026000C0,(ABC32f)
|
||||
ImageType_Jpeg = (MV3D_RGBD_PIXEL_CUSTOM| MV3D_RGBD_PIXEL_BIT_COUNT(24) | 0x0001), //0x80180001, ///< \~chinese 自定义的图片格式 \~english The custom image format
|
||||
ImageType_Rgbd = (MV3D_RGBD_PIXEL_CUSTOM| MV3D_RGBD_PIXEL_COLOR| MV3D_RGBD_PIXEL_BIT_COUNT(40) | 0x3007), //0x82283007
|
||||
} Mv3dRgbdImageType;
|
||||
|
||||
///< \~chinese 数据流类型 \~english Data Stream Type
|
||||
typedef enum Mv3dRgbdStreamType
|
||||
{
|
||||
StreamType_Undefined = 0,
|
||||
StreamType_Depth = 1, ///< \~chinese 深度图数据流 \~english Depth image data stream
|
||||
StreamType_Color = 2, ///< \~chinese 彩色图数据流 \~english Color image data stream
|
||||
StreamType_Ir_Left = 3, ///< \~chinese 矫正后的左目图数据流 \~english Corrected left-eye image data stream
|
||||
StreamType_Ir_Right = 4, ///< \~chinese 矫正后的右目图数据流 \~english Corrected right-eye image data stream
|
||||
StreamType_Imu = 5, ///< \~chinese IMU数据流 \~english IMU data stream
|
||||
StreamType_LeftMono = 6, ///< \~chinese 左目泛光图数据流 \~english Illuminated left-eye image data stream
|
||||
StreamType_Mask = 7, ///< \~chinese 掩膜图数据流 \~english Mask image data stream
|
||||
StreamType_Mono = 8, ///< \~chinese 未矫正的左右目融合图数据流 \~english Uncorrected left and right eyes fusion image data stream
|
||||
StreamType_Phase = 9, ///< \~chinese 相位图数据流 \~english Phase image data stream
|
||||
StreamType_Rgbd = 10 ///< \~chinese RGB-D图数据流 \~english RGB-D image data stream
|
||||
}Mv3dRgbdStreamType;
|
||||
|
||||
///< \~chinese 坐标系类型 \~english Coordinates Type
|
||||
typedef enum Mv3dRgbdCoordinateType
|
||||
{
|
||||
CoordinateType_Undefined = 0, ///< \~chinese 未定义的坐标系 \~english Undefined coordinates
|
||||
CoordinateType_Depth = 1, ///< \~chinese 深度图坐标系 \~english Depth image coordinates
|
||||
CoordinateType_RGB = 2 ///< \~chinese RGB图坐标系 \~english RGB image coordinates
|
||||
} Mv3dRgbdCoordinateType;
|
||||
|
||||
///< \~chinese 异常信息 \~english Exception Information
|
||||
typedef enum Mv3dRgbdDevException
|
||||
{
|
||||
DevException_Disconnect = 1 ///< \~chinese 设备断开连接 \~english The device is disconnected
|
||||
} Mv3dRgbdDevException;
|
||||
|
||||
///< \~chinese 参数类型 \~english Parameter Data Type
|
||||
typedef enum Mv3dRgbdParamType
|
||||
{
|
||||
ParamType_Bool = 1, ///< \~chinese Bool类型参数 \~english Boolean
|
||||
ParamType_Int = 2, ///< \~chinese Int类型参数 \~english Int
|
||||
ParamType_Float = 3, ///< \~chinese Float类型参数 \~english Float
|
||||
ParamType_Enum = 4, ///< \~chinese Enum类型参数 \~english Enumeration
|
||||
ParamType_String = 5 ///< \~chinese String类型参数 \~english String
|
||||
} Mv3dRgbdParamType;
|
||||
|
||||
///< \~chinese 深度图与rgb图存图格式 \~english Format of Saving Depth Images and RGB Images
|
||||
typedef enum Mv3dRgbdFileType
|
||||
{
|
||||
FileType_BMP = 1, ///< \~chinese BMP格式 \~english BMP
|
||||
FileType_JPG = 2, ///< \~chinese JPG格式 \~english JPG
|
||||
FileType_TIFF = 3 ///< \~chinese TIFF格式 \~english TIFF
|
||||
}Mv3dRgbdFileType;
|
||||
|
||||
///< \~chinese 点云图存图格式 \~english Formats of Saving Point Cloud Images
|
||||
typedef enum Mv3dRgbdPointCloudFileType
|
||||
{
|
||||
PointCloudFileType_PLY = 1, ///< \~chinese PLY_ASCII格式 \~english PLY(ascii)
|
||||
PointCloudFileType_CSV = 2, ///< \~chinese CSV格式 \~english CSV
|
||||
PointCloudFileType_OBJ = 3, ///< \~chinese OBJ格式 \~english OBJ
|
||||
PointCloudFileType_PLY_Binary = 4 ///< \~chinese PLY_BINARY格式 \~english PLY(binary)
|
||||
}Mv3dRgbdPointCloudFileType;
|
||||
|
||||
|
||||
/***************************************** Part5 ch: 数据结构体 | en: Data Structure **************************************************/
|
||||
|
||||
///< \~chinese 版本信息 \~english SDK Version Information
|
||||
typedef struct _MV3D_RGBD_VERSION_INFO_
|
||||
{
|
||||
uint32_t nMajor; ///< \~chinese 主版本 \~english The main version
|
||||
uint32_t nMinor; ///< \~chinese 次版本 \~english The minor version
|
||||
uint32_t nRevision; ///< \~chinese 修正版本 \~english The revision version
|
||||
} MV3D_RGBD_VERSION_INFO;
|
||||
|
||||
///< \~chinese 网口设备信息 \~english Network Type Device Information
|
||||
typedef struct _MV3D_RGBD_DEVICE_NET_INFO_
|
||||
{
|
||||
unsigned char chMacAddress[8]; ///< \~chinese Mac地址 \~english MAC address
|
||||
Mv3dRgbdIpCfgMode enIPCfgMode; ///< \~chinese 当前IP类型 \~english Current IP type
|
||||
char chCurrentIp[16]; ///< \~chinese 设备当前IP \~english Device‘s IP address
|
||||
char chCurrentSubNetMask[16]; ///< \~chinese 设备当前子网掩码 \~english Device’s subnet mask
|
||||
char chDefultGateWay[16]; ///< \~chinese 设备默认网关 \~english Device‘s default gateway
|
||||
char chNetExport[16]; ///< \~chinese 网口IP地址 \~english Network interface IP address
|
||||
|
||||
uint8_t nReserved[16]; ///< \~chinese 保留字节 \~english Reserved
|
||||
} MV3D_RGBD_DEVICE_NET_INFO;
|
||||
|
||||
///< \~chinese USB设备信息 \~english USB Type Device Information
|
||||
typedef struct _MV3D_RGBD_DEVICE_USB_INFO_
|
||||
{
|
||||
uint32_t nVendorId; ///< \~chinese 供应商ID号 \~english Manufacturer/vendor ID
|
||||
uint32_t nProductId; ///< \~chinese 产品ID号 \~english Product ID
|
||||
Mv3dRgbdUsbProtocol enUsbProtocol; ///< \~chinese 支持的USB协议 \~english Supported USB protocol types
|
||||
char chDeviceGUID[64]; ///< \~chinese 设备GUID号 \~english Device GUID
|
||||
|
||||
uint8_t nReserved[16]; ///< \~chinese 保留字节 \~english Reserved
|
||||
} MV3D_RGBD_DEVICE_USB_INFO;
|
||||
|
||||
///< \~chinese 枚举相关设备信息 \~english Device Information
|
||||
typedef struct _MV3D_RGBD_DEVICE_INFO_
|
||||
{
|
||||
char chManufacturerName[32]; ///< \~chinese 设备厂商 \~english Manufacturer
|
||||
char chModelName[32]; ///< \~chinese 设备型号 \~english Device model
|
||||
char chDeviceVersion[32]; ///< \~chinese 设备版本 \~english Device version
|
||||
char chManufacturerSpecificInfo[44]; ///< \~chinese 设备厂商特殊信息 \~english The specific information about manufacturer
|
||||
uint32_t nDevTypeInfo; ///< \~chinese 设备类型信息 \~english Device type info
|
||||
char chSerialNumber[16]; ///< \~chinese 设备序列号 \~english Device serial number
|
||||
char chUserDefinedName[16]; ///< \~chinese 设备用户自定义名称 \~english User-defined name of device
|
||||
Mv3dRgbdDeviceType enDeviceType; ///< \~chinese 设备类型:网口、USB、虚拟网口设备、虚拟USB设备
|
||||
///< \~english Device type(network / USB / virtual network / virtual USB)
|
||||
union
|
||||
{
|
||||
MV3D_RGBD_DEVICE_NET_INFO stNetInfo; ///< \~chinese 网口设备特有 \~english Network type device
|
||||
MV3D_RGBD_DEVICE_USB_INFO stUsbInfo; ///< \~chinese USB设备特有 \~english USB type device information
|
||||
} SpecialInfo; ///< \~chinese 不同设备特有信息 \~english Particular information of different types devices
|
||||
|
||||
} MV3D_RGBD_DEVICE_INFO;
|
||||
|
||||
///< \~chinese IP配置 \~english IP Configuration Parameters
|
||||
typedef struct _MV3D_RGBD_IP_CONFIG_
|
||||
{
|
||||
Mv3dRgbdIpCfgMode enIPCfgMode; ///< \~chinese IP配置模式 \~english IP configuration mode
|
||||
char chDestIp[16]; ///< \~chinese 设置的目标IP,仅静态IP模式下有效 \~english The IP address which is to be attributed to the target device. It is valid in the static IP mode only
|
||||
char chDestNetMask[16]; ///< \~chinese 设置的目标子网掩码,仅静态IP模式下有效 \~english The subnet mask of target device. It is valid in the static IP mode only
|
||||
char chDestGateWay[16]; ///< \~chinese 设置的目标网关,仅静态IP模式下有效 \~english The gateway of target device. It is valid in the static IP mode only
|
||||
|
||||
|
||||
uint8_t nReserved[16]; ///< \~chinese 保留字节 \~english Reserved
|
||||
} MV3D_RGBD_IP_CONFIG;
|
||||
|
||||
///< \~chinese 相机图像 \~english Camera Image Parameters
|
||||
typedef struct _MV3D_RGBD_IMAGE_DATA_
|
||||
{
|
||||
Mv3dRgbdImageType enImageType; ///< \~chinese 图像格式 \~english Image format
|
||||
uint32_t nWidth; ///< \~chinese 图像宽 \~english Image width
|
||||
uint32_t nHeight; ///< \~chinese 图像高 \~english Image height
|
||||
uint8_t* pData; ///< \~chinese 相机输出的图像数据 \~english Image data, which is outputted by the camera
|
||||
uint32_t nDataLen; ///< \~chinese 图像数据长度(字节) \~english Image data length (bytes)
|
||||
uint32_t nFrameNum; ///< \~chinese 帧号,代表第几帧图像 \~english Frame number, which indicates the frame sequence
|
||||
int64_t nTimeStamp; ///< \~chinese 设备上报的时间戳 (设备上电从0开始,规则详见设备手册)
|
||||
///< \~english Timestamp uploaded by the device. It starts from 0 when the device is powered on. Refer to the device user manual for detailed rules
|
||||
BOOL bIsRectified; ///< \~chinese 是否校正 \~english Correction flag
|
||||
Mv3dRgbdStreamType enStreamType; ///< \~chinese 流类型,用于区分图像(图像格式相同时) \~english Data stream type, used to distinguish data in the same image format
|
||||
Mv3dRgbdCoordinateType enCoordinateType; ///< \~chinese 坐标系类型 \~english Coordinates type
|
||||
|
||||
uint8_t nReserved[4]; ///< \~chinese 保留字节 \~english Reserved
|
||||
} MV3D_RGBD_IMAGE_DATA;
|
||||
|
||||
///< \~chinese 图像帧数据 \~english Frame Data
|
||||
typedef struct _MV3D_RGBD_FRAME_DATA_
|
||||
{
|
||||
uint32_t nImageCount; ///< \~chinese 图像个数,表示stImage数组的有效个数 \~english The number of images. It indicates the number of valid stImage arrays
|
||||
MV3D_RGBD_IMAGE_DATA stImageData[MV3D_RGBD_MAX_IMAGE_COUNT]; ///< \~chinese 图像数组,每一个代表一种类型的图像 \~english Image array, each one represents one type of images
|
||||
uint32_t nValidInfo; ///< \~chinese 帧有效信息:0(帧有效),1 << 0(丢包),1 << 1(触发标识符无效)
|
||||
///< \~english Frame valid info: 0 (Frame is valid), 1 << 0 (lost package), 1 << 1 (trigger is not valid)
|
||||
uint8_t nReserved[12]; ///< \~chinese 保留字节 \~english Reserved
|
||||
} MV3D_RGBD_FRAME_DATA;
|
||||
|
||||
///< \~chinese 固件输出的图像附加信息 \~english Image Additional Information Output by Firmware
|
||||
typedef struct _MV3D_RGBD_STREAM_CFG_
|
||||
{
|
||||
Mv3dRgbdImageType enImageType; ///< \~chinese 图像格式 \~english Image format
|
||||
uint32_t nWidth; ///< \~chinese 图像宽 \~english Image width
|
||||
uint32_t nHeight; ///< \~chinese 图像高 \~english Image height
|
||||
|
||||
uint8_t nReserved[32]; ///< \~chinese 保留字节 \~english Reserved
|
||||
}MV3D_RGBD_STREAM_CFG;
|
||||
|
||||
///< \~chinese 固件输出的图像帧附加信息 \~english Frame Additional Information Output by Firmware
|
||||
typedef struct _MV3D_RGBD_STREAM_CFG_LIST_
|
||||
{
|
||||
uint32_t nStreamCfgCount; ///< \~chinese 图像信息数量 \~english The number of image information
|
||||
MV3D_RGBD_STREAM_CFG stStreamCfg[MV3D_RGBD_MAX_IMAGE_COUNT]; ///< \~chinese 图像附加信息 \~english Image additional information
|
||||
|
||||
uint8_t nReserved[16]; ///< \~chinese 保留字节 \~english Reserved
|
||||
}MV3D_RGBD_STREAM_CFG_LIST;
|
||||
|
||||
///< \~chinese 相机内参 \~english Camera Internal Parameters
|
||||
///< | fx| 0| cx|
|
||||
///< | 0| fy| cy|
|
||||
///< | 0| 0| 1|
|
||||
typedef struct _MV3D_RGBD_CAMERA_INTRINSIC_
|
||||
{
|
||||
float fData[3*3]; ///< \~chinese 内参参数:fx,0,cx,0,fy,cy,0,0,1 \~english Internal parameters: fx,0,cx,0,fy,cy,0,0,1
|
||||
} MV3D_RGBD_CAMERA_INTRINSIC;
|
||||
|
||||
///< \~chinese 相机畸变系数 \~english Camera Distortion Coefficient
|
||||
typedef struct _MV3D_RGBD_CAMERA_DISTORTION_
|
||||
{
|
||||
float fData[12]; ///< \~chinese 畸变系数:k1,k2,p1,p2,k3,k4,k5,k6,s1,s2,s3,s4 \~english Distortion coefficient: k1,k2,p1,p2,k3,k4,k5,k6,s1,s2,s3,s4
|
||||
|
||||
} MV3D_RGBD_CAMERA_DISTORTION;
|
||||
|
||||
///< \~chinese 相机的内参,畸变系数,分辨率信息 \~english Structure About Camera Internal Parameters, Distortion Coefficient and Resolution Information
|
||||
typedef struct _MV3D_RGBD_CALIB_INFO_
|
||||
{
|
||||
MV3D_RGBD_CAMERA_INTRINSIC stIntrinsic; ///< \~chinese 相机内参 \~english Camera internal parameters
|
||||
MV3D_RGBD_CAMERA_DISTORTION stDistortion; ///< \~chinese 畸变系数 \~english Camera distortion coefficient
|
||||
uint32_t nWidth; ///< \~chinese 图像宽 \~english Image width
|
||||
uint32_t nHeight; ///< \~chinese 图像高 \~english Image height
|
||||
|
||||
uint8_t nReserved[8]; ///< \~chinese 保留字节 \~english Reserved
|
||||
} MV3D_RGBD_CALIB_INFO;
|
||||
|
||||
///< \~chinese 相机深度图转Rgb的外参 \~english Camera Extrinsic Parameters of Depth Image to Rgb Image
|
||||
///< | r00| r01| r02| t0|
|
||||
///< | r10| r11| r12| t1|
|
||||
///< | r20| r21| r22| t2|
|
||||
///< | 0| 0| 0| 1|
|
||||
typedef struct _MV3D_RGBD_CAMERA_EXTRINSIC_
|
||||
{
|
||||
float fData[4*4]; ///< \~chinese 深度图转Rgb外参参数:r00,r01,r02,t0,r10,r11,r12,t1,r20,r21,r22,t2,0,0,0,1
|
||||
///< \~english Extrinsic parameters of depth image to rgb image: r00,r01,r02,t0,r10,r11,r12,t1,r20,r21,r22,t2,0,0,0,1
|
||||
}MV3D_RGBD_CAMERA_EXTRINSIC;
|
||||
|
||||
///< \~chinese 相机参数信息 \~english Camera Parameters Information
|
||||
typedef struct _MV3D_RGBD_CAMERA_PARAM_
|
||||
{
|
||||
MV3D_RGBD_CALIB_INFO stDepthCalibInfo; ///< \~chinese 深度图内参和畸变矩阵信息 \~english Depth image intrinsic information and distortion coefficient
|
||||
MV3D_RGBD_CALIB_INFO stRgbCalibInfo; ///< \~chinese rgb内参和畸变矩阵信息 \~english Rgb image intrinsic information and distortion coefficient
|
||||
MV3D_RGBD_CAMERA_EXTRINSIC stDepth2RgbExtrinsic; ///< \~chinese 相机深度图转RGB的外参 \~english Camera extrinsic parameters of depth image to rgb image
|
||||
|
||||
uint8_t nReserved[32]; ///< \~chinese 保留字节 \~english Reserved
|
||||
}MV3D_RGBD_CAMERA_PARAM;
|
||||
|
||||
///< \~chinese Int类型值 \~english Int Type Value
|
||||
typedef struct _MV3D_RGBD_INTPARAM_
|
||||
{
|
||||
int64_t nCurValue; ///< \~chinese 当前值 \~english Current value
|
||||
int64_t nMax; ///< \~chinese 最大值 \~english The maximum value
|
||||
int64_t nMin; ///< \~chinese 最小值 \~english The minimum value
|
||||
int64_t nInc; ///< \~chinese 增量值 \~english The increment value
|
||||
} MV3D_RGBD_INTPARAM;
|
||||
|
||||
///< \~chinese Enum类型值 \~english Enumeration Type Value
|
||||
typedef struct _MV3D_RGBD_ENUMPARAM_
|
||||
{
|
||||
uint32_t nCurValue; ///< \~chinese 当前值 \~english Current value
|
||||
uint32_t nSupportedNum; ///< \~chinese 有效数据个数 \~english The number of valid data
|
||||
uint32_t nSupportValue[MV3D_RGBD_MAX_ENUM_COUNT]; ///< \~chinese 支持的枚举类型 \~english The type of supported enumerations
|
||||
} MV3D_RGBD_ENUMPARAM;
|
||||
|
||||
///< \~chinese Float类型值 \~english Float Type Value
|
||||
typedef struct _MV3D_RGBD_FLOATPARAM_
|
||||
{
|
||||
float fCurValue; ///< \~chinese 当前值 \~english Current value
|
||||
float fMax; ///< \~chinese 最大值 \~english The maximum value
|
||||
float fMin; ///< \~chinese 最小值 \~english The minimum value
|
||||
} MV3D_RGBD_FLOATPARAM;
|
||||
|
||||
///< \~chinese String类型值 \~english String Type Value
|
||||
typedef struct _MV3D_RGBD_STRINGPARAM_
|
||||
{
|
||||
char chCurValue[MV3D_RGBD_MAX_STRING_LENGTH]; ///< \~chinese 当前值 \~english Current value
|
||||
uint32_t nMaxLength; ///< \~chinese 属性节点能设置字符的最大长度 \~english The maximum length of string
|
||||
} MV3D_RGBD_STRINGPARAM;
|
||||
|
||||
///< \~chinese 设备参数 \~english Device Parameters
|
||||
typedef struct _MV3D_RGBD_PARAM_
|
||||
{
|
||||
Mv3dRgbdParamType enParamType; ///< \~chinese 设置属性值类型 \~english Parameter data type
|
||||
union
|
||||
{
|
||||
BOOL bBoolParam; ///< \~chinese Bool类型参数 \~english Boolean type parameter
|
||||
MV3D_RGBD_INTPARAM stIntParam; ///< \~chinese Int类型参数 \~english Int type parameter
|
||||
MV3D_RGBD_FLOATPARAM stFloatParam; ///< \~chinese Float类型参数 \~english Float type parameter
|
||||
MV3D_RGBD_ENUMPARAM stEnumParam; ///< \~chinese Enum类型参数 \~english Enum type parameter
|
||||
MV3D_RGBD_STRINGPARAM stStringParam; ///< \~chinese String类型参数 \~english String type parameter
|
||||
} ParamInfo;
|
||||
|
||||
uint8_t nReserved[16]; ///< \~chinese 保留字节 \~english Reserved
|
||||
} MV3D_RGBD_PARAM;
|
||||
|
||||
///< \~chinese 异常信息 \~english Exception Information
|
||||
typedef struct _MV3D_RGBD_EXCEPTION_INFO_
|
||||
{
|
||||
Mv3dRgbdDevException enExceptionId; ///< \~chinese 异常ID \~english Exception ID
|
||||
char chExceptionDes[MV3D_RGBD_MAX_STRING_LENGTH]; ///< \~chinese 异常描述 \~english Exception description
|
||||
|
||||
uint8_t nReserved[4]; ///< \~chinese 保留字节 \~english Reserved
|
||||
} MV3D_RGBD_EXCEPTION_INFO;
|
||||
|
||||
///< \~chinese 文件存取 \~english File Access
|
||||
typedef struct _MV3D_RGBD_FILE_ACCESS_
|
||||
{
|
||||
const char* pUserFileName; ///< \~chinese 用户文件名 \~english User file name
|
||||
const char* pDevFileName; ///< \~chinese 设备文件名 \~english Device file name
|
||||
|
||||
uint8_t nReserved[32]; ///< \~chinese 保留字节 \~english Reserved
|
||||
}MV3D_RGBD_FILE_ACCESS;
|
||||
|
||||
///< \~chinese 文件存取进度 \~english File Access Progress
|
||||
typedef struct _MV3D_RGBD_FILE_ACCESS_PROGRESS_
|
||||
{
|
||||
int64_t nCompleted; ///< \~chinese 已完成的长度 \~english Completed length
|
||||
int64_t nTotal; ///< \~chinese 总长度 \~english Total length
|
||||
|
||||
uint8_t nReserved[32]; ///< \~chinese 保留字节 \~english Reserved
|
||||
}MV3D_RGBD_FILE_ACCESS_PROGRESS;
|
||||
|
||||
|
||||
/***************************************** Part6 ch: 回调接口定义 | en: Callback Interface Definition **************************************************/
|
||||
|
||||
///< \~chinese 帧数据回调 \~english Frame Data Callback
|
||||
typedef void(__stdcall* MV3D_RGBD_FrameDataCallBack) (MV3D_RGBD_FRAME_DATA* pstFrameData, void* pUser);
|
||||
///< \~chinese 异常回调 \~english Exception Callback
|
||||
typedef void(__stdcall* MV3D_RGBD_ExceptionCallBack) (MV3D_RGBD_EXCEPTION_INFO* pstExceptInfo, void* pUser);
|
||||
|
||||
#endif // _MV3D_RGBD_DEFINE_H_
|
||||
159
3rdparty/hikvision/rgbd_camera/inc/Mv3dRgbdImgProc.h
vendored
Normal file
159
3rdparty/hikvision/rgbd_camera/inc/Mv3dRgbdImgProc.h
vendored
Normal file
@@ -0,0 +1,159 @@
|
||||
#ifndef _MV3D_RGBD_IMG_PROC_H_
|
||||
#define _MV3D_RGBD_IMG_PROC_H_
|
||||
|
||||
#include "Mv3dRgbdDefine.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief RGBD相机深度图像转换点云图像
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pstDepthImage [IN] 深度图数据
|
||||
* @param pstPointCloudImage [OUT] 点云图数据
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief depth image convert to pointcloud image
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstDepthImage [IN] depth data
|
||||
* @param pstPointCloudImage [OUT] point cloud data
|
||||
* @return Success, return MV3D_RGBD_OK. Failure,return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_MapDepthToPointCloud(void* handle, MV3D_RGBD_IMAGE_DATA* pstDepthImage, MV3D_RGBD_IMAGE_DATA* pstPointCloudImage);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief RGBD相机深度图像转换点云图像(无句柄)
|
||||
* @param pstDepthImage [IN] 深度图数据
|
||||
* @param pstCalibInfo [IN] 标定信息
|
||||
* @param fZunit [IN] 深度图量纲(mm)
|
||||
* @param pstPointCloudImage [OUT] 点云图数据
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief depth image convert to pointcloud image without handle
|
||||
* @param pstDepthImage [IN] depth data
|
||||
* @param pstCalibInfo [IN] calib info
|
||||
* @param fZunit [IN] dimension(mm)
|
||||
* @param pstPointCloudImage [OUT] point cloud data
|
||||
* @return Success, return MV3D_RGBD_OK. Failure,return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_MapDepthToPointCloudEx(MV3D_RGBD_IMAGE_DATA* pstDepthImage, MV3D_RGBD_CALIB_INFO* pstCalibInfo, float fZunit, MV3D_RGBD_IMAGE_DATA* pstPointCloudImage);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 图像坐标系转换
|
||||
* @param pstInImage [IN] 输入图像数据
|
||||
* @param fZunit [IN] 深度图量纲(mm)
|
||||
* @param pstOutImage [OUT] 输出图像数据
|
||||
* @param pstCameraParam [IN][OUT] 相机参数
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief image convert coordinate to rgb coordinate
|
||||
* @param pstInImage [IN] input image data
|
||||
* @param fZunit [IN] dimension(mm)
|
||||
* @param pstOutImage [OUT] output image data
|
||||
* @param pstCameraParam [IN][OUT] camera param
|
||||
* @return Success, return MV3D_RGBD_OK. Failure,return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_ImageCoordinateTrans(MV3D_RGBD_IMAGE_DATA* pstInImage, float fZunit, MV3D_RGBD_IMAGE_DATA* pstOutImage, MV3D_RGBD_CAMERA_PARAM* pstCameraParam);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 深度图,RGB图和原始图存图接口
|
||||
* 深度图格式:C16
|
||||
* RGB图格式:RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||||
* 原始图格式:Mono8(仅支持bmp格式)
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pstImage [IN] 图像数据
|
||||
* @param enFileType [IN] 文件类型
|
||||
* @param chFileName [IN] 文件名称
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief depth and rgb image save image to file
|
||||
* depth image format: C16
|
||||
* rgb image format: RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||||
* mono image format: Mono8(only support bmp file type)
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstImage [IN] image data
|
||||
* @param enFileType [IN] file type
|
||||
* @param chFileName [IN] file name
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SaveImage(void* handle, MV3D_RGBD_IMAGE_DATA* pstImage, Mv3dRgbdFileType enFileType, const char* chFileName);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 点云图存图接口
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pstImage [IN] 图像数据
|
||||
* @param enPointCloudFileType [IN] 点云图文件类型
|
||||
* @param chFileName [IN] 文件名称
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief pointcloud image save image to file
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstImage [IN] image data
|
||||
* @param enPointCloudFileType [IN] pointcloud image file type
|
||||
* @param chFileName [IN] file name
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SavePointCloudImage(void* handle, MV3D_RGBD_IMAGE_DATA* pstImage, Mv3dRgbdPointCloudFileType enPointCloudFileType, const char* chFileName);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 纹理点云存图接口
|
||||
* 纹理图格式:RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||||
* 保存的点云图格式:PLY_ASCII
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pstPointCloudImage [IN] 点云图像数据
|
||||
* @param pstTexture [IN] 图像纹理数据
|
||||
* @param enPointCloudFileType [IN] 点云图文件类型
|
||||
* @param chFileName [IN] 文件名称
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief textured pointcloud image save image to file
|
||||
* textured image format: RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||||
* saved pointcloud image format: PLY_ASCII
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstPointCloudImage [IN] pointcloude image data
|
||||
* @param pstTexture [IN] image texture data
|
||||
* @param enPointCloudFileType [IN] pointcloud image file type
|
||||
* @param chFileName [IN] file name
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_SaveTexturedPointCloudImage(void* handle, MV3D_RGBD_IMAGE_DATA* pstPointCloudImage, MV3D_RGBD_IMAGE_DATA* pstTexture, Mv3dRgbdPointCloudFileType enPointCloudFileType, const char* chFileName);
|
||||
|
||||
/************************************************************************
|
||||
* @~chinese
|
||||
* @brief 显示深度和RGB图像接口
|
||||
* 深度图格式:C16
|
||||
* RGB图格式:RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||||
* @param handle [IN] 相机句柄
|
||||
* @param pstImage [IN] 图像数据
|
||||
* @param hWnd [IN] 窗口句柄
|
||||
* @return 成功,返回MV3D_RGBD_OK;错误,返回错误码
|
||||
|
||||
* @~english
|
||||
* @brief display depth and rgb image
|
||||
* depth image format: C16
|
||||
* rgb image format: RGB8_Planar/YUV422/YUV420SP_NV12/YUV420SP_NV21
|
||||
* @param handle [IN] camera handle
|
||||
* @param pstImage [IN] image data
|
||||
* @param hWnd [IN] windows handle
|
||||
* @return Success, return MV3D_RGBD_OK. Failure, return error code
|
||||
************************************************************************/
|
||||
MV3D_RGBD_API MV3D_RGBD_STATUS MV3D_RGBD_DisplayImage(void* handle, MV3D_RGBD_IMAGE_DATA* pstImage, void* hWnd);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _MV3D_RGBD_IMG_PROC_H_
|
||||
159
3rdparty/hikvision/rgbd_camera/inc/RenderImage.hpp
vendored
Normal file
159
3rdparty/hikvision/rgbd_camera/inc/RenderImage.hpp
vendored
Normal file
@@ -0,0 +1,159 @@
|
||||
#ifndef SAMPLE_COMMON_RENDERIMAGE_HPP_
|
||||
#define SAMPLE_COMMON_RENDERIMAGE_HPP_
|
||||
|
||||
#include "RenderWindow.hpp"
|
||||
|
||||
using namespace RenderImage;
|
||||
|
||||
static int CoverYuv422_T_RGB_Pixel(int y, int u, int v)
|
||||
{
|
||||
unsigned int pixel32 = 0;
|
||||
unsigned char *pixel = (unsigned char *)&pixel32;
|
||||
int r, g, b;
|
||||
r = y + (1.370705 * (v - 128));
|
||||
g = y - (0.698001 * (v - 128)) - (0.337633 * (u - 128));
|
||||
b = y + (1.732446 * (u - 128));
|
||||
if (r > 255)
|
||||
{
|
||||
r = 255;
|
||||
}
|
||||
if (g > 255)
|
||||
{
|
||||
g = 255;
|
||||
}
|
||||
if (b > 255)
|
||||
{
|
||||
b = 255;
|
||||
}
|
||||
if (r < 0)
|
||||
{
|
||||
r = 0;
|
||||
}
|
||||
if (g < 0)
|
||||
{
|
||||
g = 0;
|
||||
}
|
||||
if (b < 0)
|
||||
{
|
||||
b = 0;
|
||||
}
|
||||
pixel[0] = r;
|
||||
pixel[1] = g;
|
||||
pixel[2] = b;
|
||||
return pixel32;
|
||||
}
|
||||
|
||||
|
||||
static void YUV422_T_RGB(unsigned int nWidth, unsigned int nHeight,const unsigned char *pYUVSrc, unsigned char *pRGBDst)
|
||||
{
|
||||
unsigned int in, out = 0;
|
||||
unsigned int pixel_16;
|
||||
unsigned char pixel_24[3];
|
||||
unsigned int pixel32;
|
||||
int y0, u, y1, v;
|
||||
|
||||
if ((pYUVSrc == NULL) || (pRGBDst == NULL))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (in = 0; in < nWidth * nHeight * 2; in += 4)
|
||||
{
|
||||
pixel_16 =
|
||||
pYUVSrc[in + 3] << 24 |
|
||||
pYUVSrc[in + 2] << 16 |
|
||||
pYUVSrc[in + 1] << 8 |
|
||||
pYUVSrc[in + 0];
|
||||
y0 = (pixel_16 & 0x000000ff);
|
||||
u = (pixel_16 & 0x0000ff00) >> 8;
|
||||
y1 = (pixel_16 & 0x00ff0000) >> 16;
|
||||
v = (pixel_16 & 0xff000000) >> 24;
|
||||
pixel32 = CoverYuv422_T_RGB_Pixel(y0, u, v);
|
||||
pixel_24[0] = (pixel32 & 0x000000ff);
|
||||
pixel_24[1] = (pixel32 & 0x0000ff00) >> 8;
|
||||
pixel_24[2] = (pixel32 & 0x00ff0000) >> 16;
|
||||
pRGBDst[out++] = pixel_24[0];
|
||||
pRGBDst[out++] = pixel_24[1];
|
||||
pRGBDst[out++] = pixel_24[2];
|
||||
pixel32 = CoverYuv422_T_RGB_Pixel(y1, u, v);
|
||||
pixel_24[0] = (pixel32 & 0x000000ff);
|
||||
pixel_24[1] = (pixel32 & 0x0000ff00) >> 8;
|
||||
pixel_24[2] = (pixel32 & 0x00ff0000) >> 16;
|
||||
pRGBDst[out++] = pixel_24[0];
|
||||
pRGBDst[out++] = pixel_24[1];
|
||||
pRGBDst[out++] = pixel_24[2];
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
static int parseFrame(MV3D_RGBD_FRAME_DATA* pstFrameData, RIFrameInfo* pDepth
|
||||
, RIFrameInfo* pRgb, RIFrameInfo* pRgbd)
|
||||
{
|
||||
for (unsigned int i = 0; i < pstFrameData->nImageCount; i++)
|
||||
{
|
||||
//LOGD("parseFrame : framenum (%d) height(%d) width(%d) len (%d)!", pstFrameData->stImageData[i].nFrameNum,
|
||||
// pstFrameData->stImageData[i].nHeight, pstFrameData->stImageData[i].nWidth, pstFrameData->stImageData[i].nDataLen);
|
||||
|
||||
if (ImageType_Depth == pstFrameData->stImageData[i].enImageType)
|
||||
{
|
||||
pDepth->enPixelType = RIPixelType_Coord3D_C16;
|
||||
pDepth->nFrameNum = pstFrameData->stImageData[i].nFrameNum;
|
||||
pDepth->nHeight = pstFrameData->stImageData[i].nHeight;
|
||||
pDepth->nWidth = pstFrameData->stImageData[i].nWidth;
|
||||
pDepth->nFrameLength= pstFrameData->stImageData[i].nDataLen;
|
||||
pDepth->pData = pstFrameData->stImageData[i].pData;
|
||||
}
|
||||
|
||||
if (ImageType_RGB8_Planar == pstFrameData->stImageData[i].enImageType)
|
||||
{
|
||||
pRgb->enPixelType = RIPixelType_RGB8_Planar;
|
||||
pRgb->nFrameNum = pstFrameData->stImageData[i].nFrameNum;
|
||||
pRgb->nHeight = pstFrameData->stImageData[i].nHeight;
|
||||
pRgb->nWidth = pstFrameData->stImageData[i].nWidth;
|
||||
pRgb->nFrameLength = pstFrameData->stImageData[i].nDataLen;
|
||||
pRgb->pData = pstFrameData->stImageData[i].pData;
|
||||
}
|
||||
|
||||
if (ImageType_YUV422 == pstFrameData->stImageData[i].enImageType)
|
||||
{
|
||||
int nDstImageLen = pstFrameData->stImageData[i].nWidth * pstFrameData->stImageData[i].nHeight * 3;
|
||||
static unsigned char* pRGBBuffer = NULL;
|
||||
static unsigned int nImageLen = nDstImageLen;
|
||||
if (pRGBBuffer == NULL || nImageLen != nDstImageLen)
|
||||
{
|
||||
nImageLen = nDstImageLen;
|
||||
pRGBBuffer = (unsigned char *)malloc(nImageLen * sizeof(unsigned char));
|
||||
if (pRGBBuffer == NULL)
|
||||
{
|
||||
// LOGD("YUV422 buffer malloc fail!");
|
||||
return -1;
|
||||
}
|
||||
memset(pRGBBuffer, 0x00, nImageLen * sizeof(unsigned char));
|
||||
// LOGD("YUV422 buffer malloc success!");
|
||||
}
|
||||
YUV422_T_RGB(pstFrameData->stImageData[i].nWidth, pstFrameData->stImageData[i].nHeight, pstFrameData->stImageData[i].pData, pRGBBuffer);
|
||||
|
||||
pRgb->enPixelType = RIPixelType_RGB8_Packed;
|
||||
pRgb->nFrameNum = pstFrameData->stImageData[i].nFrameNum;
|
||||
pRgb->nHeight = pstFrameData->stImageData[i].nHeight;
|
||||
pRgb->nWidth = pstFrameData->stImageData[i].nWidth;
|
||||
pRgb->nFrameLength = nDstImageLen;
|
||||
pRgb->pData = pRGBBuffer;
|
||||
}
|
||||
|
||||
if (ImageType_Rgbd == pstFrameData->stImageData[i].enImageType)
|
||||
{
|
||||
pRgbd->enPixelType = RIPixelType_RGBD_C16;
|
||||
pRgbd->nFrameNum = pstFrameData->stImageData[i].nFrameNum;
|
||||
pRgbd->nHeight = pstFrameData->stImageData[i].nHeight;
|
||||
pRgbd->nWidth = pstFrameData->stImageData[i].nWidth;
|
||||
pRgbd->nFrameLength = pstFrameData->stImageData[i].nDataLen;
|
||||
pRgbd->pData = pstFrameData->stImageData[i].pData;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
1264
3rdparty/hikvision/rgbd_camera/inc/RenderWindow.hpp
vendored
Normal file
1264
3rdparty/hikvision/rgbd_camera/inc/RenderWindow.hpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1840
3rdparty/hikvision/rgbd_camera/inc/glad/glad.c
vendored
Normal file
1840
3rdparty/hikvision/rgbd_camera/inc/glad/glad.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3611
3rdparty/hikvision/rgbd_camera/inc/glad/glad.h
vendored
Normal file
3611
3rdparty/hikvision/rgbd_camera/inc/glad/glad.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user