Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This is an abstract base class derived from the CBasePinclass that provides support for the common memory transport.

CBaseOutputPinconnects only to an input pin that supplies an IMemInputPininterface (such as a pin class derived from the CBaseInputPinclass), and provides methods for the filter to access that interface.

Derive your output pins from this class for the easiest implementation.

An output pin must provide one or more media types when connected to an input pin.

For example, if the media type that returns an index size is not available, the output pin should return S_FALSE in the CBasePin::GetMediaTypemember function, and the base class will skip it.

Your output pin class methods (represented here with the class name CYourPin) should call CBaseOutputPin.

For example, CYourPin::Activeshould call CBaseOutputPin::Activefirst, to see if it should proceed.

CYourPin::Inactiveshould call CBaseOutputPin::Inactivefirst, to decommit the sample allocator and avoid deadlock problems with CBaseOutputPin::GetDeliveryBuffer.

All member functions in this class that return HRESULTand accept a pointer as a parameter return E_POINTER when passed a null pointer.

All IQualityControlmethod implementations are inherited from the CBasePinclass and are not overridden by this class.

Protected Data Members

Member Description

m_pAllocator

Pointer to the IMemAllocatorinterface for this pin.

m_pInputPin

Pointer to the input pin to which this pin is connected.

Member Functions

Member function Description

CBaseOutputPin

Constructs a CBaseOutputPinobject.

Overrideable Member Functions

Member function Description

Active

Switches the pin to the active (running) mode.

BreakConnect

Releases the allocator and the IMemInputPininterface.

CheckConnect

Calls QueryInterfaceto retrieve an IMemInputPininterface.

CompleteConnect

Completes the connection.

DecideAllocator

Negotiates the allocator.

DecideBufferSize

Retrieves the number and size of buffers required for the transfer.

Deliver

Delivers an IMediaSamplebuffer to the connecting pin.

DeliverBeginFlush

Calls the IPin::BeginFlushmethod on the connected pin.

DeliverEndFlush

Calls IPin::EndFlushon the connected input pin to pass an end-flushing notification.

DeliverEndOfStream

Calls IPin::EndOfStreamon the connected input pin to pass an end-of-stream notification.

DeliverNewSegment

Calls IPin::NewSegmenton the connected input pin to pass a segment.

GetDeliveryBuffer

Returns an IMediaSamplebuffer suitable for passing across the connection.

Inactive

Switches the pin to the inactive (stopped) mode.

InitAllocator

Creates a default memory allocator.

To provide your own allocator, or to provide no allocator, override this.

Implemented IPin Methods

Method Description

BeginFlush

Informs the pin to begin a flush operation.

Implemented to return E_UNEXPECTED because it is an error to call this on an output pin.

EndFlush

Informs the pin to end a flush operation.

Implemented to return E_UNEXPECTED because it is an error to call this on an output pin.

EndOfStream

Informs the pin that no additional data is expected until a new run command is issued.

Implemented to return E_UNEXPECTED because it is an error to call this on an output pin.

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment