Επεξεργασία

Κοινή χρήση μέσω


Creating ASF Files in DirectShow (Windows Media Format 11 SDK)

[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.]

You can use DirectShow to create ASF files directly from capture sources such as DV camcorders or to transcode other files into Windows Media Format. In either scenario, applications create filter graphs that include the WM ASF Writer filter as the renderer.

The WM ASF Writer provides a partial wrapper for the Windows Media Format SDK. Applications can use the IConfigAsfWriter interface of the filter to pass in a system profile (versions 4, 7, or 8), or use the Windows Media Format SDK directly to create a custom profile to pass to the filter. To add metadata and other header information, the application uses the IWMHeaderInfo interface, which can be obtained from the filter. After the profile and metadata have been configured, the application can simply run the filter graph. Internally, the filter uses the Windows Media Format SDK to write the file. The filter handles all the audio-video synchronization details, which would otherwise be the responsibility of the application.

This process is explained in more detail in the following sections.

Section Description
Configuring the WM ASF Writer (QASF) Describes how to configure the WM ASF Writer filter.
Building Filter Graphs to Write ASF Files (QASF) Describes how to create file-transcoding and capture graphs.
Configuring Profiles and Other File Properties (QASF) Describes how to perform various ASF file-configuration tasks using the WM ASF Writer.