This input pin class channels calls to the rendering filter.
Protected Data Members
Name | Description |
m_pRenderer | Pointer to the CBaseRenderer object. |
Member Functions
Name | Description |
Allocator | Retrieves a pointer to the default memory allocator. |
CRendererInputPin | Constructs a CRendererInputPin object. |
Overridable Member Functions
Name | Description |
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 | Returns the next block of data from the stream. |
SetMediaType | Sets the media type of the pin. |
Implemented IPin Methods
Name | Description |
QueryId | Retrieves an identifier for the pin. |
Switches the pin to the active (paused or running) mode.
HRESULT Active( );
Returns an HRESULT value.
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.
IMemAllocator* Allocator( ) const;
Returns a pointer to an IMemAllocator interface.
The returned pointer is CBaseInputPin::m_pAllocator.
Informs the pin to begin a flush operation.
HRESULT BeginFlush( );
Returns an HRESULT value.
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.
HRESULT BreakConnect( );
Returns an HRESULT value.
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.
HRESULT CheckMediaType(
const CMediaType *pmt
);
Returns an HRESULT value.
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.
HRESULT CompleteConnect(
IPin *pReceivePin
);
Returns an HRESULT value.
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.
CRendererInputPin(
CBaseRenderer *pRenderer,
HRESULT *phr,
LPCWSTR Name
);
No return value.
Informs the pin to end a flush operation.
HRESULT EndFlush(void);
Returns an HRESULT value.
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.
HRESULT EndOfStream(void);
Returns an HRESULT value.
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.
HRESULT Inactive(void);
Returns an HRESULT value.
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.
HRESULT QueryId(
LPWSTR *Id
);
Returns an HRESULT value.
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.
Returns the next block of data from the stream.
HRESULT Receive(
IMediaSample *pMediaSample
);
Returns an HRESULT value.
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.
HRESULT SetMediaType(
const CMediaType *pmt
);
Returns an HRESULT value.
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.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.