Dual-core intel atom epic sbc with h.264 hardware video decoder (68 pages)
Summary of Contents for ADLINK Technology RTV Series
Page 1
RTV Series Multi-Channel Real-Time Video Frame Grabber Series User’s Manual Manual Rev. 2.03 Revision Date: April 22, 2009 Part No: 50-1R001-1010 Advance Technologies; Automate the World.
Page 2
Copyright 2009 ADLINK TECHNOLOGY INC. All Rights Reserved. The information in this document is subject to change without prior notice in order to improve reliability, design, and function and does not represent a commitment on the part of the manufacturer.
Page 3
Getting Service from ADLINK Customer Satisfaction is top priority for ADLINK Technology Inc. Please contact us should you require any service or assistance. ADLINK TECHNOLOGY INC. Web Site: http://www.adlinktech.com Sales & Service: Service@adlinktech.com TEL: +886-2-82265877 FAX: +886-2-82265717 Address: 9F, No. 166, Jian Yi Road, Chungho City,...
Introduction The RTV series acquisition board is designed without compromise for security and video surveillance applications as a PC-based multiple channel digital video recorder. This 32-bit/64bit, 33MHz/66MHz PCI/cPCI/PMC bus frame grab- ber simultaneously captures four video analog streams in real- time.
Automatic chrominance gain control. 1.1.2 I/O Lines The RTV series is fitted with TTL compatible I/O lines protected against overloads and electrostatic discharges. Each line may be configured as an input or output. They can be used to trigger acquisition or report alarm signals.
Angelo RTV series (RTV-24, cRTV-24, cRTV-44 and PMC-RTV21/G). VIs for Windows 98/NT/2000/XP operation sys- tems and LabView™ sample programs are provided for users' ref- erence. 1.2 Applications PC Based Surveillance System Digital Video Recorder (DVR) Factory Monitoring System ...
Video Input Four composite video color digitizers Video input interface: Four composite BNC connectors Coaxial cable suggested Channel Extension Expandable to up to 16 channels Channel extension interface: 10-pin ribbon cable to on-board 10-pin header connector ...
Figure 2-2: Trigger Signal Waveform User EEPROM Includes 1kbit available EEPROM RTV-24 Standard Accessories Watchdog reset cable GPIO bracket User Manual All in One CD RTV-24 Connectors & Pin Definitions Connector Definition Video IN – CH 0 Video IN –...
Function Function CH4 video in CH5 video in CH6 video in CH7 video in Table 2-3: Channel Extension Video Input (CN2) Function Function CH8 video in CH9 video in CH10 video in CH11 video in Table 2-4: Channel Extension Video Input (CN3) Hardware Reference...
Function Function CH12 video in CH13 video in CH14 video in CH15 video in Table 2-5: Channel Extension Video Input (CN5) Function Function IN0 (External interrupt) OUT0 Software Trigger 0 IN1 (External interrupt) Software Trigger 1 OUT1 Table 2-6: GPIO (CN8) Hardware Reference...
2.1.2 RTV-24 Specifications Video Input Four composite video color digitizers Video input interface: Four composite BNC connectors Coaxial cable suggested Channel Extension Expandable to up to 16 channels Channel extension interface: 10-pin ribbon cable to on-board 10-pin header connector ...
Figure 2-3: Trigger Signal Waveform User EEPROM Includes 1kbit available EEPROM Form Factor 32-bit, 33MHz PCI half-size board Figure 2-4: RTV-24 Appearance Dimensions W x L: 106.68(mm) x 174.62(mm) Operating Environment Temperature: 0 to 55°C Humidity: 5 to 90% RHNC ...
Storage Environment Temperature: 0 to 70°C Humidity: 0 to 95% RHNC Power Requirements +5V max. 1.5A +3.3 V max. 0.5A RTV-24 Standard Accessories Watchdog reset cable GPIO bracket User Manual All in One CD ...
Function Function CH4 video in CH5 video in CH6 video in CH7 video in Table 2-11: Channel Extension Video Input (CN2) Function Function CH8 video in CH9 video in CH10 video in CH11 video in Table 2-12: Channel Extension Video Input (CN3) Hardware Reference...
Function Function CH12 video in CH13 video in CH14 video in CH15 video in Table 2-13: Channel Extension Video Input (CN5) Function Function IN0 (External interrupt) OUT0 Software Trigger 0 IN1 (External interrupt) Software Trigger 1 OUT1 Table 2-14: GPIO (CN8) Hardware Reference...
2.1.3 RTV-E4 Extension Board (Optional) Figure 2-5: RTV-E4 Appearance RTV-E4 Connectors & Pin Definitions Function Function CH4 video in CH5 video in CH6 video in CH7 video in Table 2-17: Channel Extension Video Input (CN11) Hardware Reference...
Figure 2-7: Relay Address Jumpers Relay I/O voltage requirements Input:+5V to +24V Output:AC: 0.5A/125V, DC: 1A/30V or 0.3A/100V STRG output signal select: STRG output signal types: Active high or Active low Signal names: STRG_OUT1, STRG_OUT2, STRG_OUT3, STRG_OUT4 Jumper addresses: J1, J2, J3, J4 ...
2.2 cRTV Series 2.2.1 cRTV-24 Specifications Video Input Four composite video color digitizers Video input interface: Four composite BNC connectors Channel status report LED Coaxial cable recommended Channel Extension Expandable to up to 8 channels Channel extension interface ...
Dimensions W x L: 160(mm) x 100(mm) Operating Environment Temperature: 0 to 55°C Humidity: 5 to 90% RHNC Storage Environment Temperature: 0 to 70°C Humidity: 0 to 95% RHNC Power Requirements +5V max. 1.5A +3.3 V max.
2.2.2 cRTV-44 Specifications Video Input Four composite video color digitizers Video input interface: Four composite BNC connectors Channel status report LED Coaxial cable recommended General Purpose I/O Lines All I/O lines are TTL compatible with 4 input, 4 output, and 4 ...
Function Function CH4 video in CH5 video in CH6 video in CH7 video in Table 2-27: Channel Extension Video Input (CN8) GPIO 0 Pins IN0 and OUT0 are used by channel 0 Pins IN1 and OUT1 are used by channel 1 ...
2.3 PMC-RTV Series 2.3.1 PMC-RTV21 Specifications Video Input Four composite video color digitizers Video input interface: DB-9 female connectors Coaxial cable recommended General Purpose I/O Lines The I/O lines are TTL compatible with 1 input and 1 output ...
PMC-RTV21 Connectors & Pin Definition Figure 2-12: PMC-RTV21 Video Input & GPIO Function Function CH0 Video In CH1 Video In CH2 Video In CH3 Video In Table 2-31: Video Input Hardware Reference...
2.3.2 PMC-RTV24 Specifications Dimensions W x L: 74(mm) x 149(mm) Operating Environment Temperature: 0 to 55°C Humidity: 5 to 90% RHNC Storage Environment Temperature: 0 to 70°C Humidity: 0 to 95% RHNC Power Requirements +5V max. 1.5A ...
Page 50
General Purpose I/O Lines The I/O lines are TTL compatible with 1 input and 1 output GPIO interface: One DB-15 male connector The I/O lines are internally pulled up and have the fol- low¬ing characteristics: Hardware Reference...
Voltage Input high voltage (20 uA) 2.0V 5.25V Table 2-33: GPIO Characteristics Voltage Input low voltage (-0.2 uA) 0.0V 0.80V Input high voltage (-1.0 mA) 5.0V Output low voltage (100.0 mA) 0.5V Table 2-34: GPIO Characteristics User EEPROM Includes 1kbit available EEPROM ...
Function Function CH0 Video In CH1 Video In CH2 Video In CH3 Video In Table 2-35: Video Input Function Function PIN Function IN0 (External interrupt) +5V output(Max.1A) OUT0 IN1 (External interrupt) OUT1 IN2 (External interrupt) OUT2 IN3 (External interrupt) OUT3 Table 2-36: GPIO Pin-out Hardware Reference...
Installation Guide 3.1 Hardware Installation 3.1.1 RTV Series Use the following steps to install the RTV series board on the PCI bus: 1. Remove the computer cover using the instructions from the computer manual. 2. Check that there is an empty PCI (32-bit) slot t accom- modate the board.
6. Anchor the board by replacing the screw. 7. Connect your video sources for image acquisition tests. For details, refer to the ‘ViewCreator Utility.” 8. Turn on the computer. In some cases, when the com- puter boots up, the “Plug and Play” feature of Windows will detect the new PCI card 8 times (4 videos and 4 audios) and you will require drivers.
Figure 3-3: cRTV-44 (6U cPCI) 5. Carefully slide the cRTV-24 (3U)/cRTV-44 (6U) along the guide of the chosen slot to the backplane and push the board firmly but carefully into the connector, Lock the board in place by pushing the release lever outwards. 6.
The PMC socket may be integrated with the cPCI CPU board or as a standalone system board for an embedded system. Use the following steps to install the PMC-RTV series board onto the PMC socket: 1. Remove the computer cover using the instructions from the computer manual.
3.1.4 RTV-E4 Extension Board (Optional) 1.For main board installation, please refer to ‘RTV series’. 2.Each RTV-E4 will attach one signal cable for connect with RTV- 24 as below Figure 3-4: RTV-E4 Attachment Installation Guide...
3.1.5 RTV-I4 Extension Board (Optional) 1.For main board installation, please refer to ‘RTV series’. 2.Each RTV-I4 will attach one signal cable for connect with RTV- 24 as below Figure 3-5: RTV-I4 Attachment Installation Guide...
Page 63
3. Click yes and restart system. 4. Open the Device Manager and check for the following 8 items: ADLINK Angelo Audio Device (4 instances) ADLINK Angelo Video Device (4 instances) Installation Guide...
Page 64
The Device Manager should be as follows: Installation Guide...
Page 65
Note: If using Windows Vista, the User Account Control (UAC) needs to be turned off before using the device. To turn off the UAC, go to [Start] - [Settings] - [Control Panel] - [User Ac- counts] - [Turn User Account Control on or off]. Uncheck the UAC and restart the computer, then the device can work nor- mally.
Page 68
3. When the following window appears, please click “Con- tinue Anyway”. Installation Guide...
Page 69
4. Open the Device Manager and check for the following 8 items: ADLINK Bt878 DirectX Audio Capture (4 instances) ADLINK Bt878 DirectX Video Capture (4 instances) Installation Guide...
Page 70
The Device Manager should be as follows: Installation Guide...
3.2.3 RTV-LVIEW Installation 1. Double-click the setup.exe file to start RTV-LVIEW installation. 2. Continuously click the Next button to install RTV-LVIEW. Installation Guide...
Page 72
3. Click the Finish button to finish the installation. Installation Guide...
3.2.4 Uninstall RTV-LVIEW Open the Control Panel and double-click Add/Remove Pro- grams. Select RTV-LVIEW and click the Change/Remove button to uninstall it. After un-installation, all files in the directory of RTV-LVIEW will be removed, except the ADLINK_Vision palette. If you do not want to use it any more, you can remove the Angelo.llb in the user.lib folder and the menus\ADLINK_Vision folder.
3.2.5 Linux Driver Installation The driver is compiled as a kernel module and works for kernel version 2.6. Compile bttv for your system BTTV is an open source driver and conforms to Video for Linux standard. 1. Open a terminal console and enter the following com- mands to start installation: 2.
Page 75
7. Restart the computer. The driver should be loaded auto- matically while booting. Enter the following command to see if the driver was loaded: # lsmod | grep bttv 8. If there is a bttv module, the driver is loaded success- fully.
ViewCreatorPro Utility Once hardware installation is complete, ensure that they are con- figured correctly before running the ViewCreatorPro utility. This chapter outlines how to establish a vision system and hot to manu- ally controlling Angelo series cards to verify correct operation. ViewCreatorPro provides a simple yet powerful means to setup, configure, test, and debug the vision system.
4.3 Operation Theory ViewCreatorPro provides many functions for the Angelo RTV series cards as described below: 4.3.1 Devices Panel Local Current active Device All operations will apply to this device. Inactive Device Click the port after this icon to activate this device. Current active port All operations will apply to this port.
4.3.2 Adjustment Panel A panel allows user adjusting video images. Click and hold the left mouse button on the slider of the Adjustment Panel and drag the cursor to change its value. Or type value into the edit tool to change its value directly.
Page 81
Original Size Restore the images which are selected to original size. The images which are selected will have a blue frame. Zoom In Zoom in the images which are selected. The images which are selected will have a blue frame. Zoom Out Zoom in the images which are selected.
Page 82
After stopping grabbing, the background color of focus value win- dow is black. The x-axis size is the width of the whole image. The window is shown below: If the image is chromatic and is RGB type, there are three curves represented red, green, and blue individual in the chart.
Page 83
If the image is chromatic and is YUV type, there are three curves represented y, u, and v individual in the chart. The window is shown below: Zoom In Open a window to zoom in the green rectangle region. Differential Open a window to show the slop of the line for the green rectangle region.
Show/Hide Y Values Show or hide the y value of the pixels. Show/Hide U Values Show or hide the u value of the pixels. Show/Hide V Values Show or hide the v value of the pixels. Focus Cross See pixel values of the selected point of the image on toolbar. The display image shows a blue cross line on it.
4.3.5 Display Panel Press left mouse button on the image and then there will be a blue frame around the image. It means the image is selected. If user wants select more images, please keep pressing Ctrl and click the other images.
Page 86
Press left mouse button and then drag it, display panel will appear a green rectangle region which will be zoomed in. Keep pressing Shift during dragging, the image will be zoomed in at the same proportion of width and height. Shown below: Press right mouse button, the cursor will become a move2D icon.
4.3.6 Main Menu File menu Open Image Open an image from a file and display it to the display panel. Save Image Save current displaying image to a bitmap file. Exit Terminate ViewCreatorPro. View menu Devices Hide or unhide Devices panel.
Page 88
Image Size menu Full Image Set buffer sizes of the channels showed on display panel to full image size. Cif Image Set buffer sizes the channels showed on display panel to cif image size. Qcif Image Set buffer sizes the channels showed on display panel to qcif image size.
Page 89
EEPROM Click Tool in the menu bar and select EEPROM to bring up the EEPROM dialog box. Select the card you wish to access, enter the offset and output values, and then click the Write button to write the value into the EEPROM. Enter the offset value and click the Read button to read the value from the EEPROM.
Page 90
Help menu About Click Help in the menu bar and select About ViewCreator- Pro to bring up the About ViewCreatorPro box. This window will show ViewCreatorPro version. AboutDevice Click Help in the menu bar and select About Device to bring up the About Device box.
Function Library This chapter describes the API for Angelo RTV series cards. Users can use these functions to develop application programs under Visual C++, Visual Basic, C++ Builder, C#, Visual Basic .Net, and Delphi. Function Library...
5.2 C/C++ Programming Library Function prototypes and common data types are defined in Angelo.h. The Angelo series library uses these data types. We suggest that these data types be used in your application pro- grams. The following table shows the data types and their range: Type Name Description Range...
5.3 System Functions @ Name AngeloRTV_Initial(PortNo) Initialize the port in Angelo series card. AngeloRTV_Close(PortNo) Close the port in Angelo series card. AngeloRTV_Software_Reset(PortNo) Reset the port in Angelo series card. AngeloRTV_Read_Serial(CardNo, HighByte, LowByte) Read the unique 48-Bit Serial Number of Angelo Series Card (Only for RTV-24 Rev.B1 above, PCI-2100 Rev.A2 above) AngeloRTV_Get_Version(DriverVersion, DLLVersion, Reserved) Get the version of driver of AngeloRTV card and AngeloRTV.dll.
Page 95
I16 AngeloRTV_Close(U16 PortNo) I16 AngeloRTV_Software_Reset(U16 PortNo) U16 AngeloRTV_Read_Serial(U16 CardNo, U32* HighByte, U32* LowByte); I16 AngeloRTV_Get_Version(U32 *DriverVersion, U32 *DLLVersion, U32 *Reserved) Visual Basic (Windows/CE.NET) AngeloRTV_Initial (ByVal PortNo As Integer) As Integer AngeloRTV_Close(ByVal PortNo As Integer) As Integer AngeloRTV_Software_Reset (ByVal PortNo As Integer) As Integer AngeloRTV_Read_Serial(Byval CardNo as Integer, ByRef HighByte As Long, ByRef LowByte As...
Page 96
DriverVersion: Indicate the current version of AngeloRTV driver. This parameter is a pointer to an integer array with length 4. DLLVersion: Indicate the current version of AngeloRTV.dll file. This parameter is a pointer to an integer array with length 4. @ Return Code 0: ERROR_NoError ...
Page 97
I16 Result; U32 DriverVersion[4] = {0}, DLLVersion[4] = {0}, Reserved[4] = {0}; char strDriverVersion[20], strDLLVersion[20]; Result = AngeloRTV_Get_Version (DriverVersion, DLLVersion, Reserved); sprintf(strDriverVersion, "%d.%d.%d.%d", DriverVersion[0], DriverVersion[1], DriverVersion[2], DriverVersion[3]); sprintf(strDLLVersion, "%d.%d.%d.%d", DLLVersion[0], DLLVersion[1], DLLVersion[2], DLLVersion[3]); < Visual Basic > AngeloRTV_Initial – Dim Result As Integer Dim PortNo As Integer For PortNo= 0 To 3 Result = AngeloRTV_Initial (ByVal PortNo)
5.4 Configuration Functions @ Name AngeloRTV_Set_Image_Config(PortNo, ConfigIndex ,Value) Set the video adjustments. AngeloRTV_Get_Image_Config(PortNo, ConfigIndex, Value) Get the video adjustments. AngeloRTV_Set_Color_Format(PortNo, ColorFormat) Set the color format. AngeloRTV_Get_Color_Format(PortNo, ColorFormat) Get the color format. AngeloRTV_Set_Video_Format(PortNo, Value) Set the video format. AngeloRTV_Get_Video_Format(PortNo, Value) Set the video format. AngeloRTV_Set_Image_Geometric(PortNo, X_Offset, Y_Offset, X_Active, Y_Active, X_Scale, Y_Scale) Advanced image processing.
Sets the Video format of the port for the Angelo series card. Valid color formats are: NTSC, EIA, PAL, CCIR. AngeloRTV_Get_ Video _Format: Retrieves the video format of the port for the Angelo series card. AngeloRTV_Set_Image_Geometric: This function is used for image cropping and scaling. AngeloRTV_Detect_Video_Format: Use the function to retrieve the video format.
Page 102
I16 AngeloRTV_Set_Video _Format (U16 PortNo, U8 VideoFormat); I16 AngeloRTV_Set_Video _Format (U16 PortNo, U8* VideoFormat); I16 AngeloRTV_Set_Image_Geometric(U16 PortNo, U32 X_Offset, U32 Y_Offset, U32 X_Active, U32 Y_Active,double X_Scale,double Y_Scale); I16 AngeloRTV_Detect_Video_Format (U16 PortNo, U8 *FormatValue); Visual Basic (Windows/CE.NET) AngeloRTV_Set_Image_Config(ByVal PortNo As Integer, ByVal ConfigIndex As Byte,ByVal Value As Byte) As Integer AngeloRTV_Get_Image_Config(ByVal PortNo As Integer, ByVal ConfigIndex As Byte, ByRef...
Page 103
AngeloRTV_Get_Color_Format(PortNo:Smallint;var ColorFormat:Byte):Smallint; AngeloRTV_Set_Video_Format(PortNo:Smallint;Video Format:Byte):Smallin; AngeloRTV_Get_Video_Format(PortNo:Smallint;var VideoFormat:Byte):Smallint; AngeloRTV_Set_Image_Geometric (PortNo:Smallint; X_Offset:LongInt; Y_Offset:LongInt; X_Active:LongInt; Y_Active:LongInt; X_Scale:Double; Y_Scale:Double):Smallint; AngeloRTV_Detect_Video_Format(PortNo:Smallint; var FormatValue:Byte):Smallint; @ Arguments PortNo: Port number is the zero index of the Angelo series card. For exam- ple, if there are two PCI-RTV-24 Angelo cards (card 0, card 1) in the system, and each PCI-RTV-24 has four ports, the first port of card 0 is “0”, and the first port of card 1 is “4.”...
Page 105
This parameter value is the number of lines to skip before the first line of the active video image. FormatValue: If the return value of this parameter is 0 that means there is no video signal input. And if the value is 1 or 2, the video format of the port is NTSC.
Page 107
Result = AngeloRTV_Set_Video_Format(ByVal PortNo, ByVal VideoFormat) Result = AngeloRTV_Get_Video_Format(ByVal PortNo, ByRef VideoFormat) AngeloRTV_Set_Image_Geometric – Dim Result As Integer Dim PortNo As Integer Dim X_Active As Long Dim Y_Active As Long Dim X_Offset As Long Dim Y_Offset As Long Dim X_Scale As Double Dim Y_Scale As Double PortNo = 0 X_Active = 600...
Page 108
Result := AngeloRTV_Get_Image_Config (PortNo, ConfigIndex, Value); AngeloRTV_Set_Color_Format – AngeloRTV_Get_Color_Format – AngeloRTV_Set_Video_Format – AngeloRTV_Get_Video_Format – Result : SmallInt; PortNo : SmallInt; VideoFormat: Byte; ColorFormat: Byte; PortNo:=0; VideoFormat:=0; ColorFormat:=3; Result := AngeloRTV_Set_Color_Format(PortNo,ColorForm at); Result := AngeloRTV_Get_Color_Format(PortNo,ColorForm at); Result := AngeloRTV_Set_Video_Format(PortNo,VideoForm at); Result := AngeloRTV_Get_Video_Format(PortNo, VideoFormat);...
Page 109
Result := AngeloRTV_Set_Image_Geometric(PortNo, X_Offset, Y_Offset, X_Active, Y_Active, X_Scale, Y_Scale); AngeloRTV_Detect_Video_Format – Result : SmallInt; PortNo : SmallInt; FormatValue : Byte; PortNo := 0; Result := AngeloRTV_Detect_Video_Format (PortNo, FormatValue); Function Library...
5.5 Image Grabbing @ Name AngeloRTV_Capture_Start(PortNo, CaptureNo) Start to grab the video image AngeloRTV_Select_Channel(PortNo, Multiplex) Channel extension of video signal, for advanced only AngeloRTV_Capture_Stop(PortNo) Stop to grab the video image AngeloRTV_Capture_Config(PortNo, Start_Field) Set the starting field of image AngeloRTV_Sync_Grab(PortNo, Start_Address, Width, Height, Size_Byte) Get an image frame with start address of memory @ Description...
Page 112
Port number is the zero index of the Angelo series card. For exam- ple, if there are two PCI-RTV-24 Angelo cards (card 0, card 1) in the system, and each PCI-RTV-24 has four ports, the first port of card 0 is “0”, and the first port of card 1 is “4.” CaptureNo: Total number of frames to capture.
Page 113
Memory size in bytes. @ Return Code 0: ERROR_NoError -7: ERROR_Not_Initialized – Make sure the port has been initialized by “AngeloRTV_Initial”. -9: ERROR_Invalid_PortNo – Please input the correct “PortNo” parameter. @ Example <VC/BCB > AngeloRTV_Capture_Config – AngeloRTV_Capture_Start – AngeloRTV_Sync_Grab –...
Page 114
Result = AngeloRTV_Capture_Config (ByVal PortNo, ByVal Start_Field) Result = AngeloRTV_Capture_Start (ByVal PortNo, ByVal CaptureNo) Result = AngeloRTV_Sync_Grab (ByVal PortNo, StrAddr, Width, Height, Size_Byte) Result = AngeloRTV_Capture_Stop (ByVal PortNo) <Delphi > AngeloRTV_Capture_Config – AngeloRTV_Capture_Start – AngeloRTV_Sync_Grab – AngeloRTV_Capture_Stop – Result : SmallInt; PortNo: SmallInt;...
5.6 GPIO & EEPROM Functions @ Name AngeloRTV_Set_GPIO_Sts (PortNo, Status) Set Digital Output status. AngeloRTV_Get_GPIO_Sts (PortNo, Status) Get Digital Input status. AngeloRTV_Set_GPIO_Int_Logic (PortNo, Logic) Configure the Digital Input Interrupt condition AngeloRTV_Write_EEPROM (PortNo, Offset, Value) Write data into EEPROM AngeloRTV_Read_EEPROM (PortNo, Offset, Value) Read data from EEPROM AngeloRTV_Set_LED_Sts (PortNo, LEDStatus) Set LED status for cPci RTV24 card.
Page 117
@ Argument PortNo: Port number is the zero index of the Angelo series card. For exam- ple, if there are two PCI-RTV-24 Angelo cards (card 0, card 1) in the system, and each PCI-RTV-24 has four ports, the first port of card 0 is “0”, and the first port of card 1 is “4.”...
Page 119
AngeloRTV_Set_GPIO_Int_Logic – Dim Result As Integer Dim PortNo As Integer Logic As Integer PortNo = 0 Logic = 0 Result = AngeloRTV_Set_GPIO_Int_Logic (ByVal PortNo, ByVal Logic) AngeloRTV_Write_EEPROM AngeloRTV_Read_EEPROM Dim Result As Integer Dim PortNo As Integer Dim Offset As Byte Dim Value As Byte PortNo = 0 Offset =0...
5.7 Callback & Thread Functions @ Name AngeloRTV_Get_Int_Status (PortNo, IntStatus) Gets the current interrupt status AngeloRTV_Set_Int_Event (PortNo,hEvent) Assigns the windows interrupt event AngeloRTV_Set_Callback(PortNo, CallBackProc) Sets the callback function when an interrupt is generated @ Description AngeloRTV_Get_Int_Status: Allows users to identify what caused an interrupt signal. Bit 0: GPIO interrupt, when Digital input channel is changed.
Page 122
I16 AngeloRTV_Set_Callback (U16 PortNo, void ( __stdcall *CallBackProc)(U32 VideoBufferaddress ,U16 PortNo)); Visual Basic (Windows/CE.NET) AngeloRTV_Set_Int_Event (ByVal PortNo As Integer, ByRef hEvent As Long) As Integer AngeloRTV_Get_Int_Status(ByVal PortNo As Integer, ByRef IntStatus As Long) As Integer AngeloRTV_Set_Callback(ByVal PortNo As Integer, ByVal CallBack As Long) As Integer Delphi (Windows) AngeloRTV_Set_Int_Event(PortNo:Smallint;var hEvent:Integer):Smallint;...
Page 123
@ Return Code 0: ERROR_NoError -7: ERROR_Not_Initialized – Make sure the port has been initialized by “AngeloRTV_Initial”. -9: ERROR_Invalid_PortNo – Please input the correct “PortNo” parameter. @ Example < VC/BCB > Use Thread: HANDLE hEvent=NULL; void *pThread=NULL; U32 threadID;...
Page 124
ResetEvent(hEvent); Return TRUE; AngeloRTV_Set_Int_Event(PortNo,&hEvent); pThread =CreateThread(NULL, 0, IntThreadProc, 0, 0, &threadID); Use Callback Function: U16 PortNo = 0; void __stdcall MediaStreamProc( U32 VideoBufferaddress ,U16 PortNo) U32 Status; AngeloRTV_Get_Int_Status(PortNo,&Status); if((Status&0x01)==1)//GPIO if((Status>>1&0x01)==1)//Channel 0 of the nPort else if((Status>>2&0x01)==1)//Channel 1 of the nPort else if((Status>>3&0x01)==1)//Channel 2 of the nPort else if((Status>>4&0x01)==1)//Channel 3 of...
Page 125
Dim Status As Long Result = AngeloRTV_Get_Int_Status(PortNo, Status) End Sub PortNo = 0 Result = AngeloRTV_Set_Callback(PortNo, AddressOf lpcallback) <Delphi > Use Thread ISR_ON : SmallInt; Event_Angelo:Integer; ThreadId : LongInt; PortNo: SmallInt; PortNo:=0; function ThreadFunc(Parameter: Pointer): Integer ; Str_Add :Pointer; Size_Byte :Longint; intstatus : LongInt;...
Page 126
Use Callback function PortNo: SmallInt; PortNo:=0; procedure MyCallback(VideoBufferAddress : LongInt;PortNo : SmallInt);stdcall Str_Add :Pointer; Result :Smallint; Size_Byte :LongInt; intstatus :LongInt; begin AngeloRTV_Get_Int_Status(PortNo,intstatus); if intstatus = 2 then begin end; end; AngeloRTV_Set_Callback(Cur_Port,MyCallback); Function Library...
5.8 Watchdog Timer Note: This function is only available for RTV-24. @ Name AngeloRTV_Set_WDT(CardNo, Enable, Interval) Sets the watch dog status(Only for PCI-RTV24) @ Description AngeloRTV_Set_WDT: Enables or disables the watch dog timer in the Angelo series cards, and set the interval of timer. When users have enabled the watch dog timer and selected a 16 seconds interval, a system reset signal will be triggered if this function is not called after 16 seconds.
Page 128
@ Return Code 0 : ERROR_NoError -7: ERROR_Not_Initialized – Make sure the port has been initialized by “AngeloRTV_Initial”. -9 : ERROR_Invalid_PortNo – Please input the correct “PortNo” parameter. @ Example <VC/BCB > AngeloRTV_Set_WDT I16 Result; U16 CardNo = 0; U16 Enable = 1;...
5.9 Software Trigger @ Name AngeloRTV_Trigger_Config (PortNo,Interval) Sets software trigger configuration(Only for PCI-RTV24, cPCI- RTV-24, cPCI-RTV44) AngeloRTV_Trigger_Start (CardNo, Multiplex) Generates single or multiple trigger output simultaneously(Only for PCI-RTV24, cPCI-RTV-24, cPCI-RTV44) @ Description AngeloRTV_Trigger_Config: Configures the pulse output interval. AngeloRTV_Trigger_Start: Generates a one shot pulse output for single or multiple ports. @ Syntax C/C++ (Windows/CE.NET) I16 AngeloRTV_Trigger_Config(U16 PortNo,U16...
Page 130
Port number is the zero index of the Angelo series card. For exam- ple, if there are two PCI-RTV-24 Angelo cards (card 0, card 1) in the system, and each PCI-RTV-24 has four ports, the first port of card 0 is “0”, and the first port of card 1 is “4.” Interval: Indicates the trigger output interval, the valid range is from 0 to 253, the definition is as following...
Page 131
I16 Result; U16 CardNo = 0; U16 PortNo = 0; U16 Multiplex = 1; U16 Interval = 32; Result = AngeloRTV_Trigger_Config(PortNo,Interval); Result = AngeloRTV_Trigger_Start(CardNo, Multiplex); < Visual Basic > AngeloRTV_Trigger_Config AngeloRTV_Trigger_Start Dim Result As Integer Dim CardNo As Integer Dim PortNo As Integer Dim Multiplex As Integer Dim Interval As Integer CardNo = 0...
5.10 Frame Buffer @ Name AngeloRTV_Copy_frame (PortNo, Dest_Address, Size_Byte) Copies the frame date to the user allocated destination memory (bytes). AngeloRTV_Get_frame(PortNo, Start_Address,Width, Height, Size_Byte) Gets the frame memory start address and size of frame (bytes). AngeloRTV_Save_File(PortNo, FileName, FileFormat, nQuality) Save the video frame into an image file. @ Description AngeloRTV_Copy_frame: Copies frame data to memory or an array that the user has allo-...
Page 134
Port number is the zero index of the Angelo series card. For exam- ple, if there are two PCI-RTV-24 Angelo cards (card 0, card 1) in the system, and each PCI-RTV-24 has four ports, the first port of card 0 is “0”, and the first port of card 1 is “4.” Dest_Address: User allocated destination memory address or array.
5.11 Angel RTV LabVIEW Function Library AngeloRTV_Init.vi This VI initializes the port of RTV card. Set video format and color format for the port of RTV card. Call this VI before AngeloRTV_Snap.vi. Video Format 0: Full NTSC (640*480) 1: Full PAL (768*576) ...
Page 138
AngeloRTV_Hardware_Initial.vi This VI initializes the port of RTV card. Each application program must call this function before any other function. If the initialization succeeds, it returns a value 0. AngeloRTV_Hardware_Close.vi Release resources of all ports. AngeloRTV_Int_Enable.vi This VI links the event and the interrupt automatically. AngeloRTV_Wait_Int.vi Wait for interrupt events.
Page 139
AngeloRTV_Get_Color_Format.vi Retrieve the color format of the port AngeloRTV_Set_Image_Config.vi Adjust hue, contrast, saturation and brightness for the port of RTV card. ConfigIndex: 0 for BRIGHTNESS 1 for HUE 2 for SATURATION (U) 3 for SATURATION (V) 4 for CONTRAST (LUMA) ...
Page 140
X_Active This parameter is the length of the active video line. X_Offset This parameter is the number of scaled pixels to skip before the start of the active video line. Y_Scale This parameter is the scaling factor applied to the RTV sam- pled data lines in the vertical direction.
Page 141
Start_Filed Indicate the first field of image. 0: First field is odd, so the image will be odd field + even field. 1: First field is even, so the image will be even field + odd field. 2: First field depends on the current field, so the image ...
Page 142
Interval Indicates the trigger output interval. The valid range is from 0 to 253. The definition is as follows: 0: 16 ms 32: 12 ms 128: 8 ms 253: 60μs AngeloRTV_Sync_Grab.vi Use this VI to obtain an image frame. Retrieve the memory start address from the frame data, width, height, and size in bytes of the image.
Offset This parameter is valid between 0 and 127 Value Value in byte. This parameter is valid between 0 and 255. AngeloRTV_Read_EEPROM.vi Read data from EEPROM. Data in EEPROM will not be lost when power off. Offset: This parameter is valid between 0 and 127 Value: Value in byte.
Programming Guide 6.1 DirectShow Programming Guide Introduction A complete documentation on DirectShow application program- ming can be found at: http://msdn.microsoft.com/library/default.asp?url=/library/en- us/directx9_c/directX/htm/introductiontodirectshow.asp. If a DirectX 9.0 is installed, this documentation is also available from DirectX SDK Help. The main goal of writing a DirectShow Application is to build a filter graph by connecting several filters together to perform a given task such as previewing video/audio, capturing video/audio and multiplexing them to write into a file.
Page 146
Source Filter ADLink Bt878 Video Capture ADLink Bt878 Video Capture Filter belongs to the category of WDM Streaming Capture Devices. It is actually a kernel-mode KsProxy plug-in. An application can treat it simply as a filter. Use System Device Enumerator to add this filter to a filter graph. Filter Name ADLink Bt878 Video Capture Filter CLSID...
Page 147
CrossBar Filter If the device is a capture board, a CrossBar filter is needed for switching video source. In hardware design, crossbar can switch channel input of same port. Filter Name ADLink Bt878 CrossBar Filter Category Name WDM_Streaming Crossbar Devices Example Graphs The Microsoft DirectX SDK provides a very useful debugging utility called GraphEdit, which can be used to simulate graph building.
Page 148
Video Proc Amp: ADLink Bt878 Crossbar filter: Select video input before or during video previewing. Programming Guide...
Page 149
Example Graph Controlling Driver The ADLink Bt878 Video Capture Filter provides property pages and exposes COM interfaces to control video. So an application can have two ways to control video configurations: using the prop- erty pages and using the COM interfaces. Use Property Pages There are two embedded property pages in the driver.
Page 150
Below is the example code for adding property pages: // pFilter points to the capture filter ISpecifyPropertyPages *pSpecify; HRESULT hr; hr = pFilter- >QueryInterface(IID_ISpecifyPropertyPages, (void **)&pSpecify); if (SUCCEEDED(hr)) FILTER_INFO FilterInfo; pFilter->QueryFilterInfo(&FilterInfo); FilterInfo.pGraph->Release(); CAUUID caGUID; pSpecify->GetPages(&caGUID); pSpecify->Release(); OleCreatePropertyFrame( NULL, // Parent window // x (Reserved) // y (Reserved) FilterInfo.achName,// Caption for the...
Page 151
Use COM interfaces Use the methods of IAMVideoProvAmp interface of standard DirectShow Interface to get or set the qualities of an incoming video signal. ADLink Bt878 Crossbar The ADLink Bt878 Crossbar filter implements an IAMCrossbar interface. It routes signals from an analog or digital source to a video capture filter.
Page 154
EEPROM Access ADLink Bt878 Video Capture provides a method for accessing I2C register. The interface can store a few data, for example, board identification. Sample: #define INSTANCE_DATA_OF_PROPERTY_PTR(x) ( (PKSPROPERTY((x)) ) + 1 ) #define INSTANCE_DATA_OF_PROPERTY_SIZE(x) ( sizeof((x)) - sizeof(KSPROPERTY) ) BYTE EEPROMRead(IBaseFilter *pFilter, BYTE offset) Purpose:...
Page 155
uAddress = 0xa0; // address for the EEPROM device // Set frequency first ZeroMemory(&I2C,sizeof(I2C)); I2C.bDontWaitACK = true; I2C.dwOperation = BT848_CUSTPROP_I2C_SETFREQ; I2C.dwFreq = 100000; hr = pKs->Get( PROPSETID_CUSTOMBT848, KSPROPERTY_CUSTOMBT848_I2C, INSTANCE_DATA_OF_PROPERTY_PTR(&I2C), INSTANCE_DATA_OF_PROPERTY_SIZE(I2C), &I2C, sizeof(I2C), &ret); // Read value then I2C.dwOperation=BT848_CUSTPROP_I2C_R3; I2C.ucAddress= uAddress; I2C.ucInBuf[0] = offset;...
Page 156
void EEPROMWrite(IBaseFilter *pFilter, BYTE offset, BYTE value) Purpose: Write.the value to EEPROM Parameters: pFilter: Interface of BT878 filter offset: the offset (0~127) based on starting address of EEPROM value: the data to EEPROM IKsPropertySet *pKs = NULL; DWORD TypeSupport = 0; KSPROPERTY_CUSTOMBT848_I2C_S I2C;...
Page 158
Build Environment Settings Include Files All applications need include the file shown in the following table. Include File Description DShow.h The header file is required for all C++ applications. Custprop.h The header file is required for all C++ applications. The header file is required for all C++ applications Bt848guid.h which need access BT878 proprietary interfaces, for instance, EEPROM and GPIO.
Page 159
Microsoft Visual C++ Users VC++ users need to setup the builder environment prior to start to build your program. There are few steps you need to follow as below: 1. Open the solution file (baseclasses.sln) or the project file (baseclasses.dsw) under %DXSDK%\Sam- ples\C++\DirectShow\BaseClasses and build it.
6.2 LabVIEW Programming Guide ADLINK_Vision Controls/Functions Palettes To use RTV-LVIEW VIs, you have to switch the Controls/Func- tions palettes to the ADLINK_Vision palette view first. In Lab- VIEW 7.0, select Tools>>Options to display the Options dialog box. Select Controls/Functions Palettes from the top pull-down menu in the Options dialog box, and select ADLINK_Vision from the Palette View pull-down menu.
Page 161
Click ADLINK Vision icon to display the ADLINK_Vision palette view. Then click the AngeloRTV icon, you can find RTV-LVIEW VIs. In LabVIEW 6, click the Options button on the Functions palette toolbar to display the Function Browser Options dialog box. Programming Guide...
Page 162
Select ADLINK_Vision from the Palette Set pull-down menu and click OK button. Then you can see the ADLINK_Vision Functions Palette as below. Programming Guide...
Page 163
How-to Program with RTV-LVIEW Here we provide a simplest sample showing how to capture a frame with RTV-LVIEW VI. For more complicated samples with RTV-LVIEW, you can reference those located in the C:\Program Files\ADLINK\RTV-LVIEW\Samples folder. 1. Open a blank VI and switch to the block diagram. Drag and drop AngeloRTV_Init.vi, AngeloRTV_Snap.vi, and AngeloRTV_Close.vi on the block diagram.
Page 164
2. Create Constant or Control to each input and connect these VIs. In order to show the captured frame on the front panel, we also drag and drop another VI provided by LabVIEW, named Draw Flattened Pixmap.vi. 3. Push the upper left Run button and you can see a cap- tured frame on the front panel.
Page 165
Get Help of RTV-LVIEW You can display the Context Help window by selecting Help>>Show Context Help. LabVIEW will show the information of the RTV-LVIEW VI when you move the cursor over it. Programming Guide...
6.3 Linux Programming Guide Introduction Video4 Linux or V4L is intended to provide a standard video cap- ture application programming interface on Linux. V4L is in its sec- ond version. V4L2 driver include a compatibility mode for V4L1 application that is V4L application can mix the two modes of V4L1 and V4L2.
Page 167
Close device Close the device with close () if you no longer use this device. Close ( fd); IO control IO control is a technology communication with driver. V4L sets up many standard IO controls which control video parameters to or get information from driver.
Page 168
exit (EXIT_FAILURE); /* Change to the default channel */ int channel = 0; if (-1 == ioctl (fd, VIDIOC_S_INPUT, &channel)) { exit (EXIT_FAILURE); memset (&cropcap, 0, sizeof (cropcap)); cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (0 == ioctl (fd, VIDIOC_CROPCAP, &cropcap)) { crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;...
Page 169
Memory map Memory map system call, mmap (), allows the mapping of device memory directly into a user processor’s address space. From device viewpoint, Direct Memory Access (DMA) operations pro- vide peripherals with direct access to system memory without CPU processing. This can save large of time and loading that application or driver doesn’t need to move data from devices to system memory.
Page 170
if (!buffers) { fprintf (stderr, "Out of memory\n"); exit (EXIT_FAILURE); for (n_buffers = 0; n_buffers < req.count; ++n_buffers) { struct v4l2_buffer buf; memset (&buf, o, sizeof (buf)); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; buf.index = n_buffers; if (-1 == ioctl (fd, VIDIOC_QUERYBUF, &buf)) exit (EXIT_FAILURE);...
Page 171
Start capturing void start_capturing (void) unsigned int i; enum v4l2_buf_type type; for (i = 0; i < n_buffers; ++i) { struct v4l2_buffer buf; memset (&buf, 0, sizeof (buf)); buf.type V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; buf.index = i; if (-1 == ioctl (fd, VIDIOC_QBUF, &buf)) exit (EXIT_FAILURE);...
Page 172
Read frame Read frame image when an image was ready and prepare next frame. Int read_frame (void) struct v4l2_buffer buf; memset (&buf, 0, sizeof (buf)); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; /* read frame */ if (-1 == ioctl (fd, VIDIOC_DQBUF, &buf)) { switch (errno) { case EAGAIN: return 0;...
Page 173
Proprietary properties Except standard APIs, we also provide a proprietary IO control which can read and write external general purpose IO pin. /* configure the direction (in or out) of each gpio bit prior to reading or writing gpio. int config_gpio (void) unsigned int value = 0xC3FEFF;...
Appendix 7.1 Glossary Brightness: Attribute of a visual sensation according to which an area appears to exhibit more or less light CCIR: An acronym to designate a scanning system used in Europe. The CCIR system is made of two interlaced fields of 312.5 lines, for a total of 625 lines.
Page 176
Frame: One frame (two fields) of video contains the full vertical interlaced information content of the picture. For NTSC this consists of 525 lines and PAL a frame is consisted of 625 lines. Gamma: Cathode ray tubes (CRTs) do not have a linear relationship between brightness and the input voltage applied.
7.2 Standards Compliance Notice for USA Compliance Information Statement (Declaration of Conformity Procedure) DoC FCC Part 15 This equipment has been tested and found to comply with the lim- its for a Class A digital device, pursuant to Part 15 of the FCC Rules.
Page 178
Notice for Europe This product is in conformity with the Council Directive 89/336/EEC amended by 92/31/EEC and 93/68/EEC This equipment has been tested and found to comply with EN55022/CISPR22 and EN55024/CISPR24. To meet EC require- ments, shielded cables must be used to connect a peripheral to the card.