Working with Writer 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 object of the Windows Media Format SDK processes input media data into a bit stream. However, the writer object does not deliver the bit stream to its final destination (either to a file or a network location). To write the ASF content to a usable format, you must use writer sinks.

The writer object supports three types of sinks: file sinks, network sinks, and push sinks. A file sink writes ASF content to an ASF file on disk. A network sink broadcasts ASF content from a network address. A push sink delivers data to a server running Windows Media Services so that the server can make the content available to its intended audience. You can also create your own sinks to deliver ASF data in whatever way is required by your application. For information about network sinks and push sinks, see Sending ASF Data Over a Network. The remainder of this section discusses writer sinks.

You can configure one or more sinks for each instance of the writer you use. Each sink handles only a single destination. For example, if you want to write three files at once, you must create and configure a separate file sink for each.

The following sections describe the use of writer sinks.

Section Description
Adding Sinks to the Writer Describes how to add sinks to the writer.
Enumerating Sinks Describes how to enumerate the sinks that have been added to the writer.
Getting Error Messages from a Sink Describes how to configure sinks to deliver status messages to your application.
Using File Sinks Describes how to use a writer file sink to create an ASF file on disk.
Using Custom Sinks Describes how to create and use your own custom sinks to deliver ASF data.

 

IWMWriterAdvanced Interface

IWMWriterSink Interface

Writing ASF Files