IPin::EndOfStream method (strmif.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 EndOfStream method notifies the pin that no additional data is expected, until a new run command is issued to the filter.

Applications should not call this method. This method is called by other filters to signal the end of the stream.

Syntax

HRESULT EndOfStream();

Return value

Returns an HRESULT value. Possible values include the following.

Return code Description
S_OK
Success.
E_UNEXPECTED
The pin is an output pin.

Remarks

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

This method sends an end-of-stream notification to the pin. The pin delivers the notification downstream. It must serialize end-of-stream notifications with IMemInputPin::Receive calls. If the pin queues media samples for delivery, it should queue end-of-stream notifications as well. The IPin::BeginFlush method flushes any queued end-of-stream notifications.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Data Flow in the Filter Graph

Error and Success Codes

IPin Interface