How to detect stream selection changes in MediaSource ? Win8, Win8.1


  • Hello!

    I have implementation of IMFMediaSource . It is based on this sample http://msdn.microsoft.com/en-us/library/windows/desktop/bb970325%28v=vs.85%29.aspx . When  my implementation parses media files and finds multiple audio streams it selects first audio stream by default in m_pPresentationDescriptor , inside InitPresentationDescriptor() method. Inside DoStart() method SelectStreams() method is called and all streams is always (even after switching audio streams and doing pause, play on MediaElement (to force DoStart() method)) selected for some reason ( GetStreamDescriptorByIndex() returns true in fSelected variable )  . And SelectStreams() is called only inside DoStart().

    So it is supposed that IMFMediaSource should deliver samples for all reported streams and should not know when they are switched or there is some interface that I should implement to know when streams are switching ?

    Monday, July 28, 2014 10:44 AM

All replies

  • I'll ask our media guru to take a look at this when he can.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, July 28, 2014 7:44 PM
  • Hello Alexander,

    I just returned from holiday. Do you still need help with this?



    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, August 6, 2014 8:38 PM