Share via


Windows Media Player 11 SDK Data Input and OutputĀ 

Windows Media Player SDK banner art

Previous Next

Data Input and Output

Windows Media Player provides audio or video data to DSP plug-ins through an input buffer allocated by Windows Media Player. DSP plug-ins return processed data to Windows Media Player through an output buffer that is also allocated by Windows Media Player. Windows Media Player manages the process of passing data between itself and the DSP plug-in by calling methods implemented by the plug-in. The process works as follows:

  1. Windows Media Player calls IMediaObject::ProcessInput, passing a pointer to an IMediaBuffer object to the DSP plug-in.

  2. The DSP plug-in keeps a reference count on the input buffer object. The DSP plug-in returns an appropriate success or failure HRESULT.

  3. Windows Media Player calls IMediaObject::ProcessOutput, passing a pointer to an array of DMO_OUTPUT_DATA_BUFFER structures (which contain output buffers) to the DSP plug-in.

  4. The DSP plug-in processes the data in the input buffer and then copies the data to the appropriate output buffer. The DSP plug-in releases the reference count on the input buffer object when all the data in the buffer has been processed. The DSP plug-in then returns an appropriate success or failure HRESULT.

Note Do not write code that writes data to the input buffer or reads data from the output buffer. Incorrectly accessing data buffers may yield unexpected results.

  1. Windows Media Player renders the content in the output buffer.

This process repeats continuously while the plug-in is enabled and Windows Media Player has content to render.

See Also

Previous Next