FrameSnapSink::snapSequence Method

This method lets the FrameSnapSink copy the next images to be recevied from the device into a collection of FrameQueueBuffers.
Syntax:
tFrameQueueBufferList  snapSequence( size_t count, int64_t timeout_in_ms = -1 );
Error                  snapSequence( tFrameQueueBufferList& rval, size_t count, int64_t timeout_in_ms = -1 );

Parameter Description
count

The number of images requested

timeout_in_ms

Specifies the time the sink should wait for all images to be received from the device before returning with an timeout error.

rval

This parameter will be filled with pointers to image buffers containing the images received from the device. If rval already contains pointers to image buffers, these image buffers are filled. Otherwise, the buffers allocated by a previous call to allocAndQueueBufferCache are used.

Return Value:

The first overload returns a list of pointer to filled buffers. If not all buffers could be filled before the timeout elapsed, the returned list might be shorter than count.

The second overload returns an error value describing whether the function call succeeded. If not all buffers could be filled before the timeout elapsed, the list in rval be shorter than the list passed in representing the buffers which could be filled.

Remarks:

The buffers are either pre-allocated by calling allocAndQueueBufferCache, or supplied as the in/out parameter rval.

This method blocks until either all images have been received and copied, or the specified timeout has elapsed.

This function can only be called after the device was started by calling Grabber::startLive.

See also: FrameSnapSink, FrameSnapSink::allocAndQueueBufferCache

<< FrameSnapSink