IAsyncReader::Request

Queues a request for data.

HRESULT Request(
IMediaSample* pSample,
DWORD dwUser );

Parameters

  • pSample
    Media sample being requested.
  • dwUser
    [in] User context.

Return Values

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

Value Description
VFW_E_BADALIGN An invalid alignment was specified.
VFW_E_MEDIA_TIME_NOT_SET Time has not been set.
HRESULT_FROM_WIN32 Request for data past end of file.
NOERROR No error.
S_OK Success.

Remarks

Media sample start and stop times contain the requested absolute byte position (start-inclusive and stop-exclusive). This method might fail if the sample is not obtained from an agreed allocator or if the start or stop position does not match the agreed alignment. The samples allocated from the source pin's allocator might fail IMediaSample::GetPointer until after returning from IAsyncReader::WaitForNext.

The stop position must be aligned, which means it might exceed duration. On completion, the stop position will be corrected to the unaligned actual data.

The dwUser parameter is used by the caller to identify the sample that returned from the IAsyncReader::WaitForNext method. It has no meaning within IAsyncReader but could be used to track individual sample information.

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.