IInfraredFrameSource::SubscribeFrameCaptured Method

Event that is used to notify the application that the next frame is ready to be delivered to subscribed readers or if a frame has been dropped.

Syntax

public:
HRESULT SubscribeFrameCaptured(
         WAITABLE_HANDLE *waitableHandle
)

Parameters

  • waitableHandle
    Type: WAITABLE_HANDLE
    [out] The handle to the event handler.

Return value

Type: HRESULT
Returns S_OK if successful; otherwise, returns a failure code.

Remarks

Applications are only allowed to hold one frame locked at any given time. This event can be used to release the currently locked frame to allow the new one to be delivered to all subscribed readers. If the application does not free the old frame before a new frame arrives, the event will be raised again to notify that the frame has been dropped.

The application should call the GetFrameCapturedEventData method to retrieve the IFrameCapturedEventArgs. It should then look at the FrameStatus property to determine if a new frame has been queued, or if a frame has been dropped.

Requirements

Header: kinect.h

Library: kinect20.lib