IMediaEvent::WaitForCompletion method

The WaitForCompletion method waits for the filter graph to render all available data. The filter graph must be running or the method fails.

Syntax


HRESULT WaitForCompletion(
  [in]   long msTimeout,
  [out]  long *pEvCode
);

Parameters

msTimeout [in]

Time-out interval, in milliseconds. Pass zero to return immediately. Pass the value INFINITE to block indefinitely.

pEvCode [out]

Pointer to a variable that receives an event code. See Remarks for more information.

Return value

Returns an HRESULT value. Possible values include the following.

Return codeDescription
S_OK

Success.

E_ABORT

Time-out expired.

VFW_E_WRONG_STATE

The filter graph is not running.

 

Remarks

This method blocks until the time-out expires, or one of the following events occurs:

During the wait, the method discards all other event notifications.

If the return value is S_OK, the pEvCode parameter receives the event code that ended the wait. When the method returns, the filter graph is still running. The application can pause or stop the graph, as appropriate.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Control.h (include Dshow.h)

Library

Strmiids.lib

See also

Error and Success Codes
IMediaEvent Interface

 

 

Community Additions

ADD
Show:
© 2014 Microsoft