Share via


IAsyncReader2::GetNext (Compact 7)

3/12/2014

This method asynchronously returns the next media sample.

Syntax

HRESULT GetNext(
  IMediaSample** ppSample,
  DWORD dwTimeout
);

Parameters

  • dwTimeout
    [in] Maximum time to wait for the media sample to return, in milliseconds.

Return Value

Returns the HRESULT values shown in the following table.

Value Description

S_OK

The media sample was returned.

VFW_S_NO_MORE_ITEMS

The end of the stream has been reached.

S_FALSE

An unknown error occurred or this is the end of the file.

Remarks

You must set the start position of the media stream by calling IAsyncReader2::SetCurrentPosition before you call this method.

This method retrieves the next media sample from the upstream filter. For information about retrieving the allocator, see IAsyncReader::RequestAllocator.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

IAsyncReader2 Interface