Microsoft DirectX 8.0

CTransInPlaceOutputPin Class

CTransInPlaceOutputPin class hierarchy

Output pin used by the CTransInPlaceFilter class.

Declaration: Transip.h

Typically, you do not need to derive from this class. If you do, you must override the filter's CTransInPlaceFilter::GetPin method to create instances of your derived class.

Protected Member Variables
m_pTIPFilterPointer to the filter that created this pin.
Public Methods
CTransInPlaceOutputPinConstructor method.
DecideAllocatorSelects a memory allocator.
CheckMediaTypeDetermines if the pin accepts a specific media type.
SetAllocatorSpecifies an allocator for the connection.
ConnectedIMemInputPinRetrieves a pointer to the downstream input pin.
PeekAllocatorRetrieves a pointer to the pin's allocator.
IPin Methods
EnumMediaTypesEnumerates the pin's preferred media types.

CTransInPlaceOutputPin.m_pTIPFilter

CTransInPlaceOutputPin Class

Pointer to the filter that created this pin.

Syntax

CTransInPlaceFilter * const m_pTIPFilter;

CTransInPlaceOutputPin::CheckMediaType

CTransInPlaceOutputPin Class

Determines if the pin accepts a specific media type.

Syntax

HRESULT CheckMediaType(
    const CMediaType *pmt
);

Parameters

pmt
Pointer to a CMediaType object that contains the proposed media type.

Return Value

Returns an HRESULT value. Possible values include those shown in the following table.

S_OKSuccess.
VFW_E_TYPE_NOT_ACCEPTEDMedia type not accepted.

Remarks

This method overrides the CTransformOutputPin::CheckMediaType method.

If the filter is already streaming and is using two allocators, this method rejects any format changes. Otherwise, this method calls the filter's CTransformFilter::CheckInputType method to check the media type. If the input pin is connected, it also calls the IPin::QueryAccept method on the upstream output pin.

CTransInPlaceOutputPin::ConnectedIMemInputPin

CTransInPlaceOutputPin Class

Retrieves a pointer to the downstream input pin. This method returns the CBaseOutputPin.m_pInputPin member variable.

Syntax

IMemInputPin *ConnectedIMemInputPin(void);

Return Value

Returns a pointer to the IMemInputPin interface on the downstream input pin.

CTransInPlaceOutputPin::CTransInPlaceOutputPin

CTransInPlaceOutputPin Class

Constructor method.

Syntax

CTransInPlaceOutputPin(
    TCHAR *pObjectName,
    CTransInPlaceFilter *pFilter,
    HRESULT *phr,
    LPCWSTR pName
);

Parameters

pObjectName
String containing the debug name of the object. For more information, see CBaseObject.
pFilter
Pointer to the filter that created this pin, which must be a CTransInPlaceFilter object.
phr
Pointer to a variable that receives an HRESULT value indicating the success or failure of the method. Initialize the value to S_OK before creating the object. The value is changed only if an error occurs.
pName
Unicode™ string containing the pin name.

Remarks

The pName parameter specifies the pin name, which is returned by the IPin::QueryPinInfo method. However, the string is not used for the pin identifier. The pin identifier for this class is always Out. For more information, see QueryId.

CTransInPlaceOutputPin::DecideAllocator

CTransInPlaceOutputPin Class

Selects a memory allocator.

Syntax

HRESULT DecideAllocator(
    IMemInputPin *pPin,
    IMemAllocator **ppAlloc
);

Parameters

pPin
Pointer to the input pin's IMemInputPin interface.
ppAlloc
Address of a variable that receives a pointer to the allocator's IMemAllocator interface.

Return Value

Returns S_OK.

Remarks

This method overrides the CBaseOutputPin::DecideAllocator method.

This is a dummy method that does nothing, because the output pin for this filter never provides an allocator. Instead, the allocator is decided during the input pin's connection process. The input pin's CTransInPlaceInputPin::NotifyAllocator method calls NotifyAllocator on the downstream input pin.

CTransInPlaceOutputPin::EnumMediaTypes

CTransInPlaceOutputPin Class

Enumerates the pin's preferred media types. Implements the IPin::EnumMediaTypes method.

Syntax

HRESULT EnumMediaTypes(    
    IEnumMediaTypes **ppEnum
);

Parameters

ppEnum
Address of a variable that receives a pointer to the IEnumMediaTypes interface.

Return Value

Returns an HRESULT value. Possible values include those shown in the following table.

S_OKSuccess.
E_OUTOFMEMORYInsufficient memory.
E_POINTERNULL pointer.
VFW_E_NOT_CONNECTEDThe filter's input pin is not connected.

Remarks

This method returns the IEnumMediaTypes interface from the upstream output pin.

CTransInPlaceOutputPin::PeekAllocator

CTransInPlaceOutputPin Class

Retrieves a pointer to the pin's allocator. The method does not increment the reference count on the interface.

Syntax

IMemAllocator *PeekAllocator(void)

Return Value

Returns the CBaseOutputPin.m_pAllocator member variable.

CTransInPlaceOutputPin::SetAllocator

CTransInPlaceOutputPin Class

Specifies an allocator for the connection.

Syntax

void SetAllocator(
    IMemAllocator *pAllocator
);

Parameters

pAllocator
Pointer to the allocator's IMemAllocator interface.

Remarks

The output pin for this filter never provides an allocator. This method specifies the allocator for the output pin. It sets the value of the CBaseOutputPin.m_pAllocator member variable.