ADLINK PCIe-2602 User Manual

PCIe-2602

3G-SDI Audio/Video Capture Card
Function Library Reference
Manual Rev.: 2.00 Revision Date: Nov. 13, 2013 Part No: 50-11252-1000
Advance Technologies; Automate the World.
Revision Release Date Description of Change(s)
2.00 Nov. 13, 2013 Initial release
ii
PCIe-2602-FLR

Preface

Copyright 2013 ADLINK Technology, Inc.
This document contains proprietary information protected by copy­right. All rights are reserved. No part of this manual may be repro­duced by any mechanical, electronic, or other means in any form without prior written permission of the manufacturer.
Disclaimer
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.
In no event will the manufacturer be liable for direct, indirect, spe­cial, incidental, or consequential damages arising out of the use or inability to use the product or documentation, even if advised of the possibility of such damages.
Environmental Responsibility
ADLINK is committed to fulfill its social responsibility to global environmental preservation through compliance with the Euro­pean Union's Restriction of Hazardous Substances (RoHS) direc­tive and Waste Electrical and Electronic Equipment (WEEE) directive. Environmental protection is a top priority for ADLINK. We have enforced measures to ensure that our products, manu­facturing processes, components, and raw materials have as little impact on the environment as possible. When products are at their end of life, our customers are encouraged to dispose of them in accordance with the product disposal and/or recovery programs prescribed by their nation or company.
Trademarks
Product names mentioned herein are used for identification pur­poses only and may be trademarks and/or registered trademarks of their respective companies.
Preface iii
Conventions
Take note of the following conventions used throughout this manual to make sure that users perform certain tasks and instructions properly.
Additional information, aids, and tips that help users perform tasks.
NOTE:
NOTE:
Information to prevent minor physical injury, component dam-
age, data loss, and/or program corruption when trying to com-
CAUTION:
WARNING:
plete a task.
Information to prevent serious physical injury, component
damage, data loss, and/or program corruption when trying to complete a specific task.
iv Preface
PCIe-2602-FLR

Table of Contents

Revision History...................................................................... ii
Preface.................................................................................... iii
List of Figures....................................................................... vii
List of Tables.......................................................................... ix
1 Introduction ........................................................................ 1
1.1 Overview.............................................................................. 1
1.2 Features............................................................................... 1
1.3 Applications ......................................................................... 1
2 Function Library................................................................. 3
2.1 Image Acquisition Processes............................................... 3
2.2 List of Functions................................................................... 4
2.3 Setting Up the Build Environment........................................ 6
2.3.1 Include Files ............................................................... 6
2.3.2 Library Files ................................................................ 6
2.3.3 DLL Files .................................................................... 6
2.4 API Functions ...................................................................... 7
2.4.1 Device Control Functions ........................................... 7
2.4.2 Image Format Functions........................................... 16
2.4.3 Event & Callback Functions...................................... 30
2.4.4 Acquisition Control Functions ................................... 35
2.4.5 Digital I/O Functions ................................................. 46
2.4.6 Audio Format Functions ........................................... 49
2.4.7 Other Functions ........................................................ 51
3 DirectShow Programming Guide.................................... 53
3.1 Filters ................................................................................. 53
v
3.1.1 Source Filters............................................................ 54
3.1.2 Example Graphs ....................................................... 54
3.2 Driver Control..................................................................... 57
3.2.1 Property Pages ......................................................... 57
3.3 Color Space ....................................................................... 58
3.4 Proprietary Interfaces......................................................... 62
3.5 Build Environment Settings................................................ 72
3.5.1 Include Files.............................................................. 72
3.5.2 Library Files .............................................................. 72
3.5.3 Microsoft Visual C++................................................. 73
3.5.4 .Net Programming Users .......................................... 73
Important Safety Instructions............................................... 75
Getting Service...................................................................... 77
vi
PCIe-2602-FLR

List of Figures

Figure 2-1: Bottom-up Image Orientation ................................... 29
Figure 2-2: Top-down Image Orientation .................................... 30
Figure 3-1: GraphEdit Insert Filters Dialog ................................. 55
Figure 3-2: GraphEdit Interface .................................................. 57
List of Figures vii
This page intentionally left blank.
viii List of Figures
PCIe-2602-FLR

List of Tables

Table 2-1: API Functions .................................................................. 5
List of Tables ix
This page intentionally left blank.
xList of Tables

1 Introduction

1.1 Overview

