Muokkaa

Jaa


CBaseRenderer.SendEndOfStream method

[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.]

If end-of-stream was reached, the SendEndOfStream method schedules an EC_COMPLETE event for the filter graph manager.

Syntax

virtual HRESULT SendEndOfStream();

Parameters

This method has no parameters.

Return value

Returns an HRESULT value. Possible values include those in the following table.

Return code Description
S_FALSE
The filter graph manager is not accepting event notifications.
S_OK
Success.

Remarks

The filter might receive an end-of-stream notification before the current sample's stop time. If so, the filter should wait before posting an EC_COMPLETE notification to the filter graph manager.

Therefore:

  • If the filter has received an early end-of-stream (EOS) notification, this method schedules a timer event. When the timer event is activated, the filter posts the EC_COMPLETE event.
  • If the filter has received an EOS notification that was not early, this method posts the EC_COMPLETE event immediately.
  • If the filter does not have any pending EOS notification, the method returns without doing anything.

The timer callback method is CBaseRenderer::TimerCallback. To deliver the EC_COMPLETE event, the filter calls the CBaseRenderer::NotifyEndOfStream method.

Requirements

Requirement Value
Header
Renbase.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CBaseRenderer Class