IMFMediaSourceTopologyProvider::GetMediaSourceTopology always fails, why?

0

Under what circumstances the IMFMediaSourceTopologyProvider::GetMediaSourceTopology() does not fail? It always fails with code 0xc00d36e6 (MF_E_ATTRIBUTENOTFOUND).


Please do not answer with a link to MSDN.

ms-media-foundation
asked on Stack Overflow Jul 3, 2013 by user1764961

1 Answer

0

Here is the solution after pissing blood for hours.

You have to call QueryInterface() on IMFSequencerSource object to get the IMFMediaSource like this:

hr = pMFSequencerSrc->QueryInterface( __uuidof( IMFMediaSource ), (void**)&pMediaSource );

Now on pMediaSource object call CreatePresentationDescriptor() to get the presentation descriptor required for the GetMediaSourceTopology() call.

voila...

P.S. That MF_E_ATTRIBUTENOTFOUND error... nice work M$

answered on Stack Overflow Jul 3, 2013 by user1764961

User contributions licensed under CC BY-SA 3.0