PCIe-2602-FLR
The PCIe-2602 3G-SDI Audio/Video Capture Card, based on the PCI Express
®
x4 interface, enables acquisition of 2 channels 3G-SDI, low latency, and raw video data signals up to 1920x1080P/60fps (frames per second).
Thanks to 3G capability, ADLINK’s PCIe-2602 supports high accu­racy color format, such as 12 bit 4:4:4 1080i/60fps or 10 bit 4:2:2 1080P/60fps, and when combined with a suitable 75Ω coaxial cable, 3G-SDI signals can be transmitted over 100 m, suiting the PCIe-2602 for medical imaging and intelligent video surveillance and analysis.
The included ViewCreator Pro
®
utility enables setup, configura­tion, testing, and system debugging without requiring any software programming. As well, ADLINK's drivers are compatible with Microsoft
®
DirectShow, reducing engineering efforts and acceler-
ating time to market.

1.2 Features

X Support for 2-CH 3G-SDI video signal, up to 1920 x
1080P/60fps video stream
X Low latency, uncompressed video streaming
X High accuracy color format support, 12 bit 4:4:4 1080i/60fps
or 10 bit 4:2:2 1080P/60fps
X Cabling distances up to 100m (w/ compatible 75 coaxial
cable)
X Directshow support
X RS-485 and Digital I/O provided
X PCI Express x4 compliant signal
X Connection Status LED

1.3 Applications

The PCIe-2602, featuring 3G signal capture ability and support for highly accurate color formatting, is ideal for frame grab function in
Introduction 1
a wide variety of applications, including medical imaging and intel­ligent video surveillance or analytics.
2Introduction
PCIe-2602-FLR

2 Function Library

This describes details of the API (Application Programming Inter­face) for the PCIe-2602, developing application programs within Visual C++, C#, Visual Basic.Net, Delphi, Visual Basic, and Bor­land C++ Builder.
While the PCIe-2602 API is based on DirectShow technologies, complexity of DirectShow programming has been eliminated in favor of simple API functions requiring no familiarity with Direct­Show programming.
Please note that the API and DirectShow programming cannot be combined to access a single PCIe-2602 card at the same time.

2.1 Image Acquisition Processes

An acquisition flowchart follows, showing two alternate capture processes.
Device Open
• Sdi_DeviceOpen
Image/Audio Format Control
• Sdi_SetSensorFormat
• Sdi_SetOutputFormat
• Sdi_SetImageOrientation/
• Sdi_SetAudioBitsPerSample
SetEventHandle
Create Thread MyCallback
Wait Event
Get Image/Audio
Stream
• Sdi_GetImageStream/
• Sdi_GetAudioStream
• Sdi_SetEventSelector
• Sdi_SetEventHandle
Acquisition Start
• Sdi_AcquisitionStart
Acquisition Stop
• Sdi_AcquisitionStop
Device Stop
• Sdi_DeviceClose
SetCallback
• Sdi_SetCallbackSelect or
• Sdi_SetCallback
Get Image/Audio
Stream
• Sdi_GetImageStream/
• Sdi_GetAudioStream
Function Library 3

2.2 List of Functions

Category Function
Device Control Device Count
Device Open
Device Close
Device Vendor Name
Device Model Name
Device Version
Device Firmware Version
Driver Version
Library Version
Device ID
Channel Number
Image Format Sensor Format
Sensor Width
Sensor Height
Output Format
Video Capabilities
Detected Sensor Format
Detected Output Format
Image Orientation
Event & Callback Event Selector
Event Handle
Callback Selector
Callback
4 Function Library
Category Function
Acquisition Control Acquisition Frame Count
Acquisition Start
Acquisition Stop
One Shot
Image Stream
Acquisition Status
Acquisition Statistics
Sensor Status
Save Image
Audio Stream
Dropped Frame Count
Overflow Frame Count
Mismatch Frame Count
Digital I/O Digital I/O Selector
DI
DO
Audio Format Control
Other Error Text
Audio Bits Per Sample
Audio Clock Phase Data Bypass
T able 2-1: API Functions
PCIe-2602-FLR
Function Library 5

2.3 Setting Up the Build Environment

2.3.1 Include Files

All applications using API are required to include the following files.
Include File
Sdi.h
Sdi.vb
Sdi.cs

2.3.2 Library Files

All C/C++ applications using API require the following library files.
Library File Description
P260x.lib Exports API function definitions. Required for all
P260x64.lib Exports API function definitions. Required for all
P260x_bcb.lib Exports API function definitions. Required for all
Header file required for all C/C++ applications
Function definitions required for all VB.Net applications
Function definitions required for all C# applications
Visual C/C++ 32 bits applications.
Visual C/C++ 64 bits applications.
Borland C++ Builder applications.

2.3.3 DLL Files

All applications using API require the following DLL files.
DLL File Description
P260x.dll Dynamic link library. Required for all applications.
All files are located in the directory \ADLINK\PCIe-260x\Include
6 Function Library

