background image

 

 

Return Value 

    TRUE  

Function is successful 

 FALSE 

Function is failed 

 

Description 

This function will assign a buffer to store the data of video 
capture for a channel of video. 

 

See Also 

Adv_VAPI_SetCaptureWindow

Adv_VAPI_SetCaptureFile

Adv_VAPI_SetCaptureCallback

Adv_VAPI_GetCaptureStatus

 

                                           DVP-7020 User’s Manual 

42

Summary of Contents for DVP-7020

Page 1: ...DVP 7020 4 Channel PCI bus Video Grabber Card User s Manual ...

Page 2: ... from its use Acknowledgments DVP 7020 is a trademark of Advantech Co Ltd IBM and PC are trademarks of International Business Machines Corporation MS DOS Windows Microsoft Visual C and Visual BASIC are trademarks of Microsoft Corporation Intel and Pentium are trademarks of Intel Corporation Delphi and C Builder are trademarks of Inprise Corporation CE notification The DVP 7020 developed by ADVANTE...

Page 3: ... 1 SUMMARY TABLES 12 2 2 PROGRAMMING FUNCTIONS REFERENCE 15 Adv_VAPI_Init 15 Adv_VAPI_Close 17 Adv_VAPI_SetCurrentPort 18 Adv_VAPI_GetCurrentCard 19 Adv_VAPI_GetCurrentPort 20 Adv_VAPI_SetPortType 21 Adv_VAPI_GetPortType 24 Adv_VAPI_SetVideoFormat 26 Adv_VAPI_SetCaptureSize 27 Adv_VAPI_GetVideoFormat 29 Adv_VAPI_GetCaptureSize 30 Adv_VAPI_SetBrightness 31 Adv_VAPI_SetSaturation 32 Adv_VAPI_SetCont...

Page 4: ...PI_GetCaptureStatus 47 Adv_VAPI_SetCaptureSource 48 Adv_VAPI_GetCaptureSource 49 Adv_VAPI_CaptureStart 50 Adv_VAPI_EnableVideoSource 51 Adv_VAPI_GetVideoSignal 52 Adv_VAPI_CaptureStop 53 Adv_VAPI_GPIOInit 54 Adv_VAPI_GPIOGetDirect 55 Adv_VAPI_SetGPIOData 56 Adv_VAPI_GetGPIOData 57 Adv_VAPI_SetWDT 58 Adv_VAPI_ErrorMsg 59 Adv_VAPI_GetLastError 60 ...

Page 5: ...1 CHAPTER General Information ...

Page 6: ...viding high quality and raising reliability to a new level allowing OEMs and system integrators to build powerful yet cost effective surveillance solutions The following sections of this chapter will provide further information about features of the multifunction cards a Quick Start for installation together with some brief information on software and accessories for the DVP 7020 card 1 1 Hardware...

Page 7: ...1 3 Block Diagram DVP 7020 3 ...

Page 8: ... Connector Location Video Input1 4 Ext board GPIO Reset 1 5 Packing List DVP 7020 PCI bus Video Capture card CD Disk for manual driver SDK User s Manual Reboot Cable for Watchdog function DVP 7020 User s Manual 4 ...

Page 9: ... O connector signal descriptions Pi n Function Pi n Function Pi n Function Pi n Function 1 GPIO_8 9 GPIO_12 17 GND 25 GND 2 GND 10 GND 18 GPIO_7 26 GPIO_3 3 GPIO_9 11 GPIO_13 19 GND 27 GND 4 GND 12 GND 20 GPIO_6 28 GPIO_2 5 GPIO_10 13 GPIO_14 21 GND 29 GND 6 GND 14 GND 22 GPIO_5 30 GPIO_1 7 GPIO_11 15 GPIO_15 23 GND 31 GND 8 GND 16 GND 24 GPIO_4 32 GPIO_0 1 8 Hardware Installation 1 Turn off your ...

