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. |
This class provides the mechanism for enumerating the pin's preferred media types. Its constructor must be passed to an object from a class derived from CBasePin. It uses the virtual member function GetMediaTypeto retrieve each of the media types in turn. It also uses the pin's CBasePin::GetMediaTypeVersionmember function to determine if the number or type of media types has changed.
The base pin class does not support dynamic media type changes. CBaseFilter::GetPinVersionalways returns the same value, for example.
The media type enumerator must fill in a list of pointers to media type structures. The memory for those media type structures must be released by the callers when they have finished with it. However, the memory must not be allocated from any language-specific heap; otherwise, problems might occur between a filter written in C and another written in C++. For this reason, the base classes provide generic functions (not member functions of a class) to create and delete media types: CreateMediaTypeand DeleteMediaType. These manage memory allocation from the task allocator.
All member functions in this class that return HRESULTand accept a pointer as a parameter return E_POINTER when passed a null pointer.
Member Functions
CEnumMediaTypes | Constructs a CEnumMediaTypesobject. |
Implemented IUnknown Methods
AddRef | Increments the reference count. |
QueryInterface | Retrieves pointers to supported interfaces. |
Release | Decrements the reference count. |
Implemented IEnumMediaTypes Methods
Clone | Creates a duplicate CEnumMediaTypesobject with the same state. |
Next | Returns the next media type after the current position. |
Reset | Sets the current position back to the beginning. |
Skip | Skips over one or more entries in the enumerator. |