## CRenderedInputPin Class

This input pin class is provided for renderer filters that render the stream delivered from an input pin (that is, that do not have an output pin to pass the data on). It overrides CBaseInputPin to handle the end-of-stream notification and is implemented specifically so that more than one stream can be handled using this renderer (since each pin must handle the end-of-stream independently). For an example of a filter that uses this class, see Dump Sample (Dump Filter).

Protected Data Members

Name | Description
m_bAtEndOfStream | Set to TRUE when the end-of-stream notification has been received.
m_bCompleteNotified | Set to TRUE when the EC_COMPLETE notification has been sent to the filter graph manager.

Member Functions

Name | Description
CRenderedInputPin | Constructs a CRenderedInputPin object.

Overridable Member Functions

Name | Description
Active | Notifies the pin that the filter has changed state from stopped to paused.
EndFlush | Informs the pin to end a flush operation.
EndOfStream | Informs the pin that no additional data is expected until a new run command is issued.
Run | Notifies the pin that the filter has changed state from paused to running.

###

CRenderedInputPin::Active

CRenderedInputPin Class

Notifies the pin that the filter has changed state from stopped to paused or running.

HRESULT Active( );

##### Return Values

Returns an HRESULT value.

##### Remarks

This member function overrides CBasePin::Active. It sets both m_bAtEndOfStream and m_bCompleteNotified to FALSE before calling the base class implementation.

###

CRenderedInputPin::CRenderedInputPin

CRenderedInputPin Class

Constructs a CRenderedInputPin object.

CRenderedInputPin(
TCHAR *pObjectName,
CBaseFilter *pFilter,
CCritSec *pLock,
HRESULT *phr,
LPCWSTR pName
);

##### Parameters

pObjectName
  Name of the object for debugging purposes.
pFilter
  Pointer to the pin's owning filter.
pLock
  Critical section for the pin.
phr
  Pointer to an HRESULT value.
pName
  Pin name.

##### Return Values

No return value.

###

CRenderedInputPin::EndFlush

CRenderedInputPin Class

Informs the pin to end a flush operation.

HRESULT EndFlush(void);

##### Return Values

Returns an HRESULT value.

##### Remarks

This member function overrides CBaseInputPin::EndFlush. It sets both m_bAtEndOfStream and m_bCompleteNotified to FALSE before calling the base class implementation.

###

CRenderedInputPin::EndOfStream

CRenderedInputPin Class

Informs the pin that no additional data is expected until a new run command is issued.

HRESULT EndOfStream(void);

##### Return Values

Returns an HRESULT value.

##### Remarks

This member function implements the IPin::EndOfStream method. It calls CheckStreaming to see that the filter is in a streaming state, sets m_bAtEndOfStream to TRUE, and then sends the EC_COMPLETE notification to the filter graph manager.

The EC_COMPLETE filter graph notification should be issued only after all the data delivered to the pin prior to calling this member function has been processed. If the filter performs processing asynchronously, override CRenderedInputPin::EndOfStream to postpone sending the EC_COMPLETE notification until processing of all input data has completed.

###

CRenderedInputPin::Run

CRenderedInputPin Class

Notifies the pin that the filter has changed state from stopped to paused.

HRESULT Run(
REFERENCE_TIME tStart
);

##### Parameters

tStart
  Start time. Unreferenced by this class; for possible use by the derived class.

##### Return Values

Returns an HRESULT value (S_OK by default).

##### Remarks

This member function overrides the CBasePin::Run member function. It sends the EC_COMPLETE notification to the filter graph manager if m_bAtEndOfStream is TRUE.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.