Page 10: ...d 8 Replace the cover of your computer chassis 9 Plug in the power cord and turn on the computer 10 Remove the original BT878 driver before the card installed if it is present Note Keep the anti static bag for future use You might need the original bag to store the card if you have to remove the card from the PC or transport it elsewhere 1 9 Software Driver Installation Before you begin To facilit...

Page 11: ...talled in the system prior to installing the enhanced display drivers In addition many of the installation procedures assume that you are familiar with both the relevant software applications and operating system commands Installing 1 Insert the driver CD into your system s CD ROM drive In a few seconds the software installation main menu appears Move the mouse cursor over the Manual button under ...

Page 12: ...2 Click Next when you see the following message 3 Click Next when you see the following message DVP 7020 User s Manual 8 ...

Page 13: ...4 Click Next when you see the following message 5 When the following message appears click Finish to complete the installation and restart Windows 9 ...

Page 14: ......

Page 15: ...2 CHAPTER Functions Library ...

Page 16: ... Adv_VAPI_SetCurrentPort Set the current card number and port number Adv_VAPI_GetCurrentCard Get current card number Adv_VAPI_GetCurrentPort Get current port number Adv_VAPI_SetPortType Assign a device to the current port Adv_VAPI_GetPortType Get the current device on the current port Adv_VAPI_SetVideoFormat Set the video format on the current port Adv_VAPI_SetCaptureSize Set the video capturing s...

Page 17: ...e for a specified channel Adv_VAPI_GetContrast Get the video contrast value for a specified channel Adv_VAPI_GetHue Get the video hue value for a specified channel Channel Capture Setting Functions Name Description Adv_VAPI_SetCaptureWind ow Set the video capturing window handle to a specified channel Adv_VAPI_SetCaptureBuf Set the video capturing buffer address to a specified channel Adv_VAPI_Set...

Page 18: ...escription Adv_VAPI_SetWDT Set the watchdog state on the current port Error Debug Functions Name Description Name Description Adv_VAPI_SetCaptureSource Set the video capture source on the current port Adv_VAPI_GetCaptureSource Get the video capture source on the current port Adv_VAPI_CaptureStart Start the video capture on the current port Adv_VAPI_CaptureStop Stop the video capture on the current...

Page 19: ...on Adv_VAPI_Init var dwVer Longword Boolean VB function Adv_VAPI_Init ByRef pdwVer As Long As Boolean Parameters pdwVer Specifies the pointer of DWORD It will be assigned to the version number of this library For example if assigned value 0x10000 it represents Version 1 00 Now the version is 0x10000 Return Value TRUE Initialization is successful FALSE Initialization is failed Description This func...

Page 20: ... if Adv_VAPI_Init dwVer Success else Fail Adv_VAPI_GetLastError NULL See Also Adv_VAPI_Close DVP 7020 User s Manual 16 ...

Page 21: ...d Delphi procedure Adv_VAPI_Close VB sub Adv_VAPI_Close Parameters None Return Value None Description This function will release the library variables and functions You must call this function before closing the application See Also Adv_VAPI_Init 17 ...

Page 22: ...er to current virtual card number Its range is from 0 to 3 nPortID Set a port number to current virtual port number Its range is from 0 to 3 Return Value TRUE Function is successful FALSE Function is failed Description This function will assign a card number and port number to current virtual port With DVP 7020 card serials a physical card has four ports There are 1 4 video channels on each physic...

Page 23: ...tion Adv_VAPI_GetCurrentCard Integer VB function Adv_VAPI_GetCurrentCard As Integer Parameters None Return Value The current card number its range is 0 to 3 Description This function will return the current card number See Also Adv_VAPI_SetCurrentPort Adv_VAPI_GetCurrentPort 19 ...

Page 24: ...PI_GetCurrentPort Integer VB function Adv_VAPI_GetCurrentPort As Integer Parameters None Return Value The current port number the range is 0 to 3 Description This function will return the current port number See Also Adv_VAPI_SetCurrentPort Adv_VAPI_GetCurrentCard DVP 7020 User s Manual 20 ...

