beautypg.com

Sensoray 812 Windows User Manual

Page 16

background image

MID812_API int S812_RegisterCallback(

cbfunc_t callback_function_video,

cbfunc_t callback_function_audio,

int devid,

int strmidx

);

Registers a callback function for video and/or audio. Use NULL if callback is not desired.

Parameters

callback_function_video

callback function for video or NULL if none. See header file for definition of cbfunc_t

function.

callback_function_audio

callback function for audio or NULL if none. See header file for definition of cbfunc_t

function.

devid

device id in the system (use 0 with a single board installed).

strmidx

channel index (0-7)

Returns

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

MID812_API int S812_StartPreviewAndRecord(

char *fileName,

int devid,

int strmidx

);

Starts recording to a file with video preview. Please see preview in the function summary for more
information about preview. It is not recommended to record more than one stream at a time using
this function.

Parameters

fileName

full path to the target file, no extension.

devid

device id in the system (use 0 with a single board installed).

16