Sensoray 2251 Rev.A User Manual

Page 28

Advertising
background image

JPEG frames, no rendering is performed. No DirectShow filters are required to be installed for
MJPEG mode to function.

Parameters

mode

MID2250_OPMODE_NORMAL – normal operation mode,

MID2250_OPMODE_MJPEGCAPTURE – MJPEG capture mode.

board

board number in the system (use 0 for single board setups).

Returns

0 if success, negative if error.

Example

The following code illustrates simple capture of JPEG compressed frames in MJPEG mode.

int main()

{
int i;

char filename[260];
SN_Open( NULL);

SN_SetOpMode(MID2250_OPMODE_MJPEG_CAPTURE);
SN_SetEncodeType( MID2250_ENCODE_MOTIONJPEG);

SN_SetBitrate( 6000000); // Controls JPG picture quality
SN_StartStream( );

for( i = 0; i< 50; i++)
{

sprintf(filename, "c:\\snapshot%03d", i);
SN_SnapshotToFile(filename, MID2250_FILE_JPEG);

}
SN_StopStream();

SN_Close();
return 0;

}

MID2250_API int SN_GetNumBoards(

int *pNumBoards

);

Retrieve the number of boards in the system.

Parameters

pNumBoards

Returns the number of boards.

Returns

28

Advertising
This manual is related to the following products: