The CRendererInputPin class channels calls to the rendering filter.
Protected Data Members
m_pRenderer Pointer to the CBaseRenderer object.
Member Functions
Allocator Retrieves a pointer to the default memory allocator. CRendererInputPin Constructs a CRendererInputPin object.
Overridable Member Functions
Active Switches the pin to the active (paused or running) mode. BeginFlush Informs the pin to begin a flush operation. BreakConnect Adds customized code upon breaking a connection. CheckMediaType Determines if the pin can support a specific media type. CompleteConnect Completes the connection. 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. Inactive Switches the pin to an inactive state and releases the memory of the allocator. Receive Retrieves the next block of data from the stream. SetMediaType Sets the media type of the pin.
QueryId Retrieves an identifier for the pin.
Switches the pin to the active (paused or running) mode.
Syntax
HRESULT Active(void);
Return Value
Returns an HRESULT value.
Remarks
This member function overrides CBasePin::Active and calls the renderer filter's CBaseRenderer::Active member function.
Retrieves a pointer to the default memory allocator inherited from CBaseInputPin.
Syntax
IMemAllocator* Allocator(void) const;
Return Value
Returns a pointer to an IMemAllocator interface.
Remarks
The returned pointer is CBaseInputPin::m_pAllocator.
Informs the pin to begin a flush operation.
Syntax
HRESULT BeginFlush(void);
Return Value
Returns an HRESULT value.
Remarks
This member function implements the IPin::BeginFlush method. It overrides CBaseInputPin::BeginFlush and calls the renderer filter's BeginFlush member function before calling the base class implementation.
Override this member function to add customized code upon breaking a connection.
Syntax
HRESULT BreakConnect(void);
Return Value
Returns an HRESULT value.
Remarks
This member function overrides CBasePin::BreakConnect and calls the renderer filter's BreakConnect member function before calling the base class implementation.
Override this member function to determine if the pin can support this specific media type.
Syntax
HRESULT CheckMediaType( const CMediaType *pmt );
Parameters
- pmt
- Pointer to a media type object that contains the proposed media type.
Return Value
Returns an HRESULT value.
Remarks
This member function is typically called before calling the CRendererInputPin::SetMediaType member function.
This member function overrides CBasePin::CheckMediaType and calls the pure virtual CBaseRenderer::CheckMediaType member function, which must be overridden.
Override this member function to inform the derived class when the connection process has completed.
Syntax
HRESULT CompleteConnect( IPin *pReceivePin );
Parameters
- pReceivePin
- Pointer to the connected (receiving) pin.
Return Value
Returns an HRESULT value.
Remarks
This member function overrides CBasePin::CompleteConnect and calls the renderer filter's CompleteConnect member function before calling the base class implementation.
Constructs a CRendererInputPin object.
Syntax
CRendererInputPin( CBaseRenderer *pRenderer, HRESULT *phr, LPCWSTR Name );
Parameters
- pRenderer
- Pointer to the rendering filter in the base class.
- phr
- Pointer to an HRESULT value.
- Name
- Pointer to the pin name.
Return Value
No return value.
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 and calls the renderer filter's EndFlush member function before calling the base class implementation.
Note that because this is a renderer, it does not pass the flush on downstream.
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 and then calls the CBaseRenderer::EndOfStream member function.
Informs the pin that it is going into the inactive state.
Syntax
HRESULT Inactive(void);
Return Value
Returns an HRESULT value.
Remarks
This member function overrides CBaseInputPin::Inactive. It calls the renderer filter's CBaseRenderer::Inactive member function, which returns NOERROR by default.
Retrieves an identifier for the pin.
Syntax
HRESULT QueryId( LPWSTR *Id );
Parameters
- Id
- Pointer to the pin identifier.
Return Value
Returns an HRESULT value.
Remarks
This member function implements the IPin::QueryId method. It overrides the CBasePin::QueryId member function and assigns the string "In" to Id. Note that it uses the Microsoft® Win32® CoTaskMemAlloc function to initialize Id, so the user is responsible for freeing the format block by using CoTaskMemFree.
Retrieves the next block of data from the stream.
Syntax
HRESULT Receive( IMediaSample *pMediaSample );
Parameters
- pMediaSample
- Pointer to the media sample.
Return Value
Returns an HRESULT value.
Remarks
This member function implements the IMemInputPin::Receive method, and it overrides the CBaseInputPin::Receive member function, which it calls to verify formats.
This is a blocking synchronous member function. It blocks and waits until it is time for the sample to be rendered. (It calls CBaseRenderer::Receive, which actually does the blocking.) Because only one sample is ever outstanding, this member function checks the media type and calls CRendererInputPin::SetMediaType to change the pin's media type if the sample's type has changed.
Call the IUnknown::AddRef method if you must hold the returned data block beyond the completion of the CRendererInputPin::Receive member function. If you call AddRef, be sure to call the IUnknown::Release method upon completion of AddRef.
Override this member function to set the media type of the pin.
Syntax
HRESULT SetMediaType( const CMediaType *pmt );
Parameters
- pmt
- Pointer to a media type object that was previously agreed upon.
Return Value
Returns an HRESULT value.
Remarks
This member function overrides CBasePin::SetMediaType and calls the renderer filter's SetMediaType member function, which returns NOERROR by default, after calling the base class implementation.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.