Specifies whether the application requires Microsoft Direct3D support in the Source Reader or Sink Writer.

Data type

BOOL stored as UINT32


This attribute applies only if the application enables Direct3D support using the MF_SOURCE_READER_D3D_MANAGER or MF_SINK_WRITER_D3D_MANAGER attribute.

If the application enables Direct3D support, the Source Reader and Sink Writer will both try to allocate Direct3D surfaces for video. If this fails, and the MF_READWRITE_D3D_OPTIONAL attribute is TRUE, the Source Reader/Sink Writer will fall back to allocating video surfaces in system memory. Otherwise, if Direct3D surfaces cannot be allocated and MF_READWRITE_D3D_OPTIONAL is FALSE, an error occurs during processing.

If the application does not enable Direct3D support, the Source Reader/Sink Writer uses system memory, and ignores the value of MF_READWRITE_D3D_OPTIONAL.

This attribute is optional. The default value is FALSE. Set the attribute when you create the Source Reader or Sink Writer.


Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]



See also

Alphabetical List of Media Foundation Attributes
Sink Writer Attributes
Source Reader Attributes