Page 25: ...evice V_ADV7010_0 DVP 7010 Card 0 V_ADV7010_1 DVP 7010 Card 1 V_ADV7010_2 DVP 7010 Card 2 V_ADV7010_3 DVP 7010 Card 3 V_ADV7020_0_0 DVP 7020 Card 0 Port 0 V_ADV7020_0_1 DVP 7020 Card 0 Port 1 V_ADV7020_0_2 DVP 7020 Card 0 Port 2 V_ADV7020_0_3 DVP 7020 Card 0 Port 3 V_ADV7020_1_0 DVP 7020 Card 1 Port 0 V_ADV7020_1_1 DVP 7020 Card 1 Port 1 V_ADV7020_1_2 DVP 7020 Card 1 Port 2 V_ADV7020_1_3 DVP 7020 ...

Page 26: ...dwVer Success if Adv_VAPI_SetCurrentPort 0 0 Set virtual port as 0 0 Adv_VAPI_GetLastError NULL if Adv_VAPI_SetPortType V_ADV7010_3 Set DVP 7010 Card 3 to current virtual port 0 0 Adv_VAPI_GetLastError NULL if Adv_VAPI_SetCurrentPort 0 1 Set virtual port as 0 1 Adv_VAPI_GetLastError NULL if Adv_VAPI_SetPortType V_ADV7010_2 Set DVP 7010 Card 2 to current virtual port 0 1 Adv_VAPI_GetLastError NULL ...

Page 27: ...23 ...

Page 28: ...e the following list V_TYPENONE no device V_ADV7010_0 DVP 7010 Card 0 V_ADV7010_1 DVP 7010 Card 1 V_ADV7010_2 DVP 7010 Card 2 V_ADV7010_3 DVP 7010 Card 3 V_ADV7020_0_0 DVP 7020 Card 0 Port 0 V_ADV7020_0_1 DVP 7020 Card 0 Port 1 V_ADV7020_0_2 DVP 7020 Card 0 Port 2 V_ADV7020_0_3 DVP 7020 Card 0 Port 3 V_ADV7020_1_0 DVP 7020 Card 1 Port 0 V_ADV7020_1_1 DVP 7020 Card 1 Port 1 V_ADV7020_1_2 DVP 7020 C...

Page 29: ...rd 3 Port 1 V_ADV7020_3_2 DVP 7020 Card 3 Port 2 V_ADV7020_3_3 DVP 7020 Card 3 Port 3 Return Value TRUE Function is successful FALSE Function is failed Description This function will assign a physical port to current virtual port See Also Adv_VAPI_SetVideoFormat Adv_VAPI_SetCaptureSize Adv_VAPI_GetVideoFormat Adv_VAPI_GetCaptureSize 25 ...

Page 30: ... format on current physical port Its values are as follows AnalogVideo_None None AnalogVideo_NTSC_M NTSC format AnalogVideo_PAL_B PAL format Return Value TRUE Function is successful FALSE Function is failed Description This function will assign the video format to the current port The default value of video format is AnalogVideo_NTSC_M See Also Adv_VAPI_SetPortType Adv_VAPI_SetCaptureSize Adv_VAPI...

Page 31: ...x240 16 BPP SIZE320X240_16BPP size resolution as 320x240 16 BPP SIZE160X120_16BPP size resolution as 160x120 16 BPP SIZE320X240_24BPP size resolution as 320x240 24 BPP SIZE160X120_24BPP size resolution as 160x120 24 BPP SIZE640X240_24BPP size resolution as 640x240 24 BPP Return Value TRUE Function is successful FALSE Function is failed Description This function will assign the video capturing size...

Page 32: ...DVP 7020 User s Manual 28 ...

Page 33: ...oFormat As Integer Parameters None Return Value The video format its value is one of the following AnalogVideo_None None AnalogVideo_NTSC_M NTSC format AnalogVideo_PAL_B PAL format Description This function will return the video format of the current port See Also Adv_VAPI_SetPortType Adv_VAPI_SetCaptureSize Adv_VAPI_SetVideoFormat Adv_VAPI_GetCaptureSize 29 ...

