Migrating plugins from QuickTime to Media Foundation? RRS feed

  • Question

  • Hi Everyone..

    I have been a long-time QuickTime developer on the Mac. I would like to expand my market into Windows 7. Is there any documentation on building plugins for Media Foundation?

    I want to learn how to create the following functionality:

    - Create the ability to read a custom (non-MOV) container format.
    - I need to also create a decompression plugin, to decompress the container's payload. Preferably into a 16-bit RGBA (or higher) pixel format. Direct access to the GPU using GLSL would be ideal!
    - It would help to have the ability to write files, as well.

    Where can one go, to start to puzzle out what I need to do?



    Wednesday, June 29, 2011 2:56 PM

All replies

  • How about use some open source code?

    For the Video format, you could learn some from this Aneesoft, to converting the videos easily

    Tuesday, July 5, 2011 9:32 AM
  • To read a new container format, you need a media source.  See Creating a Custom Media Source.

    To implement a codec, you need a media foundation transform.  See Writing a Custom MFT.  MF does not provide any GLSL functionality, but there is no reason why you cannot call into GLSL functionality from your MFT.  Generally GPU access is supported through DXVA in Media Foundation, though if it is not a common codec there probably is not DXVA functionality implemented in graphics cards to support DXVA for that format.

    Media Foundation natively supports writing ASF (WMV, WMA) and MPEG4 files.  If you want to support another container format -- for example, the container you are implementing a source for, you need a media sink.  See Media Sinks.

    Regular (non-asynchronous) MFTs are probably the easiest of the three to implement, so implementing the MFT would be a good place to get your feet wet.

    Monday, August 1, 2011 10:01 PM
  • Hi Matt,

    Thanks for the guidance! I will start looking at these links. Naturally, I want to recycle some of my work that I have implemented in my QuickTime components. So much of what you describe really helps!

    One area that I don't see a description of, is matadata and Time Code. Are these supported with Media Foundation?

    Lastly, is there a developer relations contact at Microsoft, that handles Media Foundation topics? (I can be emailed "offline" for this one.)

    Thanks again! I am pretty excited to see where I go with this.

    Saturday, August 13, 2011 8:14 PM
  • Metadata is a bit of a mess in MF.  Some properties are expected to be part of the media type, presentation descriptor, or stream descriptor generated by the media source.  In Vista, IMFMetadata was the means by which sources exposed other metadata.  In Win7, metadata is exposed through IPropertyStore using the shell property system.  The shell property system is the cleanest way to handle metadata for a new media source, and it integrates automatically with other Windows components.

    Media samples in MF (IMFSample) support timestamps and durations, though I do not know if this is the kind of thing you are referring to by time code.  A media source is expected to convert whatever format might be stored in the container to timestamps and durations on media samples.

    I am not exactly sure what the means might be to get a developer relations contact.  It probably involves the Microsoft partner program or the MSDN subscription program.

    Wednesday, September 14, 2011 12:55 AM