Setting Metadata Attributes
[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.]
Metadata attributes are set by using the IWMHeaderInfo3::AddAttribute method.
All attributes are assigned a language from the language list for the file. You can access the language list by using the IWMLanguageList interface. To get a pointer to an IWMLanguageList interface, call QueryInterface on any interface of the object from which you have obtained IWMHeaderInfo3.
You can add attributes with any name you like. However, using attribute names that are not standard names supported by the Windows Media Format SDK can make your metadata difficult for users to discover. Most media-playing applications will check for standard values. For more information, see Custom Metadata.
You cannot use stream number 0xFFFF to add an attribute globally. You must assign each attribute to a specific stream number, or stream 0 for file-level attributes.
Related topics