Sensoray 615 User Manual

Page 8

Advertising
background image

8

Image buffer structure BUFFER

typedef struct {
void *pBmp; //pointer to bitmap (uncompressed) buffer;
void *pJpeg; //pointer to compressed data buffer;
DWORD jpegsize; //actual size of jpeg data;
LPBITMAPINFO lpbmi; //pointer to BITMAPINFO structure;
int xpchan; //one of 16 channels (1-16) captured from;
struct _timeb timestamp; //timestamp structure;
int videopresent; //video present flag;
DWORD cqempty; //command queue empty (cumulative);
DWORD bqfull; //buffer queue full (cumulative);
DWORD incomplete; //compression incomplete (cumulative);
DWORD zerror; //compression error (cumulative);
} BUFFER;

The lpbmi member is provided to assist in displaying the bitmap, if necessary. Note: YCrCb bitmaps

cannot be displayed using Windows API functions.

The xpchan member is provided to assist in identifying the channel that the image was captured

from.

The timestamp structure provides the system time reflecting the start of the buffer’s acquisition.

Note that the millisecond value (timestamp.millitm) has the system timestamp granularity of about
55 ms (which means that some consecutively captured frames may have the same timestamp
value).

The videopresent flag returns the status of selected decoder channel at the start of capture; it is
set to 1, if the video is detected, and reset to 0 if no video is present. It is provided as means of

distinguishing between a black field captured in case of no video present, and a dark video. This
flag is not real time. The state of this flag is ahead of the captured video by one frame (due to the
image buffering on the board). It is recommended to “integrate” the state of this flag over several

frames before making a decision on whether video is present, or not.

Advertising