CBaseOutputPin Class (Windows Embedded CE 6.0)
1/6/2010
This is an abstract base class derived from the CBasePin class that provides support for the common memory transport.
CBaseOutputPin connects only to an input pin that supplies an IMemInputPin interface (such as a pin class derived from the CBaseInputPin class), 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::GetMediaType member 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::Active first, to see if it should proceed.
CYourPin::Inactive should call CBaseOutputPin::Inactive first, to decommit the sample allocator and avoid deadlock problems with CBaseOutputPin::GetDeliveryBuffer.
All member functions in this class that return HRESULT and accept a pointer as a parameter return E_POINTER when passed a null pointer.
All IQualityControl method implementations are inherited from the CBasePin class and are not overridden by this class.
Protected Data Members
Member | Description |
---|---|
m_pAllocator |
Pointer to the IMemAllocator interface for this pin. |
m_pInputPin |
Pointer to the input pin to which this pin is connected. |
Member Functions
Member function | Description |
---|---|
Constructs a CBaseOutputPin object. |
Overrideable Member Functions
Member function | Description |
---|---|
Switches the pin to the active (running) mode. |
|
Releases the allocator and the IMemInputPin interface. |
|
Calls QueryInterface to retrieve an IMemInputPin interface. |
|
Completes the connection. |
|
Negotiates the allocator. |
|
Retrieves the number and size of buffers required for the transfer. |
|
Delivers an IMediaSample buffer to the connecting pin. |
|
Calls the IPin::BeginFlush method on the connected pin. |
|
Calls IPin::EndFlush on the connected input pin to pass an end-flushing notification. |
|
Calls IPin::EndOfStream on the connected input pin to pass an end-of-stream notification. |
|
Calls IPin::NewSegment on the connected input pin to pass a segment. |
|
Returns an IMediaSample buffer suitable for passing across the connection. |
|
Switches the pin to the inactive (stopped) mode. |
|
Creates a default memory allocator. To provide your own allocator, or to provide no allocator, override this. |
Implemented IPin Methods
Method | Description |
---|---|
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. |
|
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. |
|
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 |
Note | Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements For more information, see Setting Up the Build Environment |