Called when the IMFSourceReader::ReadSample method completes.
public:
HRESULT OnReadSample(
HRESULT hrStatus,
DWORD dwStreamIndex,
DWORD dwStreamFlags,
LONGLONG llTimestamp,
IMFSample *pSample
)
hrStatus
Type: HRESULT
[in] The status code. If an error occurred while processing the next sample, this parameter contains the error code.
dwStreamIndex
Type: DWORD
[in] The zero-based index of the stream that delivered the sample.
dwStreamFlags
Type: DWORD
[in] A bitwise OR of zero or more flags from the MF_SOURCE_READER_FLAG enumeration.
llTimestamp
Type: LONGLONG
[in] The time stamp of the sample, or the time of the stream event indicated in dwStreamFlags. The time is given in 100-nanosecond units.
pSample
Type: IMFSample *
[in, optional] A pointer to the IMFSample interface of a media sample. This parameter might be NULL.
Type: HRESULT
Returns an HRESULT value. Currently, the source reader ignores the return value.
Refer to Media Foundation return codes.
The pSample parameter might be NULL. For example, when the source reader reaches the end of a stream, dwStreamFlags contains the MF_SOURCE_READERF_ENDOFSTREAM flag, and pSample is NULL.
If there is a gap in the stream, dwStreamFlags contains the MF_SOURCE_READERF_STREAMTICK flag, pSample is NULL, and llTimestamp indicates the time when the gap occurred.
This interface is available on Windows Vista if Platform Update Supplement for Windows Vista is installed.
Header: Declared in mfreadwrite.h.