Setting Data Unit Extensions

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Some streams are configured to use data unit extensions to associate supplementary data with individual samples. For more information about extended samples, see Data Unit Extensions.

Most data unit extension systems require an extension on every sample in the stream. If you do not provide an extension of the correct size, the writer will reject the sample.

To add extended data to a sample, use the INSSBuffer3::SetProperty method. You can get information about the data unit extensions configured on a stream by using the IWMStreamConfig2::GetDataUnitExtensionCount and IWMStreamConfig2::GetDataUnitExtension methods.

Configuring Data Unit Extensions

Writing ASF Files