Freigeben über


Enumerating Media Types

 
Microsoft DirectShow 9.0

Enumerating Media Types

Pins support the IPin::EnumMediaTypes method, which enumerates a pin's preferred media types. It returns a pointer to the IEnumMediaTypes interface. The IEnumMediaTypes::Next method retrieves pointers to AM_MEDIA_TYPE structures describing media types.

The media type enumerator exists primarily to help the Filter Graph Manager make intelligent connections, and your applications will probably not use it. A pin does not necessarily return any preferred media types. Moreover, the media types it returns might depend on the filter's connection status. For example, a filter's output pin might return a different set of media types depending on which media type was set for the filter's input pin.