⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 okapi32.h

📁 CONAXCA的源代码
💻 H
📖 第 1 页 / 共 3 页
字号:

//---------------okapi32.h---------------------------------
//
// ok api32 header file for user
//
//---------------------------------------------------------

#ifndef __JOINHOPE__
#define __JOINHOPE__


//----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_M90					1090

#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
#define		OK_RGB10A				3011
#define		OK_RGB20A				3021



//--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;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -