Share via


Windows Media Player 11 SDK Format Negotiation 

Windows Media Player SDK banner art

Previous Next

Format Negotiation

For Windows Media Player and a DSP plug-in to share data, both programs must agree on the data format they are processing. Windows Media Player only plays content that exists in a format that it can process, but it needs a way to verify that a DSP plug-in supports the format of the current media before it can provide data to the plug-in. The IMediaObject interface provides methods that a DSP plug-in implements to provide Windows Media Player with information about the types of media supported by the plug-in and to enable Windows Media Player to specify media types for input and output. These methods use the DMO_MEDIA_TYPE structure, defined in mediaobj.h, to identify particular media types. For more information about format negotiation, see About IMediaObject.

DSP plug-ins can process audio of a variety of bit depths. In general, Windows Media Player will only load DSP plug-ins that can process the same bit depth as the digital audio. For instance, if the digital audio is 20-bit, the plug-in must be written to process 20-bit audio. For CD audio, DSP plug-ins must support 20-bit processing.

During format negotiation of multi-channel content on a computer configured for use with stereo speakers, Windows Media Player first attempts to connect to an audio DSP plug-in using the existing input and output format by calling IMediaObject::SetInputType and IMediaObject::SetOutputType. Once this initial negotiation occurs, the Player then enumerates the formats the plug-in supports and attempts to negotiate the best format combination for the Player and the plug-in. If the plug-in accepts stereo audio (defined by a WAVEFORMATEX structure) as the input format during the initial negotiation, and then subsequently accepts only multi-channel audio (defined by a WAVEFORMATEXTENSIBLE structure), the Player will provide multi-channel audio as the input format to the plug-in. This behavior during format negotiation is available for use in the Microsoft Windows XP operating system. It may be altered or unavailable in subsequent versions.

See Also

Previous Next