Media playback

Media applications use mm-renderer to play audio and video tracks. The applications select a mediastore file or playlist for the input and one or more hardware devices for outputs. During playback, mm-renderer manages the media flow from the input to the outputs.

The interaction between these components proceeds as shown here:

Multimedia architecture diagram with playback components highlighted and their order of interaction enumerated
Figure 1. Media Playback
  1. Configuring the rendering service

    To play media content, an application must configure the mm-renderer service by defining a context and then attaching an input and one or more outputs to that context. For the input, the application must provide the URL of a track or playlist stored on an accessible mediastore. For each output, it must provide a URL that names an output device and lists the device configuration options. For the sequence of API calls required for various playback scenarios, see the Playing and Recording Media Content chapter in the Multimedia Renderer Developer's Guide.

  2. Controlling playback

    When an application issues the command to start playback, mm-renderer initiates the media flow between the input and the outputs. The service uses streamers to read the media files; the streamers use the media drivers (e.g., io-fs-media) as a source for media content. Then, the service forwards the content to other utilities that send the audio and video components to a sink (output). During playback, mm-renderer continues to process commands such as changing the playback speed, skipping to a new track position, or stopping playback.

  3. Outputting audio and video

    The mm-renderer service communicates with the Screen Graphics Subsystem for outputting video and with io-audio for outputting audio. Screen is the windowing system that mm-renderer uses to render video to the display. The io-audio utility is a resource manager that dynamically loads and configures audio drivers; mm-renderer uses it to deliver the audio in media tracks to the appropriate hardware (e.g., speakers).