General sdk usage, Demo applications, Function summary – Sensoray 2224 Windows User Manual

Page 10: Initialization

Advertising
background image

General SDK Usage

1. Enumeration. If using multiple boards, they can be identified with the S2226_Enumerate

call. If using a single board, it may be opened without enumeration using the index 0.

2. Initialization. This is performed by a call to S2226_OpenBoard() function with the board

index parameter. Initial default capture settings are loaded and a handle to the board for
other functions is returned.

3. A call to S2226_OpenBoard() should be followed by calls to the functions controlling

various settings. At a minimum, the correct video input, video system, and clock rate(for
HD only) should be set:

input source: S2226_SetInput();

video system: S2226_SetVidSys(), S2226_SetVidSize();

advanced video system(for 59.94 HZ NTSC): S2226_SetReducedClock();

video parameters (brightness, contrast, saturation, hue): S2226_SetLevel();

4. A call to S2226_StartRecord() starts the 2226 and records to file.

S2226_StopStream() stops recording from the 2226. The demo application also shows
how to capture the data for other purposes using the callback feature. Do not unplug the
input signal before S2226_StopStream() is called.

5. During the recording the following function could optionally be used to obtain some useful

information.

S2226_GetStatus() – current status, current recorded file size and path;

6. S2226_CloseBoard() must be called before application terminates to clean up properly

and close the board handle.

Demo applications

The SDK includes a demo application provided with the source code to illustrate the use of SDK’s
functions.

Function Summary

Initialization

Initialization is done by opening the board. If unsure what board to open (in the case of multiple
boards), use the enumerate function S2226_Enumerate to find detect the number of boards and
associate each board index with a serial number. If using a single board, it is possible just to open it
with S2226_OpenBoard. Before any other function in the SDK can be used (except S2226_Enumerate),
the board must be opened with S2226_OpenBoard. This function gives a handle to the board, which is
used for the other functions. Only one instance of the board should be opened at one time.

10

Advertising
This manual is related to the following products: