locked
Best way to find current segment playing in a playlist RRS feed

  • Question

  •   If I am using an IMFSequencerSource to create a playlist is there a good way for me (from the IMFMediaSession or the IMFSequencerSource...or really any other interface) to know which segment is currently playing?  It seems I queue the presentation descriptor for the first segment and call IMFMediaSession.Start, it will then send successive MENewPresentation events when it wants to PreRoll the next segment, but is there a way, at a given point in time to detect which segment is currently rendering?

    The idea is to allow for skip forward/back across items in a playlist, but since the MFCreateSequencerSegmentOffset requires the id to offset to I need to determine (from my current id, which I don't know) the right id if they user wanted to say skip forward N items. Is there a better way to do this than trying to discover the current segment (which I then use to look up the right Nth previous/next topo id in a list of ids I have in my class)?

    Ryan

    Friday, December 31, 2010 11:33 PM

Answers

  • On the current topology (which you can get using IMFMediaSession::GetFullTopology or as the parameter to the most recent MEMediaSessionTopologyStatus event with the READY status) the current element ID can be found on the MF_TOPONODE_SEQUENCE_ELEMENTID attribute on each source stream node.

    Wednesday, January 5, 2011 1:22 AM

All replies

  • On the current topology (which you can get using IMFMediaSession::GetFullTopology or as the parameter to the most recent MEMediaSessionTopologyStatus event with the READY status) the current element ID can be found on the MF_TOPONODE_SEQUENCE_ELEMENTID attribute on each source stream node.

    Wednesday, January 5, 2011 1:22 AM
  • Perfect, thanks.  I was going down the GetCurrentTopology, extract the PD from the source node and then match against a list of uint/IMFPresentationDescriptors I had, but this way is even better :)

     

    Ryan

    Wednesday, January 5, 2011 2:17 AM