Page 34: ...n as 640x240 16 Bpp SIZE320X240_16BPP size resolution as 320x240 16 Bpp SIZE160X120_16BPP size resolution as 160x120 16 Bpp SIZE320X240_24BPP size resolution as 320x240 24 Bpp SIZE160X120_24BPP size resolution as 160x120 24 Bpp SIZE640X240_24BPP size resolution as 640x240 24 Bpp Description This function will return the video capturing size of the current port See Also Adv_VAPI_SetPortType Adv_VAP...

Page 35: ...o channel number on current physical port The range is 0 3 nValue Specifies the brightness of the video channel on current physical port The range is 0 10000 0 means deep dark and 10000 means more brightness Return Value TRUE Function is successful FALSE Function is failed Description This function will assign the brightness of video channel on the current port The default brightness value of a vi...

Page 36: ...mber on current physical port Its range is 0 3 nValue Specifies the saturation of the video channel on current physical port Its range is 0 10000 0 means deep dark and 10000 means more saturation Return Value TRUE Function is successful FALSE Function is failed Description This function will assign the saturation of video channel on the current port The default saturation value of a video channel ...

Page 37: ... channel number on current physical port Its range is 0 3 nValue Specifies the contrast of the video channel on current physical port Its range is 0 10000 0 means deep dark and 10000 means more contrast Return Value TRUE Function is successful FALSE Function is failed Description This function will assign the contrast of video channel on the current port The default contrast value of a video chann...

Page 38: ...r on current physical port Its range is 0 3 nValue Specifies the hue of the video channel on current physical port Its range is 0 10000 0 means deep dark and 10000 means more hue Return Value TRUE Function is successful FALSE Function is failed Description This function will assign the hue of video channel on the current port The default hue value of a video channel is 5000 See Also Adv_VAPI_SetSa...

Page 39: ... on current physical port Its range is 0 3 pnValue Specifies the address of returned brightness value of the video channel on current physical port The range of its value is 0 10000 0 means deep dark and 10000 means more brightness Return Value TRUE Function is successful FALSE Function is failed Description This function will return the brightness value of video channel on the current port The de...

Page 40: ...t physical port Its range is 0 3 pnValue Specifies the address of returned saturation value of the video channel on current physical port Its range of value is 0 10000 0 means deep dark and 10000 means more saturation Return Value TRUE Function is successful FALSE Function is failed Description This function will return the saturation value of video channel on the current port The default saturati...

Page 41: ...er on current physical port Its range is 0 3 pnValue Specifies the address of returned contrast of the video channel on current physical port Its range of the value is 0 10000 0 means deep dark and 10000 means more contrast Return Value TRUE Function is successful FALSE Function is failed Description This function will return the contrast value of video channel on the current port The default cont...

Page 42: ...nt physical port Its range is 0 3 pnValue Specifies the address of returned hue of the video channel on current physical port Its range of the value is 0 10000 0 means deep dark and 10000 means more hue Return Value TRUE Function is successful FALSE Function is failed Description This function will return the hue of video channel on the current port The default hue value of a video channel is 5000...

Page 43: ... Its range is 0 3 hWnd Specifies the capture window handle for the video channel on current physical port If the handle is NULL the capture window of video channel will be canceled nFrameCount Specifies total frame number to capture If the value is ALWAYS_CAPTURE the capture frame is endless pCall Pointer to callback function to notify the capture completed The function should be declared as follo...

Page 44: ... This function will assign a window handle to display the data of video capture for a channel of video See Also Adv_VAPI_SetCaptureBuf Adv_VAPI_SetCaptureFile Adv_VAPI_SetCaptureCallback Adv_VAPI_GetCaptureStatus DVP 7020 User s Manual 40 ...

Page 45: ... range should be 0 3 pBuf Specifies the capture buffer for the video channel on current physical port If the buffer address is NULL the capture buffer of video channel will be canceled dwSize Specifies total number of buffer You should allocate enough space to buffer nFrameCount Specifies total frame number to capture If the value is ALWAYS_CAPTURE the capture frame is endless pCall Pointer to cal...

