Prerolling / showing first frame RRS feed

  • Question

  • Hi,

    I've created a media session, topology and so on and now want to present the first frame of the movie to the user BEFORE starting the movie. What's the best way to do this? I checked the media sink for pre-roll support (which it has) and called IMFMediaSinkPreroll::NotifyPreroll(0) in the hope that the EVR would request the first few samples and I could then grab the correct one from my custom EVR Presenter. However, the presenter only gets MFVP_MESSAGE_BEGINSTREAMING, nothing that would cause it to process a sample. Am I missing something?

    Is there an alternative way? At first I thought I could somehow manually tell the EVR to pull a frame but my current assumption (if I understand the MSDN documentation correctly) is the only way to get the EVR to process a frame is via the clock, right? I thought about setting the play rate to 0 and then just start the clock but after finding the preroll interface the latter seemed to be a cleaner solution...

    As always, thanks in advance


    Tuesday, March 1, 2011 11:15 AM


  • Okay, re-checked the documentation NotifyPreroll says " It does not actually render any samples until the clock starts" ... so that explains why the presenter does not get any events/notifications I guess...
    • Marked as answer by ak_ventuz Monday, March 14, 2011 11:40 AM
    Monday, March 14, 2011 11:40 AM