Condividi tramite


IMediaObject::Flush method (mediaobj.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The Flush method flushes all internally buffered data.

Syntax

HRESULT Flush();

Return value

Returns S_OK if successful. Otherwise, returns an HRESULT value indicating the cause of the error.

Remarks

The DMO performs the following actions when this method is called:

  • Releases any IMediaBuffer references it holds.
  • Discards any values that specify the time stamp or sample length for a media buffer.
  • Reinitializes any internal states that depend on the contents of a media sample.
Media types, maximum latency, and locked state do not change.

When the method returns, every input stream accepts data. Output streams cannot produce any data until the application calls the IMediaObject::ProcessInput method on at least one input stream.

Requirements

Requirement Value
Target Platform Windows
Header mediaobj.h (include Dmo.h)
Library Dmoguids.lib

See also

IMediaObject Interface