2.4 API Functions

2.4.1 Device Control Functions

Device Count
Returns the total number of supported devices in the sys-
tem, with a maximum of 32 channels detectable.
Syntax
C/C++
int Sdi_GetDeviceCount(UINT &Count)
C#
int GetDeviceCount(out uint Count)
VB.Net
GetDeviceCount (ByRef Count as UInteger) As Integer
Parameter(s)
Count
The total number of supported input channels installed.
PCIe-2602-FLR
Return Value
No error occurs if return value >= 0; if negative, refer to
Other Functions for return code error information.
Device Open
Initializes a specified SDI channel, and should be called
before other functions except those with no Number parameter.
Syntax
C/C++
int Sdi_DeviceOpen (UINT Number)
C#
int DeviceOpen (uint Number)
VB.Net
Function Library 7
DeviceOpen (ByVal Number As UInteger) As Inte­ger
Parameter(s)
Number
The number of SDI channels to be opened, with allowed
value from 0 to 31.
Return Value
No error occurs if return value >= 0; if negative, refer to
Other Functions for return code error information.
Device Close
Closes the channel and releases all allocated resources;
should be called before terminating the application.
Syntax
C/C++
int Sdi_DeviceClose (UINT Number)
C#
int DeviceClose (uint Number)
VB.Net
DeviceClose (ByVal Number As UInteger) As Integer
Parameter(s)
Number
The number of the SDI channel to be closed with allowed
value from 0 to 31.
Return Value
No error occurs if return value >= 0; if negative, refer to
Other Functions for return code error information.
Device Vendor Name
Returns the vendor name.
8 Function Library
PCIe-2602-FLR
Syntax
C/C++
int Sdi_GetDeviceVendorName (char *Name)
C#
string GetDeviceVendorName ()
VB.Net
GetDeviceVendorName () As String
Parameter(s)
Name
Points to a user-allocated buffer into which the function cop­ies the vendor name string, such as “ADLINK”. The name is NULL-terminated.
Return Value
C/C++
No error occurs if return value >= 0; if negative, refer to Other Functions for return code error information.
C#
Return vendor name.
VB.Net
Return vendor name.
Device Model Name
Returns the model name.
Syntax
C/C++
int Sdi_GetDeviceModelName (UINT Number, char *Name)
C#
string GetDeviceModelName (uint Number)
VB.Net
Function Library 9
GetDeviceModelName (ByVal Number as UInteger)
As String
Parameter(s)
Number
The number of the SDI channel, with allowed values from 0
to 31.
Name
Points to a user-allocated buffer into which the function cop-
ies the model name string, for example, “PCIe-2602”. The name is NULL-terminated.
Return Value
C/C++
No error occurs if return value >= 0; if negative, refer to
Other Functions for return code error information.
C#
Return model name.
VB.Net
Return model name.
Device Version
Returns the hardware device version.
Syntax
C/C++
int Sdi_GetDeviceVersion (UINT Number, char
*Version)
C#
string GetDeviceVersion (uint Number)
VB.Net
GetDeviceVersion (ByVal Number as UInteger) As
String
10 Function Library
PCIe-2602-FLR
Parameter(s)
Number
The number of the SDI channel, with allowed values from 0 to 31.
Version
Points to a user-allocated buffer into which the version string is entered, such as “A1”. The name is NULL-terminated.
Return Value
C/C++
No error occurs if return value >= 0; if negative, refer to Other Functions for return code error information.
C#
Return device version string.
VB.Net
Return device version string.
Device Firmware Version
Returns the firmware version.
Syntax
C/C++
int Sdi_GetDeviceFirmwareVersion (UINT Number, char *Version)
C#
string GetDeviceFirmwareVersion (uint Number)
VB.Net
GetDeviceFirmwareVersion (ByVal Number as UIn­teger) As String
Parameter(s)
Number
The number of the SDI channel, with allowed values from 0 to 31.
Function Library 11
Version
Points to a user-allocated buffer into which the version
string is entered in “Year/Month/Day Hour:Minute” format. The version is NULL-terminated.
Return Value
C/C++
No error occurs if return value >= 0; if negative, refer to
Other Functions for return code error information.
C#
Return firmware version string.
VB.Net
Return firmware version string.
Driver Version
Returns the driver version.
Syntax
C/C++
int Sdi_GetDriverVersion (UINT Number, char
*Version)
C#
string GetDriverVersion (uint Number)
VB.Net
GetDriverVersion (ByVal Number as UInteger) As
String
Parameter(s)
Number
The number of the SDI channel, with allowed values from 0
to 31.
Version
12 Function Library
PCIe-2602-FLR
Points to a user-allocated buffer into which the version string is entered in a “n.n.n.n” format. The version is NULL-ter­minated.
Return Value
C/C++
No error occurs if return value >= 0; if negative, refer to Other Functions for return code error information.
C#
Return driver version string.
VB.Net
Return driver version string.
Library Version
Returns the library version.
Syntax
C/C++
int Sdi_GetLibraryVersion (UINT Number, char *Version)
C#
string GetLibraryVersion (uint Number)
VB.Net
GetLibraryVersion (ByVal Number as UInteger) As String
Parameter(s)
Number
The number of the SDI channel, with allowed values from 0 to 31.
Version
Points to a user-allocated buffer into which the version string is entered in a “n.n.n.n” format. The version is NULL-ter­minated.
Function Library 13
Return Value
C/C++
No error occurs if return value >= 0; if negative, refer to
Other Functions for return code error information.
C#
Return library version string.
VB.Net
Return library version string.
Device ID
Acquires device card ID.
Syntax
C/C++
int Sdi_GetDeviceID (UINT Number, UINT& ID)
C#
int GetDeviceID (uint Number, out uint ID)
VB.Net
GetDeviceID (ByVal Number as UInteger, ByRef
ID As UInteger) As Integer
Parameter(s)
Number
The number of the SDI channel, with allowed values from 0
to 31.
ID
Card ID can be set by DIP switch on the card, with possible
values from 0 to 15, and can distinguish individual cards when multiples are installed, with different number settings as shown in the User’s Manual.
14 Function Library
PCIe-2602-FLR
Return Value
No error occurs if return value 0; if a negative value, please refer to Other Functions for return code error informa­tion.
Channel Number
Retrieves the SDI channel number.
Syntax
C/C++
int Sdi_GetChannelNumber (UINT Number, UINT& Channel)
C#
int GetChannelNumber (uint Number, out uint Channel)
VB.Net
GetChannelNumber (ByVal Number as UInteger, ByRef Channel As UInteger) As Integer
Parameter(s)
Number
The number of the SDI channel, with allowed values from 0 to 31.
Channel
The channel number of this card, with 0 for SDI 0 and 1 for SDI 1.
Return Value
No error occurs if return value 0; if a negative value, please refer to Other Functions for return code error informa­tion.
Function Library 15

