Can no longer change rate after scrubbing RRS feed

  • Question

  • Simple scenario: I want to seek to a certain position inside a video, and subsequently play it.

    The problem is when I first use SetRate() to set the rate to 0 in order to enable scrubbing, I can no longer run the video afterwards. It seems as if I'm unable to change the rate from 0 to anything else. SetRate() returns no error code, but when calling GetRate() after the MESessionRateChanged event arrived it returns 0 instead of the set rate. Calling start seems to result in the expected behavior when in scrubbing mode, a frame step. (MESessionScrubSampleComplete events arrive)

    When simply running the video (without setting rate to 0), subsequent rate changes do work. I also noticed if I set the rate to 0 and back again to a positive rate, without actually scrubbing in between (Start()), the rate change does happen!

    Is there any extra work I have to do in order to exit 'scrubbing mode'?

    P.s.: The same question on Stack Overflow.

    • Edited by Steven Jeuris Thursday, September 20, 2012 1:35 PM Added link to the same question on Stack Overflow.
    Thursday, September 20, 2012 1:33 PM

All replies

  • Are you stopping or pausing the media session before calling SetRate to return to a forward rate?  The session must be stopped or paused to transition in or out of a 0 rate.  SetRate always returns S_OK; if there is an error due to an unsupported state transition it would be an error code attached to the MESessionRateChanged Event.
    Tuesday, October 23, 2012 11:50 PM