Redigera

Dela via


To Pause or Stop Playback

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

When you call IWMReader::Start to begin playing a file, the asynchronous reader will continue processing in its own separate threads until the end of the file is reached. You can pause or stop the delivery of samples using the IWMReader::Pause or IWMReader::Stop methods respectively.

Pausing

When you call IWMReader::Pause to pause playback of a file, the reader keeps track of the current position in the file. To resume playing after pausing, call IWMReader::Resume. Playback will resume from the point at which it paused.

Stopping

When you call IWMReader::Stop to halt playback of a file, the reader does not keep track of any information about the progress of playback. To use Stop and later return to the stopping point you must save the presentation time of the last sample delivered and use it in your call to IWMReader::Start.

IWMReader Interface

Reading Files with the Asynchronous Reader