Microsoft DirectX 8.0

CRendererInputPin Class

CRendererInputPin class hierarchy

Input pin for the CBaseRenderer class. Except where noted, the methods in this class delegate to corresponding methods on the CBaseRenderer class.

Declaration: Renbase.h

Protected Member Variables
m_pRendererPointer to the filter.
Public Methods
CRendererInputPinConstructor method.
BreakConnectAdds customized code upon breaking a connection.
CompleteConnectCompletes the connection.
CheckMediaTypeDetermines if the pin can support a specific media type.
ActiveSwitches the pin to the active (paused or running) mode.
InactiveSwitches the pin to an inactive state and releases the memory of the allocator.
SetMediaTypeSets the media type of the pin.
AllocatorRetrieves a pointer to the default memory allocator.
IPin Methods
QueryIdRetrieves an identifier for the pin.
EndOfStreamInforms the pin that no additional data is expected until a new run command is issued.
BeginFlushInforms the pin to begin a flush operation.
EndFlushInforms the pin to end a flush operation.
IMemInputPin Methods
ReceiveRetrieves the next block of data from the stream.

CRendererInputPin.m_pRenderer

CRendererInputPin Class

Pointer to the filter.

Syntax

CBaseRenderer *m_pRenderer;

CRendererInputPin::Active

CRendererInputPin Class

Notifies the pin that the filter is now active. Overrides the CBasePin::Active method.

Syntax

HRESULT Active(void);

Return Value

Returns an HRESULT value.

CRendererInputPin::Allocator

CRendererInputPin Class

Retrieves a pointer to the memory allocator.

Syntax

IMemAllocator* Allocator(void) const;

Return Value

Returns a pointer to the allocator's IMemAllocator interface, or NULL.

Remarks

This method returns the CBaseInputPin::m_pAllocator member variable. The method does not increment the reference count on the interface. This method is strictly an accessor method.

CRendererInputPin::BeginFlush

CRendererInputPin Class

Begins a flush operation. Overrides the CBaseInputPin::BeginFlush method.

Syntax

HRESULT BeginFlush(void);

Return Value

Returns an HRESULT value.

CRendererInputPin::BreakConnect

CRendererInputPin Class

Releases the pin from a connection. Overrides the CBaseInputPin::BreakConnect method.

Syntax

HRESULT BreakConnect(void);

Return Value

Returns an HRESULT value.

CRendererInputPin::CheckMediaType

CRendererInputPin Class

Determines if the pin accepts a specific media type. Overrides the CBasePin::CheckMediaType method.

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.

CRendererInputPin::CompleteConnect

CRendererInputPin Class

Completes a connection to an output pin. Overrides the CBasePin::CompleteConnect method.

Syntax

HRESULT CompleteConnect(
    IPin *pReceivePin
);

Parameters

pReceivePin
Pointer to the output pin's IPin interface

Return Value

Returns an HRESULT value.

CRendererInputPin::CRendererInputPin

CRendererInputPin Class

Constructor method.

Syntax

CRendererInputPin(
    CBaseRenderer *pRenderer,
    HRESULT *phr,
    LPCWSTR Name
    );

Parameters

pRenderer
Pointer to the CBaseRenderer object that implements the filter.
phr
Pointer to a variable that receives an HRESULT value.
Name
Pointer to a Unicode™ string containing the pin identifier.

CRendererInputPin::EndFlush

CRendererInputPin Class

Ends a flush operation. Overrides the CBaseInputPin::EndFlush method.

Syntax

HRESULT EndFlush(void);

Return Value

Returns an HRESULT value.

CRendererInputPin::EndOfStream

CRendererInputPin Class

Notifies the pin that no additional data is expected. Overrides the CBasePin::EndOfStream method.

Syntax

HRESULT EndOfStream(void);

Return Value

Returns an HRESULT value.

CRendererInputPin::Inactive

CRendererInputPin Class

Notifies the pin that the filter is no longer active. Overrides the CBaseInputPin::Inactive method.

Syntax

HRESULT Inactive(void);

Return Value

Returns an HRESULT value.

CRendererInputPin::QueryId

CRendererInputPin Class

Retrieves the pin identifier. Overrides the CBasePin::QueryId method.

Syntax

HRESULT QueryId(
    LPWSTR *Id
    );

Parameters

Id
Address of a variable that receives a string containing the pin identifier.

Return Value

Returns one of the HRESULT values shown in the following table.

S_OKSuccess
E_OUTOFMEMORYInsufficient memory
E_POINTERNULL pointer argument

Remarks

This method allocates the wide-character string "In" and assigns it to the Id parameter. The caller must free the allocated memory, using the CoTaskMemFree function.

CRendererInputPin::Receive

CRendererInputPin Class

Receives the next media sample in the stream. Overrides the CBaseInputPin::Receive method.

Syntax

HRESULT Receive(
    IMediaSample *pMediaSample
    );

Parameters

pMediaSample
Pointer to the sample's IMediaSample interface.

Return Value

Returns an HRESULT value.

CRendererInputPin::SetMediaType

CRendererInputPin Class

Sets the media type for the connection. Overrides the CBasePin::SetMediaType method.

Syntax

HRESULT SetMediaType(
    const CMediaType *pmt
);

Parameters

pmt
Pointer to a CMediaType object that specifies the media type.

Return Value

Returns an HRESULT value.