Microsoft DirectX 8.0 |
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_pTIPFilter | Pointer to the filter that created this pin. |
Public Methods | |
CTransInPlaceOutputPin | Constructor method. |
DecideAllocator | Selects a memory allocator. |
CheckMediaType | Determines if the pin accepts a specific media type. |
SetAllocator | Specifies an allocator for the connection. |
ConnectedIMemInputPin | Retrieves a pointer to the downstream input pin. |
PeekAllocator | Retrieves a pointer to the pin's allocator. |
IPin Methods | |
EnumMediaTypes | Enumerates the pin's preferred media types. |
Pointer to the filter that created this pin.
Syntax
CTransInPlaceFilter * const m_pTIPFilter;
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_OK Success. VFW_E_TYPE_NOT_ACCEPTED Media 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.
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.
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.
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.
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_OK Success. E_OUTOFMEMORY Insufficient memory. E_POINTER NULL pointer. VFW_E_NOT_CONNECTED The filter's input pin is not connected.
Remarks
This method returns the IEnumMediaTypes interface from the upstream output pin.
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.
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.