RtgvGrabFrame
RtgvGrabFrame retrieves a frame from a camera.
Syntax
BOOL RtgvGrabFrame(
[in] HANDLE cameraHandle,
[out] PRTGV_FRAME pFrame,
[in] UINT32 msWait
);
Parameters
[in] cameraHandle
The handle of the camera from which a frame should be grabbed.
[out] pFrame
A pointer to an RTGV_FRAME object that receives the frame from the camera specified by cameraHandle.
[in] msWait
The timeout, in milliseconds, of the grab command. If the timeout is reached, and a frame has still not been successfully grabbed, the API fails. A timeout of INFINITE will cause this to wait infinitely.
Return Values
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.
Remarks
RtgvGrabFrame cannot be called before calling RtgvInitialize and RtgvStartStream or RtgvStartReceiveStream/RtgvStartCameraStream.
To find the camera to query, call RtgvInitialize and then call RtgvEnumerateCameras to get an RTGV_CAMERA_INFO array describing each camera found on the network, along with its handles.
If RtgvGrabFrame is called faster than the rate at which the camera sends images, the function will fail immediately. In this case, the error code RTGV_ERROR_NO_IMAGE will be set.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtgvApi.h |
RtgvApi.lib |