Redigera

Dela via


Writer Object

[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 is used to write digital media files using the advanced systems format (ASF) file structure. The process of writing a digital media file involves many steps internal to the writer, which coordinates compression, packetization, and multiplexing.

The writer object includes interfaces for output to files or a network, supports one callback interface, and can create one or more input media properties objects.

The writer object is created by the function WMCreateWriter, which sets a pointer to an IWMWriter interface. The other interfaces of the writer object can be obtained by calling the QueryInterface method.

The following interfaces are supported by the writer object.

Interface Description
IWMDRMWriter Provides methods to generate DRM keys.
IWMDRMWriter2 Configures the writer object to write a file containing a pre-encrypted stream that conforms to the Windows Media DRM 10 for Network Devices protocol.
IWMHeaderInfo Manages the specification and retrieval of header information, such as metadata, markers, and so on.
IWMHeaderInfo2 Manages enumerating through the available codec information. Inherits all of the methods of IWMHeaderInfo.
IWMHeaderInfo3 Manages enumerating through the available codec information. Inherits all of the methods of IWMHeaderInfo and IWMHeaderInfo2.
IWMWatermarkInfo Provides access to information about watermarking systems present on the system.
IWMWriter Starts and stops the writing of ASF files; it includes methods for allocating buffers, setting and retrieving input properties, setting profiles and output file names, and unlocking the writer.
IWMWriterAdvanced Adds, gets, and removes specified sink objects; retrieves statistics, number of sinks, and the clock time the writer is working to; and performs other advanced functions.
IWMWriterAdvanced2 Provides some advanced functionality, particularly for handling deinterlaced video. Inherits all of the methods of IWMWriterAdvanced.
IWMWriterAdvanced3 Provides additional writer functionality, including the ability to get detailed writer statistics. Inherits all of the methods of IWMWriterAdvanced and IWMWriterAdvanced2.
IWMWriterPostView Manages some advanced writing functionality related to postviewing samples. Postviewing is viewing the output, usually from an encoder, to check that the encoding/decoding process is working correctly.
IWMWriterPreprocess Manages preprocessing passes made by the writer. Preprocessing passes are used to improve the quality of encoded output.

 

The following callback interface must be implemented by the application to track the progress of postviewing.

Interface Description
IWMWriterPostViewCallback Manages how uncompressed samples are received from the writer object to preview what the codec is doing.

 

Objects

Writing ASF Files