Media Foundation SDK Samples

This section describes sample applications that demonstrate how to use Media Foundation.

Encoding Samples

Sample Description
Transcode Shows how to reencode a media file to Windows Media format.

 

Playback Samples

Sample Description
BasicPlayback Plays audio and video files by using the Media Session. This sample demonstrates how to create playback topologies, control the Media Session, and receive session events during playback.
MFPlayer Demonstrates some playback functions that are not included in the BasicPlayback sample.
ProtectedPlayback Plays protected audio and video files. This sample shows how to use the protected media path (PMP) session and how to use content enabler objects.

 

Plug-Ins

Sample Sub-Area Description
Decoder Media Foundation transform (MFT) Video decoder.
EVRPresenter Miscellaneous Custom presenter for the Enhanced Video Renderer (EVR).
MFT_AudioDelay MFT Audio effect transform. Shows how to write a basic MFT for audio processing.
MFT_Grayscale MFT Grayscale video effect. Shows how to write a basic MFT for video processing.
MPEG1Source Media source Parses MPEG-1 systems-layer streams. Shows how to write a custom media source and byte-stream handler.
WavSink Media sink An archive sink that writes .wav files. Shows how to write a custom media sink.
WavSource Media source Parses .wav files. Shows how to write a custom media source and byte-stream handler.

 

Source Reader Samples

Sample Description
Audio Clip Uses the Source Reader to decode audio from a media file.
VideoThumbnail Uses the Source Reader to get single frames from a video file.

 

Video Capture

Sample Description
MFCaptureD3D Shows how to preview video from a video capture device, using Direct3D to render the video.
MFCaptureToFile Shows how to capture video from a video camera to a file.

 

Miscellaneous Samples

Sample Description
ASFParser Shows how to parse data from an Advanced Systems Format (ASF) file.
DXVA-HD Shows how to use Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
DXVA2_VideoProc Uses DirectX Video Acceleration (DXVA) 2.0 to create a stream of 4:2:2 YUV video. This sample shows how to use the video processing features of DXVA.

 

Deprecated or Obsolete Samples

Sample Description
MFPlayer2 Demonstrates some advanced playback features of the MFPlay API.
PlaybackFX Applies a grayscale effect to video. Shows how to insert MFTs into a playback topology.
Note: This sample is no longer included in the SDK.
Playlist Plays a sequence of audio files using the sequencer source.
Note: This sample is no longer included in the SDK.
SimpleCapture Shows how to preview video from a video capture device, using the MFPlay API.
SimplePlay Shows how to play a media file using the MFPlay API.

 

Microsoft Media Foundation

About Media Foundation