Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IMFSourceReader::Flush method

Flushes one or more streams.

Syntax


HRESULT Flush(
  [in] DWORD dwStreamIndex
);

Parameters

dwStreamIndex [in]

The stream to flush. The value can be any of the following.

ValueMeaning
0–0xFFFFFFFB

The zero-based index of a stream.

MF_SOURCE_READER_FIRST_VIDEO_STREAM
0xFFFFFFFC

The first video stream.

MF_SOURCE_READER_FIRST_AUDIO_STREAM
0xFFFFFFFD

The first audio stream.

MF_SOURCE_READER_ALL_STREAMS
0xFFFFFFFE

All streams.

 

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The Flush method discards all queued samples and cancels all pending sample requests.

This method can complete either synchronously or asynchronously. If you provide a callback pointer when you create the source reader, the method is asynchronous. Otherwise, the method is synchronous. For more information about the setting the callback pointer, see MF_SOURCE_READER_ASYNC_CALLBACK.

In synchronous mode, the method blocks until the operation is complete.

In asynchronous mode, the application's IMFSourceReaderCallback::OnFlush method is called when the flush operation completes. While a flush operation is pending, the IMFSourceReader::ReadSample method returns MF_E_NOTACCEPTING.

Note  In Windows 7, there was a bug in the implementation of this method, which causes OnFlush to be called before the flush operation completes. A hotfix is available that fixes this bug. For more information, see http://support.microsoft.com/kb/979567.
 

This interface is available on Windows Vista if Platform Update Supplement for Windows Vista is installed.

Requirements

Minimum supported client

Windows 7, Windows Vista and Platform Update Supplement for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

Mfreadwrite.h

See also

Source Reader
IMFSourceReader

 

 

Show:
© 2017 Microsoft