Share via


Preferred Media Types (Windows Embedded CE 6.0)

1/6/2010

To query a DMO for its supported types, an application calls the IMediaObject::GetInputType and IMediaObject::GetOutputType methods. These two methods enumerate the preferred types on a specified stream, in order of preference.

A stream's preferred types can change dynamically when the application sets media types on other streams. For example, the preferred output types might change depending on the input types, or vice versa.

A stream might not even have a preferred type until other streams have types. However, the DMO is not required to update its preferred types in this way. The application cannot assume that every type it receives is valid. For this reason, the IMediaObject::SetInputType and IMediaObject::SetOutputType methods support a flag for testing a specific type.

Sometimes a fully specified media type is too specific to use as a preferred type. To indicate a more general type, the DMO can return an incomplete type. A media type is incomplete if it has the value GUID_NULL for the major type, the subtype, or the format type. The GetInputType and GetOutputType methods usually set the format type to GUID_NULL.

After the application has set all of the input types, however, the DMO should generally return at least one complete type for each output stream. Having a complete type facilitates testing, and applications can use it as a reasonable default. Note that some media types are complete without a format type.

See Also

Concepts

DMOs and Media Types