CBaseRenderer Class

This is the base renderer class for writing renderers. This class handles a single input pin, all state changes, and synchronization.

Protected Data Members

Member Description
m_bAbort Stop rendering data.
m_bEOS Indicator for whether there are more samples in the stream.
m_bEOSDelivered Indicator for whether an EC_COMPLETE event has been delivered.
m_bRepaintStatus Flag to determine if an EC_REPAINT message can be signaled.
m_bStreaming Indicator for whether the filter graph is currently streaming.
m_dwAdvise Timer advise token returned by the clock.
m_EndOfStreamTimer Time that specifies the end of the stream.
m_evComplete Event signaled when the pause state is complete.
m_InterfaceLock Critical section for interfaces.
m_pInputPin Renderer input pin object.
m_pMediaSample Current media sample about to be, or being rendered.
m_pPosition CRendererPosPassThru object for passing positioning data upstream.
m_pQSink Quality control sink.
m_RendererLock Controller for access to current media sample.
m_RenderEvent Used to signal timer events.
m_SignalTime Amount of time that must elapse before CBaseRenderer returns EC_COMPLETE.
m_ThreadSignal Event signaled to release the source filter thread.

Member Functions

Member function Description
Active Called when the state is switched to paused or running. Override to add functionality.
CBaseRenderer Constructs a CBaseRenderer object.
CheckReady Determines if the event is set.
DisplayRendererState Displays the status of the video renderer. This function is available only in debug mode.
GetRealState Retrieves the actual state of the renderer.
GetRenderEvent Retrieves the event to render.
IsEndOfStream Determines if the end of the stream has been reached.
IsEndOfStreamDelivered Determines if the end of the stream has been delivered to the filter graph manager.
IsStreaming Determines if the filter is currently rendering data.
NotifyEndOfStream Sends an EC_COMPLETE event to the filter graph manager.
NotReady Forces the m_evComplete event into a nonsignaled state.
Ready Puts the m_evComplete event into a signaled state.
ResetEndOfStreamTimer Sets the end of stream timer to zero.
ScheduleSample Sets up an advise link with the clock.
SendNotifyWindow Passes the notification window handle to the upstream filter.
SendRepaint Conditionally signals an EC_REPAINT message to the filter graph.
SetAbortSignal Sets the abort signal flag.
SetRepaintStatus Resets the repaint status flag.
SignalTimerFired Resets the current advise time to zero after a timer fires.
TimerCallback Checks if it is time to signal the end of the current data stream.

Overrideable Member Functions

Member function Description
BeginFlush Signals the start of flushing on the input pin.
BreakConnect Breaks the input pin connection and resets the end-of-stream flags.
CancelNotification Cancels any currently scheduled notification with the clock.
CheckMediaType Determines if the renderer will accept a given media type.
ClearPendingSample Called to release the pending sample after it has been rendered.
CompleteConnect Called as part of the connection protocol. Override to add functionality.
CompleteStateChange Ensures that a sample is waiting before allowing a pause.
DoRenderSample Called when a sample is ready to render.
EndFlush Called when the input pin receives an end-flush notification.
EndOfStream Called when the input pin receives an end-of-stream notification.
GetCurrentSample Retrieves the current sample waiting at the video renderer.
GetPin Returns a CBasePin object to the renderer.
GetPinCount Returns the number of input pins supported.
GetMediaPositionInterface Retrieves IMediaPosition and IMediaSeeking interfaces for the video renderer.
GetSampleTimes Retrieves sample time information for this sample.
HaveCurrentSample Determines if a sample is waiting at the renderer.
Inactive Called when going into a stopped state. Override to add functionality.
NonDelegatingQueryInterface Returns an interface and increments the reference count.
OnReceiveFirstSample Provides derived classes with an opportunity to render static data.
OnRenderEnd Notifies the derived class that a sample has just finished rendering.
OnRenderStart Notifies the derived class that a sample is about to be rendered.
OnStartStreaming Notifies the derived class that rendering has started.
OnStopStreaming Notifies the derived class that rendering has stopped.
OnWaitEnd Notifies the derived class that a wait for a rendering time has just ended.
OnWaitStart Notifies the derived class that a wait for a rendering time is about to start.
Pause Tells the renderer to transition to the new (paused) state.
PrepareReceive Called to schedule a clock time when the renderer receives a sample.
PrepareRender Allows derived classes to set themselves just before a sample is rendered.
Receive Called by the source filter when a sample is available to render.
Render Asks the derived class to render the sample.
ResetEndOfStream Resets the end-of-stream flag.
Run Transitions the renderer to State_Running if it is not already in this state.
SendEndOfStream Sets the end-of-stream flag.
SetMediaType Informs the derived class of the selected media type.
ShouldDrawSampleNow Determines if the sample should be drawn between the start and stop times given.
SourceThreadCanWait Sets or resets the thread event.
StartStreaming Called to schedule any pending sample with the clock, and to display any timing information.
Stop Tells the renderer to transition to the new (stopped) state.
StopStreaming Sets an internal flag to indicate not to schedule arrival of any more samples.
WaitForRenderTime Waits for either the time to arrive or for rendering to be stopped.

Implemented IMediaFilter Methods

Method Description
GetState Determines the state of the renderer.

Implemented IBaseFilter Methods

Method Description
FindPin Retrieves a pointer to the pin with the specified identifier. (There is only one pin.)

Helper Function

Function Description
WaitForReceiveToComplete Waits for the CBaseRenderer::Receive method to complete.

Requirements

DirectShow applications and DirectShow filters have different include file and link library requirements. See Setting Up the Build Environment for more information.

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header:

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.