CRenderedInputPin Class

CRenderedInputPin class hierarchy

The CRenderedInputPin 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

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

CRenderedInputPin Constructs a CRenderedInputPin object.

Overridable Member Functions

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.

Syntax

HRESULT Active(void);

Return Value

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.

Syntax

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

Parameters

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

Return Value

No return value.

CRenderedInputPin::EndFlush

CRenderedInputPin Class

Informs the pin to end a flush operation.

Syntax

HRESULT EndFlush(void);

Return Value

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.

Syntax

HRESULT EndOfStream(void);

Return Value

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.

Syntax

HRESULT Run(
    REFERENCE_TIME tStart
    );

Parameters

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

Return Value

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.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.