次の方法で共有


IAsyncReader::WaitForNext (Compact 2013)

3/26/2014

This method blocks until the next read requested through IAsyncReader::Request completes or the time-out occurs.

Syntax

HRESULT WaitForNext(
  DWORD dwTimeout,
  IMediaSample** ppSample,
  DWORD* pdwUser 
);

Parameters

  • dwTimeout
    [in] Time-out in milliseconds; can be zero or INFINITE.
  • ppSample
    [out] Completed sample.
  • pdwUser
    User context.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Current DirectShow implementation return values include the following.

Value

Description

VFW_E_TIMEOUT

A time-out has expired.

VFW_E_WRONG_STATE

The operation could not be performed because the filter is in the wrong state.

E_FAIL

Failure.

S_OK

Success.

Remarks

Samples may not be returned in order. If there is a read error of any sort, a notification will already have been sent by the source filter, and HRESULT will be an error. If ppSample is not null, a request has been completed with the result code returned.

The pdwUser parameter returns the caller's context DWORD corresponding to the sample returned.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

IAsyncReader Interface