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.]
The Windows Media Format SDK enables you to supplement data in samples with data unit extensions, also called payload extension systems. This documentation uses the term "data unit extensions" in order to remain consistent with method names such as AddDataUnitExtension. A data unit extension is a name/value pair that is attached to the sample in the data section of the file. You can access the extended data using methods of the buffer object when the sample is retrieved by the reader.
You can create data unit extensions to your own specifications, but several types are predefined and supported by the objects of this SDK. These standard extensions are used to provide additional data for file names (in script and Web streams), SMPTE time code data, non-square pixel aspect ratio, duration, and type of interlacing.
To use data unit extensions, you must configure the stream to accept them, and then add extensions to each sample for that stream.
Related topics