Compartilhar via


IWMWriter interface (wmsdkidl.h)

[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 IWMWriter interface is used to write ASF files. It includes methods for allocating buffers, setting and retrieving input properties, and setting profiles and output file names. The writer object exposes this interface. To create the writer object, call the WMCreateWriter function.

Inheritance

The IWMWriter interface inherits from the IUnknown interface. IWMWriter also has these types of members:

Methods

The IWMWriter interface has these methods.

 
IWMWriter::AllocateSample

The AllocateSample method allocates a buffer that can be used to provide samples to the writer.
IWMWriter::BeginWriting

The BeginWriting method initializes the writing process.
IWMWriter::EndWriting

The EndWriting method performs tasks required at the end of a writing session.
IWMWriter::Flush

The functionality of the Flush method has been removed, because IWMWriter::EndWriting performs the needed checks internally. For compatibility with older applications, calls to flush will always return S_OK even though the call does nothing.
IWMWriter::GetInputCount

The GetInputCount method retrieves the number of uncompressed input streams.
IWMWriter::GetInputFormat

The GetInputFormat method retrieves possible media formats for the specified input.
IWMWriter::GetInputFormatCount

The GetInputFormatCount method retrieves the number of media format types supported by this input on the writer.
IWMWriter::GetInputProps

The GetInputProps method retrieves the current media properties of a specified input stream.
IWMWriter::SetInputProps

The SetInputProps method specifies the media properties of an input stream.
IWMWriter::SetOutputFilename

The SetOutputFilename method specifies the name of the file to be written.
IWMWriter::SetProfile

The SetProfile method specifies the profile to use for the current writing task.
IWMWriter::SetProfileByID

The SetProfileByID method specifies the profile to use for the current writing task, identifying the profile by its GUID.
IWMWriter::WriteSample

The WriteSample method passes in uncompressed data to be compressed and appended to the file that is being created.

Requirements

Requirement Value
Target Platform Windows
Header wmsdkidl.h

See also

IWMWriterAdvanced Interface

IWMWriterFileSink Interface

IWMWriterNetworkSink Interface

IWMWriterSink Interface

Interfaces

Writer Object

Writing ASF Files