locked
Seeking in video while keeping playback paused? RRS feed

  • Question

  • Hi,

    I've been experimenting with the MFPlayer sample.

    What I'd like to do is jump from one spot in a video
    to another, while remaining in a paused state.  When I
    jump to the new time I want that one video frame to
    be shown, but I don't want to actually start video
    playback.

    Is there a simple way to do that?

    In the MFPlayer sample, when they seek they call
    m_pSession->Start(...).

    Is the only way to do what I want to call Start, but
    then once playback is actually started, immediately
    call Pause?

    Thanks,
    Phil
    Tuesday, April 7, 2009 5:44 PM

Answers

  • Hi Phil,

    You can get an effect like this using scrubbing.  When the session's rate is 0, it will display exactly one frame for each Start call and then stop again.  If you want to return to normal playback, you can set the session's rate back to 1.0 and then call Start.

    For more details on scrubbing: http://msdn.microsoft.com/en-us/library/ms704085(VS.85).aspx

    Hope this helps,
    Matt

    • Marked as answer by Phil Klien Friday, April 17, 2009 9:31 PM
    Friday, April 17, 2009 9:04 PM

All replies

  • Hi Phil,

    You can get an effect like this using scrubbing.  When the session's rate is 0, it will display exactly one frame for each Start call and then stop again.  If you want to return to normal playback, you can set the session's rate back to 1.0 and then call Start.

    For more details on scrubbing: http://msdn.microsoft.com/en-us/library/ms704085(VS.85).aspx

    Hope this helps,
    Matt

    • Marked as answer by Phil Klien Friday, April 17, 2009 9:31 PM
    Friday, April 17, 2009 9:04 PM
  • Hi Matt,

    Excellent.  I'll give that a try.

    Thanks,
    Phil
    Friday, April 17, 2009 9:31 PM