2.4.2 Image Format Functions

Sensor Format
Sets or retrieves image format of source input, with format
differing according to the input channel.
Syntax
C/C++
int Sdi_SetSensorFormat (UINT Number, UINT
Format)
int Sdi_GetSensorFormat (UINT Number, UINT
&Format)
C#
int SetSensorFormat (uint Number, uint Format)
int GetSensorFormat (uint Number, out uint
Format)
VB.Net
SetSensorFormat (ByVal Number as UInteger,
ByVal Format as UInteger) As Integer
GetSensorFormat (ByVal Number as UInteger,
ByRef Format as UInteger) As Integer
Parameter(s)
Number
The number of the SDI channel, with allowed values from 0
to 31.
Format
Source input format, with possible values of:
0: 525i 29.97/30 fps (720 x 486 interlace, in fps),
1: 625i 25 fps (720 x 576 interlace, in fps),
2: 720p 24 fps (1280 x 720 progressive),
3: 720p 25 fps (1280 x 720 progressive),
4: 720p 30 fps (1280 x 720 progressive),
5: 720p 50 fps (1280 x 720 progressive),
16 Function Library
PCIe-2602-FLR
6: 720p 59.94/60 fps (1280 x 720 progressive),
7: 1080i 25 fps (1920 x 1080 interlace, in fps),
8: 1080i 29.97/30 fps (1920 x 1080 interlace, in fps),
9: 1080p 23.98/24 fps (1920 x 1080 progressive)
10: 1080p 25 fps (1920 x 1080 progressive)
11: 1080p 30 fps (1920 x 1080 progressive)
12: 1080p 50 fps (1920 x 1080 progressive)
13: 1080p 59.94/60 fps (1920 x 1080 progressive)
Resolutions can be acquired with GetVideoCapabilities()
NOTE:
NOTE:
Return Value
No error occurs if return value 0; if a negative value, please refer to Other Functions for return code error informa­tion.
Sensor Width1
Acquires image width of the source input, as shown in Sen­sor Format.
Syntax
C/C++
int Sdi_GetSensorWidth (UINT Number, UINT &Width)
C#
int GetSensorWidth (uint Number, out uint Width)
VB.Net
GetSensorWidth (ByVal Number as UInteger, ByRef Width as UInteger) As Integer
Function Library 17
Loading...
+ 61 hidden pages