Compartir a través de


IAsyncReader::Request (Compact 2013)

3/26/2014

This method queues a request for data.

Syntax

HRESULT Request(
  IMediaSample* pSample,
  DWORD dwUser 
);

Parameters

  • pSample
    Media sample being requested.
  • dwUser
    [in] 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_BADALIGN

An invalid alignment was specified.

VFW_E_SAMPLE_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.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

IAsyncReader Interface