Επεξεργασία

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


IWMProfile interface

[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 IWMProfile interface is the primary interface for a profile object. A profile object is used to configure custom profiles. You can use IWMProfile to create, delete, or modify stream configuration objects and mutual exclusion objects. You can also set and retrieve general information about the profile. To access all the features of the profile object, you should use IWMProfile3, which inherits from IWMProfile and IWMProfile2.

IWMProfile is also accessible through the reader object, where you can use it to get information about the streams of a file that is loaded in the reader. When accessing IWMProfile from the reader, you can make changes to the profile, but none of the changes can be saved to the file. It is often handy to use the profile of an existing file as the foundation of a new profile. The synchronous reader supports IWMProfile in the same way as the reader.

The profile information obtained through the reader or synchronous reader does not come from a .prx file. The reader uses the information in the ASF file to assemble the stream configurations. Thus certain profile information, like the name and description, are not available through the reader.

There are several ways to obtain a pointer to an IWMProfile interface. The profile manager has methods to create a new profile and to access existing profiles. All of these methods set an IWMProfile pointer. When reading a file, a pointer to IWMProfile can be obtained by calling the QueryInterface method of any reader interface. Likewise, any interface of the synchronous reader object can obtain a pointer with a call to QueryInterfaceIWMProfile3.

Members

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

Methods

The IWMProfile interface has these methods.

Method Description
AddMutualExclusion Adds a mutual exclusion object to the profile.
AddStream Adds a stream to the profile.
CreateNewMutualExclusion Creates a mutual exclusion object for the profile.
CreateNewStream Creates a stream configuration object for the profile.
GetDescription Retrieves the description of the profile.
GetMutualExclusion Retrieves a mutual exclusion object from the profile.
GetMutualExclusionCount Retrieves the number of mutual exclusion objects in the profile.
GetName Retrieves the name of the profile.
GetStream Retrieves a stream, using an index number, from the profile.
GetStreamByNumber Retrieves a stream, using the number of the stream, from the profile.
GetStreamCount Retrieves the number of streams in the profile.
GetVersion Retrieves the version number of Microsoft Windows Media Services in the profile.
ReconfigStream Enables changes made to a stream configuration to be included in the profile.
RemoveMutualExclusion Removes a mutual exclusion object from the profile.
RemoveStream Removes a stream from the profile.
RemoveStreamByNumber Removes a stream from the profile.
SetDescription Specifies the description of the profile.
SetName Specifies the name of the profile.

For information about which interfaces can be obtained by using the QueryInterface method of this interface, see the topic for the object on which this interface is implemented.

See also

Interfaces

IWMProfileManager Interface

Profile Manager Object

Reader Object

Synchronous Reader Object

Working with Profiles