Working with contexts

Contexts define media flows from an input to one or many outputs. You must configure a context before you can start playing media content.

To create a new context, call the mmr_context_create() function, passing in the mm-renderer connection handle. The creation operation returns a context handle (the primary handle), which you use to manipulate the context by setting parameters, attaching an input and one or more outputs, and issuing playback commands.

You can create multiple contexts, as long as your application manages potentially conflicting playback situations (e.g., simultaneous requests to play two different tracks from the same CD).

The state of a context is stored in a PPS object. For information on PPS objects, see "PPS objects".

When a context is no longer needed, you can explicitly destroy it by passing its primary handle to the mmr_context_destroy() function.