Microsoft Windows CE 3.0  

IAsyncReader::Request

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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 HRESULTvalue 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::GetPointeruntil 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 dwUserparameter is used by the caller to identify the sample that returned from the IAsyncReader::WaitForNextmethod. It has no meaning within IAsyncReaderbut could be used to track individual sample information.