Using the IMFQualityAdvise Interface in a video player RRS feed

  • Question

  • Hello,

    In my application I try to change the Quality level in order test the performance improvement. Can you please tell me the steps that I need to do in order to get the IMFQualityAdvise::SetQualityLevel function. 

    I read through all the info and help that is provided on the MSDN pages but nothing worked so far or there wasn't any example. 

    I have tried the following:

    Querying the Source:

    • hr = MFGetService(m_pSource,MF_QUALITY_SERVICES,IID_IMFQualityAdvise,(void**) &pQualityAdvise);
    • hr = -184329....

    Querying the Session:

    • hr = MFGetService(m_pSession,MF_QUALITY_SERVICES,IID_PPV_ARGS(&pQualityAdvise));
    • hr = E_NOINTERFACE;

    I also read that: 

    • The quality manager typically obtains this interface when the quality manager's IMFQualityManager::NotifyTopology method is called.
    • In a typical quality manager this method does the following:
    • Enumerates the nodes in the topology.

    • Calls IMFTopologyNode::GetObject to get the node's underlying object.

    • Queries for the IFMQualityAdvise interface.

    How does this work?

    Thank you,


    Tuesday, September 10, 2013 11:24 AM

All replies

  • The documentation on the IMFQualityAdvise page is a bit misleading about the source supporting it through GetService -- there is no source that supports IMFQualityAdvise in such a way, though theoretically they could.  IMFQualityAdvise can be implemented by a media source stream, decoder, or renderer, but it does not actually have to be implemented by any of them.  For example, an audio only source probably will not support IMFQualityAdvise at all.  The quality manager obtains IMFQualityAdvise from decoders and renderers in NotifyTopology, and obtains IMFQualityAdvise from source streams in NotifyQualityEvent for the MENewStream event.

    If you want to change the quality levels for app-specific purposes, you should implement your own quality manager.  If you do not, you will be constantly fighting with the default quality manager, where it will override your settings with what it determines is appropriate. Also, not all components will support quality levels. Media sources generally do not. 

    Friday, October 11, 2013 1:17 AM