Unable to Retrieve IMFAudioPolicy from Media Session

1

I have developed Win32 app based heavily on the MF_ProtectedPlayback sample here. I'm using 4 cplayer objects at a time. It works for what I need it to do.

However, I am trying to group the sessions, so that they are controlled by one volume control in control panel, as described in docs here.

My problem is that I cannot get the IMFAudioPolicy (MR_AUDIO_POLICY_SERVICE) from the session. As in the sample, I'm using the MFCreateAudioRendererActivate() method to create the renderers. Again, this all works fine. I have no problem getting other interfaces back from the session, like IMFSimpleAudioVolume.

I get the following errors:

-onecore\com\combase\dcomrem\call.cxx(4907)\combase.dll!75EB0755: (caller: 75E931D8) ReturnHr(3) tid(7e60) 80040155 Interface not registered

-Exception thrown at 0x773DA892 (KernelBase.dll) in MyApp.exe: 0x80040155: Interface not registered.

Relevant code:

HRESULT CPlayer::OnTopologyReady(IMFMediaEvent* pEvent)
{
    \\ works fine
    MFGetService(
        m_pSession,
        MR_VIDEO_RENDER_SERVICE,
        __uuidof(IMFVideoDisplayControl),
        (void**)&m_pVideoDisplay
    );

    \\ works fine
    MFGetService(
        m_pSession,
        MR_POLICY_VOLUME_SERVICE,
        __uuidof(IMFSimpleAudioVolume),
        (void**)&m_pSimpleVolume

    );

    // winrt errors, returns null
    MFGetService(
        m_pSession,
        MR_AUDIO_POLICY_SERVICE,
        __uuidof(IMFAudioPolicy),
        (void**)&m_pAudioPolicy

    );


    HRESULT hr = StartPlayback();

    return S_OK;
}

What am I missing? Any ideas why this interface is not available? Thanks... -jerry

edit: so it appears that what I want to do may not be possible. This problem is related to the protected processes created in PMP. Still investigating...

c++
windows
audio
ms-media-foundation
asked on Stack Overflow Dec 17, 2020 by Jerry Davis • edited Dec 19, 2020 by Jerry Davis

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0