CPullPin.OnError 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.]

The OnError method is called if an error occurs during streaming. The derived class must implement this method.

Syntax

virtual void OnError(
   HRESULT hr
) = 0;

Parameters

hr

Specifies the HRESULT value returned by the method that failed.

Return value

This method does not return a value.

Remarks

The object calls this method whenever an error occurs that halts the data-pulling thread. The filter can use this method to recover from streaming errors gracefully. In most cases, the error is returned from the upstream filter, so the upstream filter is responsible for reporting it to the Filter Graph Manager. If the error occurs inside the CPullPin::Receive method, your filter should send an EC_ERRORABORT event. (See IMediaEventSink::Notify.)

Requirements

Requirement Value
Header
Pullpin.h
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CPullPin Class