Grabber::snapImages Method [Deprecated]

Snaps images from the live stream to the current active MemBuffer.
Syntax:
bool snapImages( DWORD count = 1, DWORD timeout = 0xFFFFFFFF );
Parameter Description
count

Specifies the number of frames to be grabbed into the active MemBufferCollection.

timeout

Specifies the timeout time in milliseconds after which the SnapImages method returns if

1. the device does not send samples (e.g. ExternalTransport is set to stop)

2. the copy operation takes too long

3. all buffers are locked

4. the user callback takes too long.

If timeout == 0xFFFFFFFF the method waits forever.

Return value:

true, if the images could be snapped successfully, false otherwise.

Remarks:

This method snaps an image sequence of the specified length to the currently active MemBufferCollection. This method may be called only, if Grabber::startLive was called before.

There are two ways to access grabbed image data:

The memory buffer collection is used as a ring buffer. Refer to the class MemBufferCollection for details.

If a GrabberListener object is used, the method GrabberListener::frameReady will be called as soon as the currently grabbed frame is complete.

Or use Grabber::setCallback in order to install a callback which will be called as soon as the currently grabbed frame is complete. An application should not use the GrabberListener::frameReady method and a callback simultaneously.

It cannot be guaranteed that the callback, or the GrabberListener::frameReady method are called for every frame. Depending on the power of your processor and the bandwidth of the image stream, the callback may not be called for certain frames. This does not mean that image data will be lost. Despite this, it is guaranteed that the callback for the last frame of the sequence is called, if at least one frame could be copied.

Locked buffers will never be overwritten.

snapImages will block until the last image is grabbed and the last callback function has returned, or when timeout != 0xFFFFFFFF, until the timeout has elapsed.

Information:

This method is deprecated since version 3.0.
This method only works when using the deprecated FrameGrabberSink. When using the FrameHandlerSink, use FrameHandlerSink::snapImages or FrameHandlerSink::snapImagesAsync.

See also: Grabber, VideoNormItem, Grabber::getAvailableVideoNorms, Grabber::isVideoNormAvailableWithCurDev

<< Grabber

This site is part of The Imaging Source Network. Other sites include Company Portal, Image Processing, Astronomy Cameras, Astronomy Cameras Blog, Blog caméras d'astronomie, Astronomy Cameras Competition, TX Text Control, LiveDocx, phpLiveDocx and Forums.