Sensoray 2224 Windows User Manual

Page 40

Advertising
background image

pointer to the value to receive the right channels current peak

amplitude that is decayed over time in decibels.

hdev

handle to device (obtained from S2226_OpenBoard).

Returns

0 on success, negative value if error (see mid2226types.h for error codes list).

MID2226_API int S2226_StartCallback(

HANDLE hdev

);

Starts streaming with H264 data sent to the callback function registered with
S2226_RegisterCallback function. After S2226_StopStream, callback in reset. Callbacks should be
short and return quickly.

Parameters

hdev

handle to device (obtained from S2226_OpenBoard).

Returns

0 on success, negative value if error (see mid2226types.h for error codes list).

MID2226_API int S2226_RegisterCallback(

cbfunc_t callback_function,

HANDLE hdev

);

Registers a callback function. Call before S2226_StartPreview, S2226_StartRecord,
S2226_StartPreviewAndRecord or S2226_StartCallback to receive the data as it is captured. Data
available in the callback is the compressed MPEG H.264 transport stream.

To turn off callbacks, call with an argument of NULL for the callback function.

The callback is for the MPEG stream only.

MPEG data is received from the board in a bursty manner. As such, the callback may be called at
any time during streaming. Callbacks must be short and return quickly. If not, buffer the data and
process it in another thread. Do not call any stream control functions in the callback

Parameters

callback_function

40

Advertising
This manual is related to the following products: