locked
Handling no audio sink? RRS feed

  • Question

  • I have a C++/CLI component running in a Windows app. The component adds video clips to a sequencer source. I've found when I disable the audio driver using device manager I stop receiving MF_TOPOSTATUS_READY events. I need these events to trigger playback. I've stepped through the code and don't see any errors raised while creating topologies and adding them to the sequence source.

    I'm unsure where to look next. Can any provide some hints or guesses on where to look for the problem? Reviewing MF traces in event viewer I have found that I am missing this:

    MFTEnumEx flags 0x53, category {9ea73fb4-ef7a-4559-8d5d-719d8f0426c7} for input type ({73647561-0000-0010-8000-00aa00389b71},{00000161-0000-0010-8000-00aa00389b71}), output type ({73647561-0000-0010-8000-00aa00389b71},{00000003-0000-0010-8000-00aa00389b71})

    Although I do get many of these:

    MFTEnumEx flags 0x51, category {d6c02d4b-6833-45b4-971a-05a4b04bab91} for input type ({73646976-0000-0010-8000-00aa00389b71},{33564d57-0000-0010-8000-00aa00389b71}), output type ({00000000-0000-0000-0000-000000000000},{00000000-0000-0000-0000-000000000000})

    I also get the above zero guids when the audio driver is enabled and everything works fine.


    Wednesday, October 17, 2012 11:40 AM

Answers

  • If the audio sink cannot be created due to the lack of an audio device, you should rebuild the topology such that there is no audio sink and the audio stream on the source is deselected.  You could either do this in response to getting the MF_E_CANNOT_CREATE_SINK error from the media session (and perhaps checking for the MF_TOPONODE_ERRORCODE attribute on the audio output node on the topology to verify that audio was the problem) or proactively try to create the audio sink using MFCreateAudioRenderer.
    • Marked as answer by Dave Lowndes Monday, November 12, 2012 2:31 AM
    Friday, November 9, 2012 10:29 PM

All replies

  • I've figured out I'm getting:

    Error: 0xC00D36FA
    Description: Activate failed to create mediasink. Call OutputNode::GetUINT32(MF_TOPONODE_MAJORTYPE) for more information.
    #define: MF_E_CANNOT_CREATE_SINK

    I guess my question is now how do I handle this? Do I need to detect the lack of audio sink before/while creating the topology and remove/ignore the audio stream? How do I detect there will be no sink?

    Thursday, October 18, 2012 4:19 AM
  • If the audio sink cannot be created due to the lack of an audio device, you should rebuild the topology such that there is no audio sink and the audio stream on the source is deselected.  You could either do this in response to getting the MF_E_CANNOT_CREATE_SINK error from the media session (and perhaps checking for the MF_TOPONODE_ERRORCODE attribute on the audio output node on the topology to verify that audio was the problem) or proactively try to create the audio sink using MFCreateAudioRenderer.
    • Marked as answer by Dave Lowndes Monday, November 12, 2012 2:31 AM
    Friday, November 9, 2012 10:29 PM
  • Awesome thanks Matt. That was exactly the answer I needed. Cheers.
    Saturday, November 10, 2012 2:14 AM