Writing a Custom MFT

This section describes how to write a custom Media Foundation Transform (MFT).

MFT Checklist

When you implement a custom MFT, use the following checklist to determine the requirements:

All MFTs All MFTs must implement [IMFTransform](/windows/desktop/api/mftransform/nn-mftransform-imftransform).
The following topics give more information about implementing this interface:
  • [Basic MFT Processing Model](basic-mft-processing-model.md)
  • [Time Stamps and Durations](time-stamps-and-durations.md)
  • [Handling Stream Changes](handling-stream-changes.md)

Encoders and decoders Requirements: See [Implementing a Codec MFT](implementing-a-codec-mft.md).
Recommended: Implement [IMFQualityAdvise](/windows/desktop/api/mfidl/nn-mfidl-imfqualityadvise) or [IMFQualityAdvise2](/windows/desktop/api/mfidl/nn-mfidl-imfqualityadvise2), to support quality-of-service (QoS) notifications.
Video decoders and video processors Optional: Support DirectX Video Acceleration.
  • [Direct3D-Aware MFTs](direct3d-aware-mfts.md)
  • [Supporting DXVA 2.0 in Media Foundation](supporting-dxva-2-0-in-media-foundation.md)
Hardware codecs See [Hardware MFTs](hardware-mfts.md).
To make your MFT discoverable by applications... See [Registering and Enumerating MFTs](registering-and-enumerating-mfts.md).
Asynchronous data processing The default MFT model uses synchronous (blocking) calls to process data. For some MFTs, asynchronous processing can be more efficient. However, it is also more complex to implement.
For more information, see [Asynchronous MFTs](asynchronous-mfts.md).
Rate control, trick mode, or reverse playback See [Implementing Rate Control](implementing-rate-control.md).
If your MFT creates threads... Implement the [IMFRealTimeClient](/windows/desktop/api/mfidl/nn-mfidl-imfrealtimeclient) interface.
If your MFT has licensing restrictions... Consider using the field-of-use mechanism. See [Field of Use Restrictions](field-of-use-restrictions.md).
If you are porting an existing DirectX Media Object (DMO)... See [Comparison of MFTs and DMOs](comparison-of-mfts-and-dmos.md).

 

This section contains the following topics:

Media Foundation Transforms