Redigera

Dela via


Output Media Properties 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.]

An output media properties object is used to retrieve and set an output property. Output media properties objects are created for supported output formats of streams in a file that is loaded into a reader object. For compressed streams, the output properties are determined by the possible outputs of the decompressing codec.

An output media properties object is created by IWMReader::GetOutputProps This method creates an output media properties object that contains the properties of the default output format. Other formats may be supported for an output. To obtain additional output formats, you can call IWMReader::GetOutputFormatCount to get the number of supported output formats and then loop through them using calls to IWMReader::GetOutputFormat. GetOutputFormat creates an output media properties object populated with the data for the selected output format.

Output media properties objects can also be created with the synchronous reader. All of the method names are identical to those in the reader and they are all exposed by the IWMSyncReader interface.

GetOutputProps and GetOutputFormat both set a pointer to an IWMOutputMediaProps interface. The other interfaces of the output media properties object can be obtained by calling the QueryInterface method.

The following interfaces are supported by every output media properties object.

Interface Description
IWMMediaProps Used as the base interface for the other media-property interfaces (input, output, and video).
IWMOutputMediaProps Retrieves the properties of an output.
IWMVideoMediaProps Manages the properties of a video stream. This is an optional interface, available only for video streams.

 

Objects

Reader Object