Microsoft DirectX 8.1 (C++) |
After finding the DMO's preferred media types, set the media type for each stream by calling the IMediaObject::SetInputType and IMediaObject::SetOutputType methods.
Not every combination of media types reported by the DMO is guaranteed to be valid. For example, the output type might need to match the input type. You can test a media type by calling SetInputType or SetOutputType with the DMO_SET_TYPEF_TEST_ONLY flag. For a decoder, you would generally set the input type and then choose an output type. For an encoder, you would set the output type and then choose an input type.
Because the settings on one stream can affect another stream, you might need to clear a media type that you set previously. To do this, call SetInputType or SetOutputType with the DMO_SET_TYPEF_CLEAR flag.