Media Foundation

From Wikipedia, the free encyclopedia

Microsoft Media Foundation is a new COM-based multimedia framework pipeline and infrastructure platform for digital media in Microsoft Windows. It is the intended replacement for Microsoft DirectShow, Windows Media SDK, DirectX Media Objects (DMOs) and all other legacy multimedia APIs such as Audio Compression Manager (ACM) and Video for Windows (VfW). The existing DirectShow technology is intended to be replaced by Media Foundation step-by-step, starting with a few features. For some time there will be a co-existence of Media Foundation and DirectShow. Media Foundation will not be available for previous Windows versions, including Windows XP.

The first release, present in Windows Vista, however, focuses only on content protection, audio and video playback quality, high-definition content (i.e. HDTV), and a more unified approach for digital data access control for digital rights management (DRM) and its interoperability.

Contents

[edit] Application support

Media Foundation, for this initial release in Windows Vista, finds use in media playback applications. Until now, mainly internal or bundled Windows services and applications are using Media Foundation.

  • Windows Protected Media Path (PMP), for instance, relies completely on Media Foundation.
  • Windows Media Player in Windows Vista relies on Media Foundation for playing protected content, but can also use DirectShow or the Windows Media Format SDK instead.
  • DirectX Video Acceleration (DXVA) 2.0, the hardware video acceleration pipeline for Windows Vista, also bases on Media Foundation.

[edit] Benefits over DirectShow

Media Foundation offers the following benefits:

  • Is scaleable for high-definition content and DRM-protected content.
  • Allows DirectX Video Acceleration to be used outside of the DirectShow infrastructure. DXVA 2.0 is available to user-mode components without using the DirectShow video renderer.
  • Provides better resilience to CPU, I/O, and memory stress for low-latency glitch-free playback of audio and video. Video tearing has been minimized. The improved video processing support also enables high color spaces and enhanced full-screen playback. Enhanced video renderer (EVR) which is also available for DirectShow, offers better timing support and improved video processing.
  • Media Foundation extensibility enables different content protection systems to operate together.
  • Media Foundation uses the Multimedia Class Scheduler Service (MMCSS), a new system service in Windows Vista. MMCSS enables multimedia applications to ensure that their time-sensitive processing receives prioritized access to CPU resources.

Media Foundation accompanies two other technologies — (Direct3D 10) and Windows Presentation Foundation—to keep pace with graphics and multimedia hardware evolution and demanding multimedia applications.


[edit] Architecture

Media Foundation is divided into three layers: Control Layer (Topology, data flow and protected media), Core Layer (Media processing), Platform Layer (Timing and helper objects). Similar to DirectShow filters or DirectX Media Objects (DMOs), Media Foundation introduces a new model with input and output pins, called Media Foundation Transforms (MFTs). Media sinks are the pipeline objects that receive media data. Media sinks can be renderer sinks, like the EVR or archive sinks, used to write files or stream data over the network. To perform an end-to-end task, such as playing a video file, the application must assemble the appropriate set of media sources, MFTs, and media sinks. However, unlike DirectShow, pipeline components do not connect to each other. The application or the control layer is responsible for moving data from one component to the next. Also, unlike DirectShow's push model, Media Foundation uses a pull model where the application or the control layer requests samples from the source.

[edit] Media Foundation Transform

Media Foundation Transforms (MFTs) represent a generic model for processing media data. They are used in Media Foundation primarily to implement decoders, encoders, mixers and digital signal processors (DSPs) - between media sources and media sinks. Media Foundation Transforms are an evolution of the transform model first introduced with DirectX Media Objects (DMOs). Hybrid DMO/MFT Objects can also be created. Applications can use MFTs inside the Media Foundation pipeline, or use them directly as stand-alone objects. MFTs also support hardware-accelerated video processing and their behaviors are more clearly specified. MFTs can be any of the following type:

  • Audio and video codecs
  • Audio and video effects
  • Multiplexers and demultiplexers
  • Tees
  • Color-space converters
  • Sample-rate converters
  • Video scalers

For Windows Vista, Microsoft recommends developers to write a Media Foundation Transform instead of a DirectShow filter. [1] For video editing and video capture, Microsoft recommends using DirectShow as they are not the primary focus of Media Foundation in Windows Vista.

[edit] Supported media formats

Windows Media Audio, Windows Media Video and MP3 are the default supported formats. Format support is extensible, developers can add support for other formats by writing codecs. MIDI playback is also not yet supported using Media Foundation.

[edit] See Also

Protected Media Path

[edit] External links

[edit] Notes and references

In other languages