Enumerating Sinks

[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 writer can have many sinks associated with it. You can enumerate the sinks that have been added to the writer by using IWMWriterAdvanced::GetSinkCount and IWMWriterAdvanced::GetSink.

The example code in the Getting Error Messages from a Sink demonstrates sink enumeration.

Note

When enumerating sinks, the default file sink created in response to a call to IWMWriter::SetOutputFilename will be enumerated along with any other sinks you have added. If you are using only the default file sink, you can access it by calling GetSink for sink index 0.

 

IWMWriterAdvanced Interface

Working with Writer Sinks