none
File type registration problem with Media Player on Vista

    Question

  • Hello,

    I'm developing a source filter for a custom file format, and the primary mode of operation is downloading via HTTP.  I've followed the steps outlined in "Registering a Custom File Type" (http://msdn.microsoft.com/en-us/library/dd377513%28VS.85%29.aspx) to register my filter for the file type for the HTTP protocol, and everything works as expected with Windows Media Player 11 on Windows XP.  However, when trying to open a http URL pointing at one of my files with the WMP 11 that ships with Vista (11.0.600x), I get a 80040218 error, "No combination of filters could be found to render the stream.".  So far, I have:
    • verified that ISourceFilter::Load never gets called on my source filter via debug logging.
    • double checked that my filter is registered for the file type under HKLM\Software\Classes\http\Extensions (and thus HKCR\http\Extensions) with regedit.
    • verified that the filter can work in WMP on Vista by registering it both for local files (via HKLM\Software\Classes\Media Type\Extensions) and a custom "sw_http" protocol scheme (that I map to http in my filter).  Playing a file via both of these in WMP works fine.
    • tried adding Permissions and Runtime values for my file extension under HKLM\Software\Microsoft\Multimedia\WMPlayer\Extensions, which had no effect.
    I have not found anything in the MSDN or via Google that suggests that WMP 11 on Vista requires anything extra to make this work, so I am a bit stumped.  Hopefully someone here has some ideas.

    Thanks,

    Scott
    Tuesday, September 01, 2009 9:51 PM

Answers

  • Correct MF is going to use a single source for HTTP, it doesn't have registration like DirectShow.

    If you need a custom source you will have to stick to a custom protocol handler.


    www.chrisnet.net
    • Marked as answer by scottm_seawell Thursday, September 03, 2009 9:00 PM
    Thursday, September 03, 2009 8:31 PM

All replies

  • Is there a reason you can't use a custom URL handler rather than the standard http?  I know you tried it, but I mean permanently.

    WMP 11 on Vista gives Media Foundation the first pass at rendering certain media files, and often with no fall back to DirectShow.  It would seem as though in your case it is trying to use Media Foundation and then giving up altogether.


    www.chrisnet.net
    Wednesday, September 02, 2009 12:59 PM
  • Our product management folk would definitely prefer being able to use http URLs. ;)  I also was figuring there was some kind of Media Foundation issue, but I've also experimented with installing the K-Lite Codec pack on Vista, and its registration of the Haali media splitter for Matroska (.mkv) files using http does seem to work.  I couldn't find anything extra that they set in the registry that would explain why that's so, though.

    Scott
    Wednesday, September 02, 2009 3:01 PM
  • After poking around with ProcessMonitor, it appears that WMP on Vista always uses the Media Foundation HTTP media source for http URLs, no matter the file extension.  I've not found anything yet that suggests this can be disabled, so I guess I'm stuck using a custom protocol scheme...

    Scott
    Thursday, September 03, 2009 7:33 PM
  • Matroska isn't creating a http replacement source, however you are.  When WMP renders the file for .mkv it is going to use the stock HTTP URL handler, and connect that to the MKV splitter.  This might be the difference here.
    www.chrisnet.net
    Thursday, September 03, 2009 7:50 PM
  • Yes, it seems that under the covers the MF HTTP media source creates a temporary file and feeds it into the filter graph.  Since my filter is a source filter and not a demuxer, this doesn't work when using my file format.  I need to do the http requests myself in my source filter, so reworking things to just do demuxing unfortunately won't work for me.  It's not even that clear if redoing my source filter as a MF media source would work, as I don't see anything in the MSDN to register different sources for a protocol scheme based on file extension in MF...

    Scott
    Thursday, September 03, 2009 8:14 PM
  • Correct MF is going to use a single source for HTTP, it doesn't have registration like DirectShow.

    If you need a custom source you will have to stick to a custom protocol handler.


    www.chrisnet.net
    • Marked as answer by scottm_seawell Thursday, September 03, 2009 9:00 PM
    Thursday, September 03, 2009 8:31 PM
  • Okay, gotcha.  Thanks for your help.

    Scott
    Thursday, September 03, 2009 8:59 PM