locked
How can I get presentation clock under MFT which is only processing frames??

    Question

  • I have a MFT which is only processing frames, not decoder or encoder. I want to get presentation clock of media sink to make sure whether the sample is late or not.  I don't know whether I can get event or status from IMFQualityAdvise and IMFQualityAdvise2(I'm trying to expose these two interfaces of my MFT, but it will not be called). If not, how can I get presentation time to comapre with sample time to make sure video can play smoothly. Because whole the topology is setup automatically, I can't get that IMFPresentationClock from media session.
    Friday, February 17, 2012 10:40 AM

Answers

  • Okay Kenny,

    I don't think there is any way for you to get QOS messages from the topology. However, let me take a closer look at this and I will get back to you in a day or two.

    -James


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

    Tuesday, February 21, 2012 12:10 AM
    Moderator

All replies

  • Hello Kenny,

    Typically QOS is handled by the sink. An upstream topo node should not be managing QOS and more specifically should never discard frames because they are late. The Media Foundation session manager is architected in such a way as to minimize late frames, glitching, buffering, etc. In this scenario the presentation clock will always be out of sync from the current frame being processed by your MFT. MF takes into account the inherent latency added by intermediate processing nodes. What is the problem that you are trying to solve by seeing if frames are arriving "late"?

    Also keep in mind that we really haven't given any guidance surrounding using MFTs in the Metro app environment other than what Stan had to say at the "build" conference. We will be releasing some initial guidance very soon and I will announce the release on my blog http://blogs.msdn.com/mediasdkstuff

    I hope this helps,

    James


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


    Friday, February 17, 2012 9:31 PM
    Moderator
  • Dear James:

    Thanks for your reply. Now I have serveral processing methods on my MFT component. If I can know frames are arriving "late", I want to change processing method to an easy one or notify App to let users know that option will cause video playing not smoothly. So base on those reasons, I want to know are there any methods to achieve this. I will not discard any frames but only adjust my processing method internally.

    Thanks

    Saturday, February 18, 2012 7:39 AM
  • Okay Kenny,

    I don't think there is any way for you to get QOS messages from the topology. However, let me take a closer look at this and I will get back to you in a day or two.

    -James


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

    Tuesday, February 21, 2012 12:10 AM
    Moderator