Redigera

Dela via


What's New for Media Foundation

Microsoft Media Foundation was introduced in Windows Vista as the replacement for DirectShow. Of course, DirectShow is still supported in Windows 7, but developers are encouraged to use Media Foundation in their new digital media applications.

The improvements to Media Foundation can be summarized as follows:

  • Better format support, including MPEG-4
  • Support for capture devices and hardware codecs
  • A simplified programming model
  • Improvements to the platform

Better Format Support

The Media Foundation audio/video pipeline was implemented in Windows Vista, but it supported a limited set of formats and file containers, which meant that some applications needed to fall back on older technologies such as DirectShow. In Windows 7, Media Foundation includes the following new codecs, media sources, and media sinks:

  • AAC decoder
  • AAC encoder
  • AVI/WAVE file source
  • DV video decoder
  • H.264 video decoder
  • H.264 video encoder
  • MJPEG decoder
  • MP3 file sink*
  • MP4/3GP file source
  • MP4/3GP file sink

Note

The MP3 file sink does not include an MP3 audio encoder.

 

For more information, see Supported Media Formats in Media Foundation.

Hardware Device Support

Media Foundation now supports the following types of hardware devices in the audio/video pipeline:

  • UVC 1.1 video capture devices, such as webcams
  • Audio capture devices
  • Hardware encoders and decoders
  • Hardware video processors, such as color-space converters

Hardware codecs can perform very fast video transcoding. For example, an application might transfer Windows Media Video (WMV) files to a cell phone that supports only 3GP files. Using a hardware encoder, the application can transcode the file in the background, just before transferring it to the device.

Hardware devices are represented in Media Foundation by a proxy object, and are used in the pipeline just like software-based components.

Simplified Programming Model

In Windows Vista, Media Foundation exposed a relatively low-level set of APIs. These APIs are flexible, but too complex for simple tasks. Windows 7 adds new high-level APIs that make it simpler to write media applications in C++. These new high-level APIs include the following.

API Description
Source Reader The source reader pulls raw or decoded data from a media file. For example, you can use the source reader to get thumbnail bitmaps from a video file, or to analyze the waveform data in an audio file. You can also use the source reader to get live data from an audio or video capture device.
Sink Writer The sink writer enables you to author media files by passing in uncompressed or encoded data. For example, you can use it to re-encode a video file, or to capture live video from a webcam to a file.
Transcode API This feature supports the most common audio/video encoding scenarios.

 

You can still use the low-level APIs in Media Foundation. You might do so if you need more control over the audio/video pipeline.

Platform Improvements

Windows 7 includes numerous enhancements to the underlying Media Foundation platform APIs. Advanced applications can use these APIs directly; other applications will get the benefits indirectly. The improvements include:

  • Changes in the video pipeline to reduce power consumption and video memory usage.
  • DXVA-HD: Microsoft DirectX Video Acceleration High Definition (DXVA-HD) is a new API for hardware-accelerated video processing. DXVA-HD offers a more flexible compositing model than the previous DXVA video processing API, and is better suited for high-definition video formats..
  • A new mechanism for enumerating sources and decoders, which includes merit values and a preferred/blocked list. This feature improves the overall reliability of the system. For more information, see the following topics:

SDK Changes

New in Windows 8

Some of the new updates to Media Foundation with Windows 8 are:

About Media Foundation

Microsoft Media Foundation