Page 46: ...n is failed Description This function will assign a buffer to store the data of video capture for a channel of video See Also Adv_VAPI_SetCaptureWindow Adv_VAPI_SetCaptureFile Adv_VAPI_SetCaptureCallback Adv_VAPI_GetCaptureStatus DVP 7020 User s Manual 42 ...

Page 47: ... on current physical port Its range should be 0 3 fileName Specifies the filename for the video channel on current physical port If filName is NULL the capture file of video channel will be canceled nFrameCount Specifies total frame number to capture If the value is ALWAYS_CAPTURE the capture frame is endless fileFormat Defines the capture file format There are two types here RAW_DATA stream raw d...

Page 48: ...pleted Return Value TRUE Function is successful FALSE Function is failed Description This function will assign a window handle to the channel of video See Also Adv_VAPI_SetCaptureBuf Adv_VAPI_SetCaptureWindow Adv_VAPI_SetCaptureCallback Adv_VAPI_GetCaptureStatus DVP 7020 User s Manual 44 ...

Page 49: ... video channel number on current physical port Its range should be 0 3 pCall Pointer to callback function to notify the capture one frame The function should be declared as follows HRESULT CALLBACK YourCallBackProc BYTE pImgBuffer BYTE pVdoSrc LPVOID lpParam pImgBuffer pointer of capture frame buffer pVdoSrc reserved lpParam pointer to the lpParam of this function lpParam Specifies the callback pr...

Page 50: ...ction will define the callback procedure to capture the frame data of a channel of video See Also Adv_VAPI_SetCaptureBuf Adv_VAPI_SetCaptureFile Adv_VAPI_SetCaptureWindow Adv_VAPI_GetCaptureStatus DVP 7020 User s Manual 46 ...

Page 51: ...eturn Value The value is DEST_NONE or the combination of the following values DEST_BUF capture buffer function is not completed DEST_CALLBACK capture callback function is not completed DEST_FILE capture file function is not completed DEST_HWND capture window function is not completed DEST_RUN capture function for the port is still active Description This function will return the capture status of ...

Page 52: ...t Its valid value is the following V_CVBS_0 set video source as channel 0 V_CVBS_1 set video source as channel 1 V_CVBS_2 set video source as channel 2 V_CVBS_3 set video source as channel 3 V_POLLING_ALL set video source polling from channel 0 to 3 Return Value TRUE Function is successful FALSE Function is failed Description This function will assign a video source on the current physical port Th...

Page 53: ...t physical port It will return a valid value as one of the following V_CVBS_0 set video source as channel 0 V_CVBS_1 set video source as channel 1 V_CVBS_2 set video source as channel 2 V_CVBS_3 set video source as channel 3 V_POLLING_ALL set video source polling from channel 0 to 3 Return Value TRUE Function is successful FALSE Function is failed Description This function will return a video sour...

Page 54: ...ameCount As Integer As Boolean Parameters nFrameCount Specifies total frame number to capture If the value is ALWAYS_CAPTURE the capture frame is endless Return Value TRUE Function is successful FALSE Function is failed Description This function will begin the capture function on current physical port See Also Adv_VAPI_SetCaptureSource Adv_VAPI_CaptureStop DVP 7020 User s Manual 50 ...

Page 55: ...channel number The valid value is one of the following V_CVBS_0 channel number 0 V_CVBS_1 channel number 1 V_CVBS_2 channel number 2 V_CVBS_3 channel number 3 bEnable Switch the video source on or off If the value is TRUE specified video source is on otherwise is off Return Value TRUE Function is successful FALSE Function is failed Description This function will switch the video source channel on ...

Page 56: ...fy the pointer of returned video signal value If the value id TRUE the physical port has signal from input otherwise the physical port has not signal from input Return Value TRUE Function is successful FALSE Function is failed Description This function will get the video signal from input on current physical port Remark This function is only for DVP 7020 card 0 3 port 0 3 See Also Adv_VAPI_Capture...

