FrameSnapSink::snapSingle Method |
|||||||||||||||||
This method lets the FrameSnapSink copy the next image to be recevied from the device into a FrameQueueBuffer. | |||||||||||||||||
Syntax: | tFrameQueueBufferPtr snapSingle( int64_t timeout_in_ms = -1 ); Error snapSingle( tFrameQueueBufferPtr& rval, int64_t timeout_in_ms = -1 ); |
||||||||||||||||
|
|||||||||||||||||
Return Value: | The first overload returns a pointer to a filled buffer. If no image was received before the timeout elapsed, this pointer might be nullptr. The second overload returns an error value describing whether the function call succeeded. |
||||||||||||||||
Remarks: | The buffer is either pre-allocated by calling allocAndQueueBufferCache, or supplied as the in/out parameter rval. This method blocks until either an image has been received, or the specified timeout has elapsed. This function can only called after the device was started by calling Grabber::startLive. |
||||||||||||||||
See also: | FrameSnapSink, FrameSnapSink::allocAndQueueBufferCache |