Düzenle

Aracılığıyla paylaş


How to Seek During Playback

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

This topic describes how to seek during playback using MFPlay.

To Seek During Playback

  1. Initialize a PROPVARIANT to hold the seek time in 100-nanosecond units, as a LARGE_INTEGER (VT_I8) type.
  2. Call IMFPMediaPlayer::SetPosition. Specify MFP_POSITIONTYPE_100NS for the first parameter, and pass in the PROPVARIANT for the second parameter.

Requirements

MFPlay requires Windows 7.

Using MFPlay for Audio/Video Playback