Working with contexts

Contexts define the flow of media content 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 function mmr_context_create(), passing 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 inputs and outputs, and issuing playback commands. You can create as many contexts as you need to, as long as your application manages potentially conflicting playback situations (for example, 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 destroy it by passing the context handle to the mmr_context_destroy() function.