Contexts

The mm-renderer service provides contexts, each of which can play a stream of media content concurrently with and independently of other contexts. Each context can direct output to a different set of output devices, creating independent zones of operation.

The operations that are valid for a particular context depend on the inputs and outputs that are attached to it. You can use a context for operations other than playing, by setting its output appropriately. The current context operation determines which functions calls are supported. For example, you can record rather than play an audio stream by setting a context's input to an audio capture device and its output to a file. In this case, mmr_play(), mmr_seek(), and similar functions won't work.

Your application must connect to the mm-renderer service before it can create a context. When your application creates a context, the context has a unique name but no other properties are set. For subsequent operations, your application accesses the context through the context handle.

You can control properties of the context's operation (for example, audio volume) by attaching parameters to the context or to each input or output. For more information, see "Parameters".

Note: Depending on the multimedia renderer's configuration, the service may behave differently when closing context handles. For more information, see "Closing context handles".