Page 57: ...CaptureStop Boolean VB function Adv_VAPI_CaptureStop As Boolean Parameters None Return Value TRUE Function is successful FALSE Function is failed Description This function will stop the capture function on current physical port See Also Adv_VAPI_CaptureStart Adv_VAPI_SetCaptureSource 53 ...

Page 58: ...8 there are 16 GPIO pins Every bit means a GPIO pin If the bit is set to 1 the GPIO pin is set to output If the bit is set to 0 the GPIO pin is set to input Return Value TRUE Function is successful FALSE Function is failed Description This function will initialize direction of the GPIO pins For example Adv_VAPI_GPIO 0xff00 set the bit 8 15 as output pins bit 0 7 as input pins See Also Adv_VAPI_Set...

Page 59: ...ers pdwDirect Specifies the address of returned direction of GPIO pins In the BT878 there are 16 GPIO pins Every bit means a GPIO pin If the bit is set to 1 the GPIO pin is set to output If the bit is set to 0 the GPIO pin is set to input Return Value TRUE Function is successful FALSE Function is failed Description This function will return direction of the GPIO pins See Also Adv_VAPI_SetGPIOData ...

Page 60: ... As Boolean Parameters dwValue Set the value of GPIO output pins Return Value TRUE Function is successful FALSE Function is failed Description This function will set the value of GPIO output pins For example Adv_VAPI_GPIOInit 0xff00 Adv_VAPI_SetGPIOData 0x00 set the bit 8 15 as output pins and their states are on low See Also Adv_VAPI_GPIOInit Adv_VAPI_GetGPIOData DVP 7020 User s Manual 56 ...

Page 61: ...lue As Long As Boolean Parameters pdwValue Pointer to state value of GPIO input pins Return Value TRUE Function is successful FALSE Function is failed Description This function will get the value of GPIO input pins For example Adv_VAPI_GPIOInit 0xff00 Adv_VAPI_GetGPIOData dwValue set the bit 0 7 as input pins and get their states See Also Adv_VAPI_GPIOInit Adv_VAPI_SetGPIOData 57 ...

Page 62: ...chdog state Its value is as follows WDT_START Start the watchdog function WDT_CLEAR Trigger the watchdog signal WDT_STOP Stop the watchdog function Return Value TRUE Function is successful FALSE Function is failed Description This function will set watchdog state If you set the watchdog function to start you must call clear function in every 5 seconds until you call stop function DVP 7020 User s M...

Page 63: ...edure Adv_VAPI_ErrorMsg hWwnd HWND VB sub Adv_VAPI_ErrorMsg ByVal Hwnd As Long Parameters hWnd Specify parent window of the display message window Return Value None Description This function will display the DialogBox to show error message See Also Adv_VAPI_GetLastError 59 ...

Page 64: ...STEMDEVICEENUM ERROR_VAPI_CREATECLASSENUM ERROR_VAPI_NODEVICEFORCAPTURE ERROR_VAPI_NOMATCHFILTER ERROR_VAPI_COINITIALIZE ERROR_VAPI_INITIALIZEPV ERROR_VAPI_UNINTIALIZE ERROR_VAPI_FILTERGRAPH ERROR_VAPI_CAPTUREGRAPHBUILDER ERROR_VAPI_CALLBACKRENDER ERROR_VAPI_FILTERADDCALLBACKRENDER ERROR_VAPI_QUERYCALLBACKRENDER ERROR_VAPI_QUERYMEDIACONTROL ERROR_VAPI_QUERYMEDIAEVENT ERROR_VAPI_SETFILTERGRAPH ERRO...

Page 65: ...R_VAPI_TVFORMATSETFAIL ERROR_VAPI_VSCUNINIT ERROR_VAPI_VSCGETFORMAT ERROR_VAPI_MEDIACONTROLUNINIT ERROR_VAPI_CARDID ERROR_VAPI_CHANNELINVALID ERROR_VAPI_MEDIACONTROLRUN ERROR_VAPI_FILENAMEINVALID Description This function will return a error code if function call failed See Also Adv_VAPI_ErrorMsg 61 ...

Reviews: