Microsoft Windows CE 3.0  

CBaseOutputPin Class

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.

CBaseOutputPinis 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. If the media type that returns an index size, for example, is not currently 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::Active should call CBaseOutputPin::Activefirst, to see if it should proceed. CYourPin::Inactive should 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

m_pAllocator Pointer to the IMemAllocatorinterface for this pin.
m_pInputPin Pointer to the input pin to which this pin is connected.

Member Functions

CBaseOutputPin Constructs a CBaseOutputPinobject.

Overridable Member Functions

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. Override this to provide your own allocator or to provide no allocator.

Implemented IPin Methods

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.