Scrubb on the last frame of a video RRS feed

  • Question

  • Hi,

    I am trying to position in a Video by means of a slider. What I want to do is to Scrubb at the position indicated by the slider. What I have done so far is to set the play rate to 0, and call the start function with the time position that corresponds to the slider. Everything works fine until I get to the end of the file. When the end is reached the application does't respond in the same way.

    I want it to stay on the last frame. What happens is that the screen either goes black or you can only see the background (depending on repaint on stop is enabled).

    From my understanding, with Media Foundation, as soon as the end of the file is reached a   MEEndOfPresentation event is fired and the source and transforms are stopped.

    Is there a way to achieve what I want to do?



    Thursday, September 26, 2013 11:55 AM

All replies

  • One way to do this would be to handle the MEEndOfPresentation event, and call Start on the media session with a time that was just before the end was hit.  Then in the future you can avoid progressing beyond that position, just stopping on the last frame.

    Alternatively, if you want a larger change you could look at the Source Reader API (IMFSourceReader) and render the frames yourself.  This allows fine grained control over what frame is displayed.

    Thursday, October 10, 2013 11:19 PM
  • Thank you for your Answer.

    Have a good Day.

    Monday, February 3, 2014 7:54 AM