Export (0) Print
Expand All

INuiSensor::NuiImageStreamGetNextFrame Method

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Gets the next frame of data.

public:
HRESULT NuiImageStreamGetNextFrame(
         HANDLE hStream,
         DWORD dwMillisecondsToWait,
         NUI_IMAGE_FRAME *pImageFrame
)

Parameters

hStream
Type: HANDLE
[in] A handle to the image stream.
JJ663862.note(en-us,IEB.10).gifNote
Open the stream by calling the NuiImageStreamOpen method, before calling NuiImageStreamGetNextFrame.
dwMillisecondsToWait
Type: DWORD
[in] The time in milliseconds to wait before returning without a frame.
pImageFrame
Type: NUI_IMAGE_FRAME
A pointer to a NUI_IMAGE_FRAME structure that contains the next image frame in the specified stream. The pFrameTexture member of the structure points to an INuiFrameTexture instance that contains the frame data.

Return Value

Type: HRESULT
Returns S_OK if successful; otherwise, returns one of the failure codes in the following table.
ErrorDescription
S_FALSEThe waiting timeout expired before a frame was available and hStream was opened using the NUI_IMAGE_STREAM_FLAG_SUPPRESS_NO_FRAME_DATA flag.
E_INVALIDARGThe value of the hStream parameter is NULL.
E_NUI_FRAME_NO_DATAThe waiting timeout expired before a frame was available.
E_POINTERThe value of the pImageFrame parameter is NULL.

Header: Declared in NuiSensor.h; however, include NuiApi.h in your project.

Community Additions

ADD
Show:
© 2014 Microsoft