?? okapi32.h
字號:
//---------------okapi32.h---------------------------------
//
// ok api32 header file for user
//
//---------------------------------------------------------
//----contant defines----
//--defines of ok series image board identity
//Mono series
#define OK_M10 1010
#define OK_M10N 1010
#define OK_M10M 1013
#define OK_M10F 1011
#define OK_M10L 1014
#define OK_M10H 1012
#define OK_M20 1020
#define OK_M20C 1021
#define OK_M20H 1022
#define OK_M30 1030
#define OK_M40 1040
#define OK_M50 1050
#define OK_M60 1060
#define OK_M70 1070
#define OK_M80 1080
#define OK_M80K 1081
#define OK_M10K 1002
//Color series
#define OK_C20 2020
#define OK_C20C 2021
#define OK_C30 2030
#define OK_C30S 2031
#define OK_C40 2040
#define OK_C40P 2041
#define OK_C50 2050
#define OK_C70 2070
#define OK_C80 2080
#define OK_C80M 2081
#define OK_RGB10 3010
#define OK_RGB20 3020
#define OK_RGB30 3030
//--error code
#define ERR_NOERROR 0 //no error
#define ERR_NOTFOUNDBOARD 1 //not found available ok board
#define ERR_NOTFOUNDVXDDRV 2 //not found ok vxd driver
#define ERR_NOTALLOCATEDBUF 3 //not pre-allocated buffer from host memory
#define ERR_BUFFERNOTENOUGH 4 //available buffer not enough requirment
#define ERR_BEYONDFRAMEBUF 5 //capture iamge size beyond buffer
#define ERR_NOTFOUNDDRIVER 6 //no driver found
#define ERR_NOTCORRECTDRIVER 7 //driver not correct
#define ERR_MEMORYNOTENOUGH 8 //memory not enough
#define ERR_FUNNOTSUPPORT 9 //the function not support
#define ERR_OPERATEFAILED 10 //something wrong with the operation
#define ERR_HANDLEAPIERROR 11 //the handle to okapi function wrong
#define ERR_DRVINITWRONG 12 //something wrong with driver initialize
#define ERR_RECTVALUEWRONG 13 //the rect set wrong
#define ERR_FORMNOTSUPPORT 14 //the form set not support by the board
#define ERR_TARGETNOTSUPPORT 15 //the target not support by this function
//--format defines
#define FORM_RGB888 1
#define FORM_RGB565 2
#define FORM_RGB555 3
#define FORM_RGB8888 4
#define FORM_RGB332 5
#define FORM_YUV422 6
#define FORM_YUV411 7
#define FORM_YUV16 8
#define FORM_YUV12 9
#define FORM_YUV9 10
#define FORM_YUV8 11
#define FORM_GRAY888 12
#define FORM_GRAY8888 13
#define FORM_GRAY8 14
#define FORM_GRAY10 15
#define FORM_GRAY12 16
#define FORM_GRAY16 17
//--mask command
#define MASK_DISABALE 0 //turn of mask
#define MASK_POSITIVE 1 //0 win clients visible, 1 video visible
#define MASK_NEGATIVE 2 //0 for video 1 for win client (graph)
//--tv system standard
#define TV_PALSTANDARD 0 //PAL
#define TV_NTSCSTANDARD 1 //NTSC
#define TV_NONSTANDARD 2 //NON_STD
#define TV_PALMAXWIDTH 768
#define TV_PALMAXHEIGHT 576
#define TV_NTSCMAXWIDTH 640 //720
#define TV_NTSCMAXHEIGHT 480
//-----defines lParam for get param
#define GETCURRPARAM -1
//-----sub-function defines for wParam of SetVideoParam
//wParam cab be one of the follow
#define VIDEO_RESETALL 0 //reset all to sys default
#define VIDEO_SOURCECHAN 1
// lParam=0,1.. Comp.Video; 0x100,101...to Y/C(S-Video), 0x200,0x201 to RGB Chan.Input
#define VIDEO_BRIGHTNESS 2 //LOWORD is brightness, for RGB HIWORD is channel (0:red, 1:green, 2:blue)
#define VIDEO_CONTRAST 3 //LOWORD is contrast, for RGB HIWORD is channel (0:red, 1:green, 2:blue)
#define VIDEO_COLORHUE 4
#define VIDEO_SATURATION 5
#define VIDEO_RGBFORMAT 6 //when return low word is code high word is bitcount
#define VIDEO_TVSTANDARD 7 //0 PAL, 1 NTSC, 2 Non-stadard
#define VIDEO_SIGNALTYPE 8 //LOWORD 0 non-interlaced, 1 interlaced
//HIWORD 0 no slot in field header, 1 yes
#define VIDEO_RECTSHIFT 9 //video rect shift, makelong (x,y)
#define VIDEO_SYNCSIGCHAN 10 //LOWORD 0:Red,1:Grn,2:Blue, 3:Sync,4 H.V.Sync;
//HIWORD is source 0,1,..for RGB input,
// 0x100,0x101,... for comp.video input
// (in this case LOWORD has no mean more)
#define VIDEO_SIGREFVOLTAGE 11
#define VIDEO_AVAILRECTSIZE 12 //makelong(horz,vert)
//horz available pixels per scan line and
//vert available lines per frame
#define VIDEO_FREQSEG 13 // set horz video frequency range
//0:Low(7.5~15MHz), 1:middle(15~30), 2:High(30~60)
#define VIDEO_LINEPERIOD 14 //line period (in 0.5 us) generated by board
#define VIDEO_FRAMELINES 15 //lines per frame generated by board
#define VIDEO_MISCCONTROL 16 //miscellaneous control bits
//-----sub-function defines for wParam of SetCaptureParam
//wParam cab be one of the follow
#define CAPTURE_RESETALL 0 //reset all to sys default
#define CAPTURE_INTERVAL 1
#define CAPTURE_CLIPMODE 2 //LOWORD: clip mode when video and dest rect not same size
//HIWORD: if captrure odd and even field crosslly
#define CAPTURE_SCRRGBFORMAT 3 //when return, loword=code, hiword=bits
#define CAPTURE_BUFRGBFORMAT 4
#define CAPTURE_FRMRGBFORMAT 5
#define CAPTURE_BUFBLOCKSIZE 6 //lParam=MAKELONG(width,height)
//if set it 0 (default), the rect set by user will be as block size
#define CAPTURE_HARDMIRROR 7 //bit0 x, bit1 y;
#define CAPTURE_SAMPVIALUT 8 //set sample via lut
#define CAPTURE_VIAKFILTER 9 //sample via recursion filter
#define CAPTURE_SAMPLEFIELD 10 //0 in field (non-interlaced), 1 in frame (interlaced), (0,1 are basic)
//2 in field but keep expend row,3 in field but interlaced one frame
//(2,4 can affect only sampllng field(frame) by field(frame) )
//in 3 up-dn frame
#define CAPTURE_HORZPIXELS 11 // set max horz pixel per scan line
#define CAPTURE_VERTLINES 12 // set max vert lines per frame
#define CAPTURE_ARITHMODE 13 //arithmatic mode
#define CAPTURE_TO8BITMODE 14 //the mode of high (eg. 10 bits) converted to 8bit
//HIWORD(lParam)=0: linear scale,
//HIWORD(lParam)!=0:clip mode, LOWORD(lParam)=offset
#define CAPTURE_SEQCAPWAIT 15 // bit0 if waiting finished for functions of sequence capturing and playbacking
//bit1 if waiting finished capture then call callback function
#define CAPTURE_MISCCONTROL 16 //miscellaneous control bits
#define SAMPLE_INFIELD 0 //in field (non-interlaced)
#define SAMPLE_INFRAME 1 //in frame of interlaced fields
//the above two (0,1) are basic
#define SAMPLE_FIELDEXP 2 //in field but expend (keep expend row)
#define SAMPLE_UPDNFRAME 3 //in frame of up-downed fields
#define SAMPLE_FIELDINTER 4 //in field but interlaced to one frame
//-----defines lParam for CAPTURE_CLIPMODE
#define RECT_SCALERECT 0
#define RECT_CLIPCENTER 1
#define RECT_FIXLEFTTOP 2
//in condition video rect great than screen rect:
//if RECT_SCALERECT video rect will be scaled to match screen rect if it can. else
//video rect will be adjusted to match screen rect
//(1: center, take center video rect 2: left-top fixed, take same size rect)
//-----sub-function defines for lParam of GetSignalParam
#define SIGNAL_VIDEOEXIST 1 //0 video absent, 1 exist
#define SIGNAL_VIDEOTYPE 2 //0 field, 1 interlaced
#define SIGNAL_SCANLINES 3 //scan lines per frame
#define SIGNAL_LINEFREQ 4 //line frequency
#define SIGNAL_FIELDFREQ 5 //frame frequency
#define SIGNAL_FRAMEFREQ 6 //frame frequency
#define SIGNAL_EXTTRIGGER 7 //extern trigger status, 1 trigger
#define SIGNAL_FIELDID 8 //Field ID 0 odd, 1 even
//-----sub-function defines for lEvent of WaitSignalEvent
#define EVENT_FIELDHEADER 1 //field header
#define EVENT_FRAMEHEADER 2 //frame header
#define EVENT_ODDFIELD 3 //odd field come
#define EVENT_EVENFIELD 4 //even field come
#define EVENT_EXTTRIGGER 5 //extern trigger come,
//(HIWORD(lEvent) is index)
//-----sub-function defines for lParam of okSetConvertParam
#define CONVERT_RESETALL 0 //reset all to sys default
#define CONVERT_FIELDEXTEND 1 //field extend
#define CONVERT_TAKECHANNEL 2 //take some one channel of r,g,b
#define CONVERT_HORZEXTEND 3 //horzental extend (integer times)
#define CONVERT_HORZSTRETCH 4 //horzental stretch (arbitrary number times)
//field extend mode
#define FIELD_JUSTCOPY 0 //just copy row by row
#define FIELD_COPYEXTEND 1 //copy one row and expend one row (x2)
#define FIELD_INTERLEAVE 2 //just copy odd(1.) rows (/2)
#define FIELD_INTEREXTEND 3 //copy one odd row and expend one row
#define FIELD_COPYINTERPOL 4 //copy one odd row and interpolate one row
#define FIELD_INTERINTERPOL 5 //copy odd row and interpolate even row
#define FIELD_INTEREVEN 6 //just copy even(2.) rows (/2)
#define FIELD_INTEREXTEVEN 7 //copy one even row and expend one row
#define FIELD_JUSTCOPYODD 8 //just copy odd rows to odd rows
#define FIELD_JUSTCOPYEVEN 9 //just copy even rows to even rows
#define FIELD_ODDEVENCROSS 10 //copy odd and even crossly
//-----defines for several target we can support
typedef LPARAM TARGET;
#define BUFFER (TARGET)1 //Buffer(physical) allocated from host memory
#define VIDEO (TARGET)0 //Video source input to the board
#define SCREEN (TARGET)-1 //Screen supported by VGA
#define FRAME (TARGET)-2 //Frame buffer on the board
#define MONITOR (TARGET)-3 //Monitor supported by (D/A) TV standard
#define USERMEMORY (TARGET)-4
#define USERFILE (TARGET)-5
#define SEQFILE 0x5153 //SQ
#define BMPFILE 0x4d42 //BM
#define BLKHEADER 0x4b42 //BK
#define BUFHEADER 0x4642 //BF
//-----defines messages for user
#define WM_CLOSEREPLAY WM_USER+100
//send this message when close replay dlg
#define WM_BEGINSEQPROC WM_USER+101
//begin seq proc, wParam=hBaord
#define WM_SEQPROGRESS WM_USER+102
//seq in progress, wParam=hBaord, lParam=No. to
#define WM_ENDSEQPROC WM_USER+103
//end seq proc, wParam=hBaord
//-----------struct defines---------------
//--app user used struct
typedef struct _boardtype {
short iBoardTypeCode; //ok board type code
char szBoardName[22]; //board name (eg."OK_M20H")
} BOARDTYPE, *LPBOARDTYPE; //24 bytes
//image file block size
typedef struct _blocksize {
short iWidth; //width
short iHeight; //height
short iBitCount; //pixel bytes iBitCount
short iFormType; //rgb format type, need to fill when RGB565 or RGB 555
long lBlockStep; //block stride (step to next image header)
//need to fill when treat multi block else set 0
}BLOCKSIZE;
//image block info
typedef struct _blockinfo {
short iType; //=BK or SQ, BM
//struct _blocksize;
short iWidth; //width
short iHeight; //height
short iBitCount; //pixel bytes iBitCount
short iFormType; //rgb format type, need to fill when RGB565 or RGB 555
short lBlockStep; //block stride (step to next image header)
short iHiStep;// HIWORD of block stride
short lTotal; //frame num
short iHiTotal;// HIWORD of total
short iInterval; //frame interval
LPBYTE lpBits;// image data pointer / file path name
LPBYTE lpExtra;// extra data (like as palette, mask) pointer
} BLOCKINFO, *LPBLOCKINFO;
//sequence file info
typedef struct { //file info for seq
short iType; //=SQ or BM
//struct _blocksize;
short iWidth; //width
short iHeight; //height
short iBitCount; //pixel bytes iBitCount
short iFormType; //rgb format type, need to fill when RGB565 or RGB 555
short lBlockStep; //block stride (step to next image header)
short iHiStep;// HIWORD of block stride
short lTotal; //frame num
short iHiTotal;// HIWORD of total
short iInterval; //frame interval
} SEQINFO;
//for replay
typedef struct { //file info for seq
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -