Mutual Exclusion 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.]

A mutual exclusion object is used to specify a number of streams, of which only one can be delivered at a time. This can be used in several ways, such as providing an audio stream in several languages as the soundtrack for one video stream.

Mutual exclusion is an optional part of a profile. Mutual exclusion objects can be created for existing mutual exclusion information in a profile or can be created empty, ready to receive new data. Mutual exclusion objects cannot exist independently of a profile object. To save the contents of a mutual exclusion object, you must call IWMProfile::AddMutualExclusion.

To create a mutual exclusion object, use one of the following methods.

Method Description
IWMProfile::CreateNewMutualExclusion Creates a mutual exclusion object without any data.
IWMProfile::GetMutualExclusion Creates a mutual exclusion object populated with data from a profile. Uses the mutual exclusion index to identify the desired mutual exclusion information.

 

Both methods in the preceding table set a pointer to an IWMMutualExclusion interface. The IWMStreamList interface is inherited by IWMMutualExclusion and never needs to be accessed directly. The other interface of the mutual exclusion object can be obtained by calling the QueryInterface method.

The following interfaces are supported by every mutual exclusion object.

Interface Description
IWMMutualExclusion Sets and retrieves the type of mutual exclusion to be used.
IWMMutualExclusion2 Organizes streams into records, which can be used to create complex mutual exclusion scenarios. Inherits all of the methods of IWMMutualExclusion.
IWMStreamList Manages the list of mutually exclusive streams.

 

Mutual Exclusion

Objects

Profile Manager Object