Export (0) Print
Expand All

IPin::BeginFlush method

The BeginFlush method begins a flush operation.

Applications should not call this method. This method is called by other filters, to flush data from the graph.

Syntax


HRESULT BeginFlush();

Parameters

This method has no parameters.

Return value

Returns an HRESULT value. Possible values include the following.

Return codeDescription
S_OK

Success.

E_UNEXPECTED

The pin is an output pin.

 

Remarks

Call this method only on input pins. Output pins return E_UNEXPECTED.

In a flush operation, a filter discards whatever data it was processing. It rejects new data until the flush is completed. The flush is completed when the upstream pin calls the IPin::EndFlush method. Flushing enables the filter graph to be more responsive when events alter the normal data flow. For example, flushing occurs during a seek.

When BeginFlush is called, the filter performs the following steps:

  1. Passes the IPin::BeginFlush call downstream.
  2. Sets an internal flag that causes all data-streaming methods to fail, such as IMemInputPin::Receive.
  3. Returns from any blocked calls to the Receive method.

When the BeginFlush notification reaches a renderer filter, the renderer frees any samples that it holds.

After BeginFlush is called, the pin rejects all samples from upstream, with a return value of S_FALSE, until the IPin::EndFlush method is called.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Strmif.h (include Dshow.h)

Library

Strmiids.lib

See also

Data Flow in the Filter Graph
Error and Success Codes
IPin Interface

 

 

Community Additions

ADD
Show:
© 2014 Microsoft