Microsoft Windows CE 3.0  

IPin Interface

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.

The IPininterface represents a single, unidirectional connection point on a filter. A pin connects to exactly one other pin on another filter. Other objects can use this interface on this pin. The interface between the filter and the pin is private to the implementation of a specific filter.

During the connection process, one pin takes the lead. The base classes assume that this is the output pin of the upstream connecting filter. The filter graph manager calls the IPin::Connectmethod on this pin's IPininterface, passing the IPinpointer for the connecting pin. This connecting pin then calls the IPin::ReceiveConnectionmethod located on the other pin, in addition to its format-enumeration, IUnknown::QueryInterface, and possibly IPin::QueryAcceptmethods, to establish whether the connection is possible.

When to Implement

All filters must implement this interface on each of its pins. Which methods are implemented depends on whether the pin is an input pin or an output pin. Use the CBasePin, CBaseInputPin, or CBaseOutputPinclass, or classes derived from these classes, to implement this interface.

When to Use

This interface is used by other connecting pins and by the filter graph manager. Applications should not use this interface directly but should go through the filter graph manager. Connecting pins use the IPininterface on the opposite pin to negotiate a common media type and an agreed allocator to use for passing samples.

Methods in Vtable Order

IUnknown methods Description
QueryInterface Returns pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IPin methods Description
Connect Makes a connection to another pin.
ReceiveConnection Makes a connection to this pin and is called by a connecting pin.
Disconnect Breaks a connection.
ConnectedTo Returns a pointer to the connecting pin.
ConnectionMediaType Returns the media type of this pin's connection.
QueryPinInfo Retrieves information about this pin (for example, the name, owning filter, and direction).
QueryId Retrieves an identifier for the pin.
QueryAccept Queries whether a given media type is acceptable by the pin.
EnumMediaTypes Provides an enumerator for this pin's preferred media types.
QueryInternalConnections Provides an array of the pins to which this pin internally connects.
EndOfStream Informs the pin that no additional data is expected until a new run command is issued.
BeginFlush Informs the pin to begin a flush operation.
EndFlush Informs the pin to end a flush operation.
NewSegment Specifies that samples following this call are grouped as a segment with a given start time, stop time, and rate.
QueryDirection Retrieves the direction for this pin.