Configuring File Transfer Streams
[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.]
File transfer streams do not require any special settings in the WM_MEDIA_TYPE structure. They do require a data unit extension to associate a file name with each sample. To send a name with file transfer samples, you must implement a data unit extension system for the stream.
To set a data unit extension for the stream, perform the following steps:
- Obtain a pointer to the IWMStreamConfig2 interface of the stream configuration object by calling IWMStreamConfig::QueryInterface.
- Add a data unit extension for the stream by calling IWMStreamConfig2::AddDataUnitExtension as follows:
hr = pStreamConfig2->AddDataUnitExtension(CLSID_WMTPropertyFileName, -1, NULL, 0);
Related topics