Share via


About Discontinuity

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

At any time, Windows Media Player can signal a break in the input stream by calling the IMediaObject::Discontinuity method. This occurs routinely at the start and end of a stream, and also prior to each seek operation or when streaming content is interrupted for any reason. The sample DSP plug-in that the Windows Media Player Plug-in wizard generates does not need to deal with discontinuities for the following reasons:

  • PCM samples are atomic, meaning they can be processed without regard to the other samples in the stream. Some video formats contain data that depends on key frames and compressed samples.
  • The sample code is written to always force the client to process all output before the plug-in will accept more input.

The default implementation of IMediaObject::Discontinuity simply returns S_OK.

Implementing an Audio DSP Plug-in