Metrologic Instruments IS4910 Series Scanner User Manual


 
20
C
AMERA
S
UPPORT
L
IBRARY
C
AM
L
IB
Parameters:
cam_handle - [in] handle to the camera device returned by the camOpen function.
image_buf - [out] image data buffer (optional in the video mode).
image_buf_size - [in] image data buffer’s size, in bytes (optional in the video mode).
frame_offset - [out] if not NULL, the frame offset, in bytes, starting with 0.
Return Value:
0: Success; -1: Failure
camStartVideo
This function turns the camera into video mode. In the video mode, the camera continuously acquires
images and puts them frame-by-frame in the image buffer, the pointer to and the size of which must be
passed to the function. An application can request the most recent frame by calling
camAcquireImageEx(). In case of the buffer overrun, the camera keeps acquiring images overriding the
next-to-most-recent frame, providing that at least three frames can fit in the image buffer; otherwise, it
holds the image acquisition up until at least one frame is freed by the next call to camAcquireImageEx().
The image buffer of the size sufficient to hold at least one frame of the entire image (1280 x 960 eight-bit
pixels maximum) should be allocated by the application prior to calling the function, and the pointer to it
along with the information about the buffer’s size should be passed to the function. It is recommended to
have the image buffer’s size such that at least three frames could fit in it.
The image buffer is automatically mapped into the memory space of the IS4910 device driver, so that the
image acquisition is done directly to the buffer.
The video mode can be stopped or paused. When stopped by calling camStopVideo(), all frames in the
image buffer are reset, so that the next call to camStartVideo() starts image acquisition from the
beginning of the image buffer. In fact, camStartVideo() always starts image acquisition from the
beginning of the image buffer.
When video mode is paused by calling camPauseVideo(), the frames are not reset, so that the call to
camResumeVideo() resumes the image acquisition from the last frame acquired before the video mode
was paused.
Prototype:
int camStartVideo (int cam_handle, unsigned char *image_buf, long image_buf_size);
Parameters:
cam_handle - [in] handle to the camera device returned by the camOpen function.
image_buf - [out] image data buffer.
image_buf_size - [in] image data buffer’s size, in bytes.
Return Value:
0: Success; -1: Failure